From fbb62fa80e6edb7a757f631e98cb61798f9f8a7e Mon Sep 17 00:00:00 2001 From: thorkill Date: Tue, 30 Jun 2015 23:20:31 +0200 Subject: [PATCH] Make proper checks in configure now compiles with gcc 5.1.0 --- configure.ac | 16 ++++++++++++++++ src/Makefile.am | 15 +-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 747a3f89..e4dc828a 100644 --- a/configure.ac +++ b/configure.ac @@ -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"]) diff --git a/src/Makefile.am b/src/Makefile.am index e3cefa5b..b2b4b013 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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