Skip to content

set -fwrapv on by default unconditionally#18782

Merged
rjbs merged 1 commit intoPerl:bleadfrom
tonycoz:win32-default-gcc-wrapv
May 15, 2021
Merged

set -fwrapv on by default unconditionally#18782
rjbs merged 1 commit intoPerl:bleadfrom
tonycoz:win32-default-gcc-wrapv

Conversation

@tonycoz
Copy link
Copy Markdown
Contributor

@tonycoz tonycoz commented May 11, 2021

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.

fixes #18739

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.
@tonycoz
Copy link
Copy Markdown
Contributor Author

tonycoz commented May 12, 2021

C:\Users\Tony\dev\perl\git\perl\win32>gmake -j3 CCTYPE=GCC CCHOME=c:\strawberry-perl-5.30.1.1-64bit-portable\c TEST_JOBS=3 GCCWRAPV=undef ..\toke.o
gcc -c -I..  -I.\include -I. -I.. -DWIN32 -DWIN64 -DPERLDLL -DPERL_CORE -s -O2  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fno-strict-aliasing -mms-bitfields -o..\toke.o  ..\toke.c

C:\Users\Tony\dev\perl\git\perl\win32>del ..\toke.o

C:\Users\Tony\dev\perl\git\perl\win32>gmake -j3 CCTYPE=GCC CCHOME=c:\strawberry-perl-5.30.1.1-64bit-portable\c TEST_JOBS=3 GCCWRAPV=define ..\toke.o
gcc -c -I..  -I.\include -I. -I.. -DWIN32 -DWIN64 -DPERLDLL -DPERL_CORE -s -O2  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -o..\toke.o  ..\toke.c

C:\Users\Tony\dev\perl\git\perl\win32>del ..\toke.o

C:\Users\Tony\dev\perl\git\perl\win32>gmake -j3 CCTYPE=GCC CCHOME=c:\strawberry-perl-5.30.1.1-64bit-portable\c TEST_JOBS=3 ..\toke.o
gcc -c -I..  -I.\include -I. -I.. -DWIN32 -DWIN64 -DPERLDLL -DPERL_CORE -s -O2  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -o..\toke.o  ..\toke.c

show it works

@nwc10
Copy link
Copy Markdown
Contributor

nwc10 commented May 12, 2021

Thanks. This is better - both future proof, and gives an escape hatch if there is still anyone who insists on using those ancient compilers instead of upgrading

Same plan:

  • Someone else builds this locally, confirms that it works both ways, says yes
  • No-one says "no" or "hang on" within a day or so

and then fast-forward blead

?

@xenu
Copy link
Copy Markdown
Member

xenu commented May 14, 2021

LGTM

@rjbs rjbs merged commit 1f6b8a9 into Perl:blead May 15, 2021
@rjbs
Copy link
Copy Markdown
Member

rjbs commented May 15, 2021

Merged as per discussion with Nicholas y Neil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Win32] "-fwrapv" disappears from ccflags with gcc version 10.

4 participants