aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-09-09 14:43:29 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-09-09 14:43:29 +0200
commit194b0d56887f434bae843a66639b055632244812 (patch)
tree5e808bd8c0e9f4b511e9f20b652eda48d2943e4c /configure.ac
parent3573b84aa7df1483ac09f90c509eddd0a658a25e (diff)
downloadgnunet-194b0d56887f434bae843a66639b055632244812.tar.gz
gnunet-194b0d56887f434bae843a66639b055632244812.zip
gcc does strange things with -Wno-*
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index e0c003ed6..ee85f474e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,18 +85,18 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
85# CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found]) 85# CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found])
86# Check for CFLAG and appends them to CFLAGS if supported 86# Check for CFLAG and appends them to CFLAGS if supported
87AC_DEFUN([CC_CHECK_CFLAG_APPEND], [ 87AC_DEFUN([CC_CHECK_CFLAG_APPEND], [
88 AC_CACHE_CHECK([if $CC supports $1 flag], 88 AC_CACHE_CHECK([if $CC supports -Wno-$1 flag],
89 AS_TR_SH([cc_cv_cflags_$1]), 89 AS_TR_SH([cc_cv_cflags_$1]),
90 CC_CHECK_CFLAGS_SILENT([$1]) 90 CC_CHECK_CFLAGS_SILENT([-W$1]) #gcc is stupid. It does not fail with the -W-no option for backwards compat but then shows the error "in case something goes wrong".
91 ) 91 )
92 92
93 AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], 93 AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
94 [CFLAGS="$CFLAGS $1"; $2], [$3]) 94 [CFLAGS="$CFLAGS -Wno-$1"; $2], [$3])
95]) 95])
96 96
97 97
98# We make heavy use of this, llvm/gcc and gcc-9 give warnings so disable. 98# We make heavy use of this, llvm/gcc and gcc-9 give warnings so disable.
99CC_CHECK_CFLAG_APPEND([-Wno-address-of-packed-member]) 99CC_CHECK_CFLAG_APPEND([address-of-packed-member])
100 100
101# Use Linux interface name unless the OS has a different preference 101# Use Linux interface name unless the OS has a different preference
102DEFAULT_INTERFACE="\"eth0\"" 102DEFAULT_INTERFACE="\"eth0\""