diff options
-rw-r--r-- | Makefile.flags | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.flags b/Makefile.flags index bb90a08de..b29b06839 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -121,11 +121,16 @@ endif | |||
121 | # fall back to using a temp file: | 121 | # fall back to using a temp file: |
122 | CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c) | 122 | CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c) |
123 | ifeq ($(CRYPT_AVAILABLE),y) | 123 | ifeq ($(CRYPT_AVAILABLE),y) |
124 | LDLIBS += m crypt pthread | 124 | LDLIBS += m crypt |
125 | else | 125 | else |
126 | LDLIBS += m | 126 | LDLIBS += m |
127 | endif | 127 | endif |
128 | 128 | ||
129 | PTHREAD_AVAILABLE := $(shell echo 'int main(void){return 0;}' >pthreadtest.c; $(CC) $(CFLAGS) -lpthread -o /dev/null pthreadtest.c >/dev/null 2>&1 && echo "y"; rm pthreadtest.c) | ||
130 | ifeq ($(PTHREAD_AVAILABLE),y) | ||
131 | LDLIBS += pthread | ||
132 | endif | ||
133 | |||
129 | ifeq ($(CONFIG_PAM),y) | 134 | ifeq ($(CONFIG_PAM),y) |
130 | # libpam uses libpthread, libdl and libaudit, so for static builds busybox | 135 | # libpam uses libpthread, libdl and libaudit, so for static builds busybox |
131 | # must be linked to libpthread, libdl and libaudit. On some platforms that | 136 | # must be linked to libpthread, libdl and libaudit. On some platforms that |