← Commit list

2156e2285

Denys Vlasenko
Denys Vlasenko
2015-09-04
SUCCESS Duration: 258s

Subject

Makefile.flags: survive a build system which has no pthread

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

Makefile.flags+6 -1
@@ -121,11 +121,16 @@ endif
# fall back to using a temp file:
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)
ifeq ($(CRYPT_AVAILABLE),y)
-LDLIBS += m crypt pthread
+LDLIBS += m crypt
else
LDLIBS += m
endif
+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)
+ifeq ($(PTHREAD_AVAILABLE),y)
+LDLIBS += pthread
+endif
+
ifeq ($(CONFIG_PAM),y)
# libpam uses libpthread, libdl and libaudit, so for static builds busybox
# must be linked to libpthread, libdl and libaudit. On some platforms that