summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2021-05-10 16:18:03 +1000
committerRicardo Signes <rjbs@users.noreply.github.com>2021-05-14 21:33:12 -0400
commit1f6b8a94c5c1073cfe298589cbca99f92f7d197e (patch)
tree966030d264553a294a1b4d9ac17e39fa86cd0e79 /win32
parent1e43c13e1f81d5dd4edd27cd7a11a6a9ffe051a7 (diff)
downloadperl-1f6b8a94c5c1073cfe298589cbca99f92f7d197e.tar.gz
set -fwrapv on by default unconditionally
This was broken on gcc 10, and we want -fwrapv for all versions of gcc that we support. We also want a developer to be able to disable it easily (GCCWRAPV=undef) so it remains a flag rather than hard-coding -frwapv below.
Diffstat (limited to 'win32')
-rw-r--r--win32/GNUmakefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index a2cf641343..6150c8f0f7 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -583,10 +583,11 @@ MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
endif
-# If you are using GCC, 4.3 or later by default we add the -fwrapv option.
+# By default add -fwrapv, since we depend on 2's complement behaviour
+# for signed numbers.
# See https://github.com/Perl/perl5/issues/13690
#
-GCCWRAPV := $(shell if "$(GCCVER1)"=="4" (if "$(GCCVER2)" geq "3" echo define) else if "$(GCCVER1)" geq "5" (echo define))
+GCCWRAPV := define
ifeq ($(GCCWRAPV),define)
BUILDOPT += -fwrapv