]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Use -Wall -Werror when running configure tests.
authorRoy Marples <roy@marples.name>
Fri, 11 Mar 2016 16:35:29 +0000 (16:35 +0000)
committerRoy Marples <roy@marples.name>
Fri, 11 Mar 2016 16:35:29 +0000 (16:35 +0000)
configure

index a9d5f1190769dc9cbe4d6556f00280c3a90d66ff..20ef6e5b7674fb20da4e2b68680a21b80d1cf947 100755 (executable)
--- a/configure
+++ b/configure
@@ -432,6 +432,12 @@ echo "Using compiler .. $CC"
 XCC="$CC `$SED -n -e 's/CPPFLAGS+=*\(.*\)/\1/p' $CONFIG_MK`"
 XCC="$XCC `$SED -n -e 's/CFLAGS+=*\(.*\)/\1/p' $CONFIG_MK`"
 
+# When running tests, treat all warnings as errors.
+# This avoids the situation where we link to a libc symbol
+# without the correct header because it might be hidden behind
+# a _*_SOURCE #define guard.
+XCC="$XCC -Wall -Werror"
+
 # Now test we can use the compiler with our CFLAGS
 cat <<EOF >_test.c
 int main(void) {