From 4cb5cdb67d64375cc803491476032952c03fdd43 Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Mon, 30 Oct 2017 03:19:56 -0700
Subject: [PATCH 3/3] Do-Not-Apply: Remove -fwrapv.

---
 configure    | 36 ------------------------------------
 configure.in |  2 --
 2 files changed, 38 deletions(-)

diff --git a/configure b/configure
index f66899488cc..6040fd4ee6e 100755
--- a/configure
+++ b/configure
@@ -4633,42 +4633,6 @@ if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
   CFLAGS="$CFLAGS -fno-strict-aliasing"
 fi
 
-  # Disable optimizations that assume no overflow; needed for gcc 4.3+
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
-$as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
-if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -fwrapv"
-ac_save_c_werror_flag=$ac_c_werror_flag
-ac_c_werror_flag=yes
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  pgac_cv_prog_cc_cflags__fwrapv=yes
-else
-  pgac_cv_prog_cc_cflags__fwrapv=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_c_werror_flag=$ac_save_c_werror_flag
-CFLAGS="$pgac_save_CFLAGS"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
-  CFLAGS="$CFLAGS -fwrapv"
-fi
-
   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
diff --git a/configure.in b/configure.in
index edf1dd2e7b8..3a3440f8550 100644
--- a/configure.in
+++ b/configure.in
@@ -427,8 +427,6 @@ if test "$GCC" = yes -a "$ICC" = no; then
   PGAC_PROG_CC_CFLAGS_OPT([-Wformat-security])
   # Disable strict-aliasing rules; needed for gcc 3.3+
   PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
-  # Disable optimizations that assume no overflow; needed for gcc 4.3+
-  PGAC_PROG_CC_CFLAGS_OPT([-fwrapv])
   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
   PGAC_PROG_CC_CFLAGS_OPT([-fexcess-precision=standard])
   # Optimization flags for specific files that benefit from vectorization
-- 
2.14.1.536.g6867272d5b.dirty

