From 6c54928f1f68ce0378172737b449785d49147425 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 24 May 2014 12:49:21 -0500 Subject: Pass the same $CFLAGS to the library probe as the final build, to work with broken build environments that provide different libraries for --static and dynamic builds. --- scripts/make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/make.sh') diff --git a/scripts/make.sh b/scripts/make.sh index 5ed9df42..8a321ea2 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -163,7 +163,7 @@ echo "Library probe..." # that doesn't exist, so we have to detect and skip nonexistent libraries # for it. -OPTLIBS="$(for i in util crypt m; do echo "int main(int argc, char *argv[]) {return 0;}" | ${CROSS_COMPILE}${CC} -xc - -o /dev/null -Wl,--as-needed -l$i > /dev/null 2>/dev/null && echo -l$i; done)" +OPTLIBS="$(for i in util crypt m; do echo "int main(int argc, char *argv[]) {return 0;}" | ${CROSS_COMPILE}${CC} $CFLAGS -xc - -o /dev/null -Wl,--as-needed -l$i > /dev/null 2>/dev/null && echo -l$i; done)" echo "Compile toybox..." -- cgit v1.2.3