Make proper checks in configure

now compiles with gcc 5.1.0
This commit is contained in:
thorkill 2015-06-30 23:20:31 +02:00
parent c3f8a93d52
commit fbb62fa80e
2 changed files with 17 additions and 14 deletions

View file

@ -144,6 +144,22 @@ AS_IF([test "x$enable_hardening" != "xno"],
[AX_CHECK_COMPILE_FLAG([-DFORTIFY_SOURCE=2], [CPPFLAGS="$CPPFLAGS -DFORTIFY_SOURCE=2"])
dnl AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CPPFLAGS="$CPPFLAGS -fno-strict-overflow"])
AX_CHECK_COMPILE_FLAG([-fwrapv], [CPPFLAGS="$CPPFLAGS -fwrapv"])
AX_CHECK_COMPILE_FLAG([-Weverything], [CFLAGS="$CFLAGS -Weverything"])
AX_CHECK_COMPILE_FLAG([-Wno-reserved-id-macro], [CFLAGS="$CFLAGS -Wno-reserved-id-macro"])
AX_CHECK_COMPILE_FLAG([-Wno-padded], [CFLAGS="$CFLAGS -Wno-padded"])
AX_CHECK_COMPILE_FLAG([-Wno-disabled-macro-expansion], [CFLAGS="$CFLAGS -Wno-disabled-macro-expansion"])
AX_CHECK_COMPILE_FLAG([-Wno-shorten-64-to-32], [CFLAGS="$CFLAGS -Wno-shorten-64-to-32"])
AX_CHECK_COMPILE_FLAG([-Wno-format-nonliteral], [CFLAGS="$CFLAGS -Wno-format-nonliteral"])
AX_CHECK_COMPILE_FLAG([-Werror=conditional-uninitialized], [CFLAGS="$CFLAGS -Werror=conditional-uninitialized"])
AX_CHECK_COMPILE_FLAG([-Werror=uninitialized], [CFLAGS="$CFLAGS -Werror=uninitialized"])
AX_CHECK_COMPILE_FLAG([-Werror=missing-field-initializers], [CFLAGS="$CFLAGS -Werror=missing-field-initializers"])
AX_CHECK_COMPILE_FLAG([-Werror=missing-variable-declarations], [CFLAGS="$CFLAGS -Werror=missing-variable-declarations"])
AX_CHECK_COMPILE_FLAG([-Wno-conversion], [CFLAGS="$CFLAGS -Wno-conversion"])
AX_CHECK_COMPILE_FLAG([-Wno-date-time], [CFLAGS="$CFLAGS -Wno-date-time"])
AX_CHECK_COMPILE_FLAG([-Wno-shadow], [CFLAGS="$CFLAGS -Wno-shadow"])
AX_CHECK_COMPILE_FLAG([-Wno-vla], [CFLAGS="$CFLAGS -Wno-vla"])
AX_CHECK_COMPILE_FLAG([-Wno-unused-macros], [CFLAGS="$CFLAGS -Wno-unused-macros"])
AX_CHECK_COMPILE_FLAG([-Wno-cast-qual], [CFLAGS="$CFLAGS -Wno-cast-qual"])
case $host_os in
*mingw*)
AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"])

View file

@ -195,18 +195,5 @@ if TUNEMU
LIBS += -lpcap
endif
AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote. \
-Weverything -Wno-reserved-id-macro -Wno-padded -Wno-disabled-macro-expansion -Wno-shorten-64-to-32 -Wno-format-nonliteral \
-Werror=conditional-uninitialized \
-Werror=uninitialized \
-Werror=missing-field-initializers \
-Werror=missing-variable-declarations \
-Wno-conversion \
-Wno-date-time \
-Wno-shadow \
-Wno-vla \
-Wno-unused-macros \
-Wno-cast-qual \
-ferror-limit=10
# -Werror \
AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote.
#-fsanitize=address