Pass the same $CFLAGS to the library probe as the final build, to work with broken...
authorRob Landley <rob@landley.net>
Sat, 24 May 2014 17:49:21 +0000 (12:49 -0500)
committerRob Landley <rob@landley.net>
Sat, 24 May 2014 17:49:21 +0000 (12:49 -0500)
scripts/make.sh

index 5ed9df4..8a321ea 100755 (executable)
@@ -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..."