File tree Expand file tree Collapse file tree 2 files changed +45
-3
lines changed Expand file tree Collapse file tree 2 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 107
107
' <dist_sharedir>/perl-5.36/perlexe.rc.tt' => ' win32/perlexe.rc' ,
108
108
' <dist_sharedir>/perl-5.36/perl_pr19663.diff' => ' *' ,
109
109
' <dist_sharedir>/perl-5.36/rt142390.patch' => ' *' ,
110
- ' <dist_sharedir>/perl-5.36/perl_pr20008.diff' => ' *' ,
110
+ ' <dist_sharedir>/perl-5.36/perl_pr20008.diff' => ' *' ,
111
+ ' <dist_sharedir>/perl-5.36/perl_pr20136.patch' => ' *' ,
111
112
' config_H.gc' => {
112
113
I_DBM => ' define' ,
113
114
I_GDBM => ' define' ,
114
115
I_NDBM => ' define' ,
115
- HAS_BUILTIN_EXPECT => ' define' ,
116
+ # HAS_BUILTIN_EXPECT => 'define',
116
117
HAS_BUILTIN_CHOOSE_EXPR => ' define' ,
117
118
},
118
119
' config.gc' => { # see Step.pm for list of default updates
119
120
d_builtin_choose_expr => ' define' ,
120
- d_builtin_expect => ' define' ,
121
+ # d_builtin_expect => 'define',
121
122
d_mkstemp => ' define' ,
122
123
d_ndbm => ' define' ,
123
124
i_db => ' define' ,
Original file line number Diff line number Diff line change
1
+ From cc51139c88a245c5942733f231181798cd3b310f Mon Sep 17 00:00:00 2001
2
+ From: Kenneth Olwing <
[email protected] >
3
+ Date: Thu, 25 Aug 2022 18:48:26 +0200
4
+ Subject: [PATCH] Change optimization level for Win32 builds
5
+
6
+ This fixes #20136.
7
+
8
+ Building on Windows 11 with the Strawberry 5.32.1 (gcc 8.3.0) toolchain,
9
+ multiple errors in the tests are seen. Worse, building on Windows 10
10
+ no test errors crop up, but the resulting perl will still crash and die
11
+ when run the tests manually on Windows 11.
12
+
13
+ Changing the optimization level to -Os as found in #20024, the build now
14
+ and tests now succeed.
15
+ ---
16
+ win32/GNUmakefile | 9 +++++++--
17
+ 1 file changed, 7 insertions(+), 2 deletions(-)
18
+
19
+ diff --git a/win32/GNUmakefile b/win32/GNUmakefile
20
+ index 7b91d35ab004..81ded707b946 100644
21
+ --- a/win32/GNUmakefile
22
+ +++ b/win32/GNUmakefile
23
+ @@ -608,11 +608,16 @@ LIBFILES += -lquadmath
24
+ endif
25
+
26
+ ifeq ($(CFG),Debug)
27
+ - OPTIMIZE = -g -O2
28
+ + # According to https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Optimize-Options.html
29
+ + # -Og should provide some optimizations while still giving convenient debugging
30
+ + OPTIMIZE = -g -Og
31
+ LINK_DBG = -g
32
+ DEFINES += -DDEBUGGING
33
+ else
34
+ - OPTIMIZE = -O2
35
+ + # In https://github.com/Perl/perl5/issues/20081 it is found that the previous
36
+ + # optimization level -O2 causes generated code that fails in mysterious ways
37
+ + # when run on Win11 (*even* if it was built and successfully tested on Win10!).
38
+ + OPTIMIZE = -Os
39
+ LINK_DBG = -s
40
+ endif
41
+
You can’t perform that action at this time.
0 commit comments