[git commit] fix build breakage with gcc 4.2.1
Denys Vlasenko
vda.linux at googlemail.com
Fri Apr 20 16:24:09 UTC 2012
commit: http://git.busybox.net/busybox/commit/?id=6dca17261065eabe6102a7e7facf9ebb717315e5
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
Makefile.flags | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Makefile.flags b/Makefile.flags
index f745c2f..c43c8dc 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -105,7 +105,10 @@ export SYSROOT=$(CONFIG_SYSROOT)
endif
# Android has no separate crypt library
-CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc - >/dev/null 2>&1 && echo "y")
+# gcc-4.2.1 fails if we try to feed C source on stdin:
+# echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc -
+# 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
else
More information about the busybox-cvs
mailing list