Disable -fno-strict-overflow and enable some -Werror=

This commit is contained in:
thorkill 2015-06-30 19:06:17 +02:00
parent c67a956351
commit 3dc9542ec2
2 changed files with 16 additions and 2 deletions

View file

@ -142,7 +142,7 @@ dnl No -fstack-protector-all because it doesn't work on all platforms or archite
AC_ARG_ENABLE([hardening], AS_HELP_STRING([--disable-hardening], [disable compiler and linker hardening flags]))
AS_IF([test "x$enable_hardening" != "xno"],
[AX_CHECK_COMPILE_FLAG([-DFORTIFY_SOURCE=2], [CPPFLAGS="$CPPFLAGS -DFORTIFY_SOURCE=2"])
AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CPPFLAGS="$CPPFLAGS -fno-strict-overflow"])
dnl AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CPPFLAGS="$CPPFLAGS -fno-strict-overflow"])
AX_CHECK_COMPILE_FLAG([-fwrapv], [CPPFLAGS="$CPPFLAGS -fwrapv"])
case $host_os in
*mingw*)

View file

@ -198,5 +198,19 @@ if TUNEMU
LIBS += -lpcap
endif
AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote.
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=unused-parameter \
-Werror=missing-variable-declarations \
-Wno-conversion \
-Wno-date-time \
-Wno-shadow \
-Wno-vla \
-Wno-unused-macros \
-Wno-cast-qual \
-ferror-limit=10
# -Werror \
#-fsanitize=address