summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-03-11 16:35:29 +0000
committerRoy Marples <roy@marples.name>2016-03-11 16:35:29 +0000
commit29aea02981889b58eb175063a1622f77788fadd4 (patch)
tree35e7f93929dd931f84e372d3b96bc21f3225f101 /configure
parent9843976ae092495eb37e397a6f36432411010d00 (diff)
downloaddhcpcd-29aea02981889b58eb175063a1622f77788fadd4.tar.xz
Use -Wall -Werror when running configure tests.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index a9d5f119..20ef6e5b 100755
--- 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) {