aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-05-24 12:49:21 -0500
committerRob Landley <rob@landley.net>2014-05-24 12:49:21 -0500
commit6c54928f1f68ce0378172737b449785d49147425 (patch)
tree07584b72b2f93fb592d28435c262027222b41ce9
parenta17c5f22632b74aa17b1e395c0b175d7c1f52ab9 (diff)
downloadtoybox-6c54928f1f68ce0378172737b449785d49147425.tar.gz
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.
-rwxr-xr-xscripts/make.sh2
1 files changed, 1 insertions, 1 deletions
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..."