From: Guus Sliepen Date: Sun, 5 Jul 2015 14:03:03 +0000 (+0200) Subject: Only check for -fno-strict-overflow if -fwrapv does not work. X-Git-Tag: release-1.0.26~3 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=0cae9098754d1414844ba2cdb575d80619516dc0;p=tinc Only check for -fno-strict-overflow if -fwrapv does not work. --- diff --git a/configure.ac b/configure.ac index 49ae80ef..b47a6a32 100644 --- a/configure.ac +++ b/configure.ac @@ -135,8 +135,8 @@ 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"]) - AX_CHECK_COMPILE_FLAG([-fwrapv], [CPPFLAGS="$CPPFLAGS -fwrapv"]) + AX_CHECK_COMPILE_FLAG([-fwrapv], [CPPFLAGS="$CPPFLAGS -fwrapv"], + AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CPPFLAGS="$CPPFLAGS -fno-strict-overflow"])) case $host_os in *mingw*) AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"])