From 11ccb2051221b9f8d8ceb9932971b3138113ccce Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 25 Nov 2014 12:19:08 -0800 Subject: [PATCH] If -fno-strict-overflow is available, don't add -fwrapv --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a5d693a8..6fa6725e 100644 --- a/configure.ac +++ b/configure.ac @@ -161,9 +161,10 @@ AS_IF([test "$enable_pie" != "no"],[ ]) ]) -AX_CHECK_COMPILE_FLAG([-fwrapv], [CFLAGS="$CFLAGS -fwrapv"]) AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"]) -AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overflow"]) +AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overflow"], [ + AX_CHECK_COMPILE_FLAG([-fwrapv], [CFLAGS="$CFLAGS -fwrapv"]) +]) LIBTOOL_OLD_FLAGS="$LIBTOOL_EXTRA_FLAGS" LIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -version-info $SODIUM_LIBRARY_VERSION"