changeset 1309:ad7d75f97029 draft

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.
author Rob Landley <rob@landley.net>
date Sat, 24 May 2014 12:49:21 -0500
parents 1493a21160a4
children 7baa19cdce59
files scripts/make.sh
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/make.sh	Sat May 24 12:48:32 2014 -0500
+++ b/scripts/make.sh	Sat May 24 12:49:21 2014 -0500
@@ -163,7 +163,7 @@
 # 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..."