786cc2 import perl-5.32.1-480.el9

Authored and Committed by centosrcm 2 years ago
    import perl-5.32.1-480.el9
    
        
SOURCES/perl-5.36.0-Add-definition-of-OPTIMIZE-to-.ph-files.patch ADDED
@@ -0,0 +1,39 @@
1
+ From 6d9d949fb4962e32636aee48a948081d8936d318 Mon Sep 17 00:00:00 2001
2
+ From: Jitka Plesnikova <jplesnik@redhat.com>
3
+ Date: Wed, 11 Jan 2023 09:12:18 +0100
4
+ Subject: [PATCH] Add definition of OPTIMIZE to .ph files
5
+
6
+ The fortify.h header includes a test to ensure that -O is used when
7
+ compiling with _FORTIFY_SOURCE, and the header looks for OPTIMIZE, which
8
+ is set by the compiler whenever -O is used. Perl translates this test
9
+ to the .ph file, but nothing ever sets OPTIMIZE. This causes a warning
10
+ for anything that uses features.ph.
11
+
12
+ _FORTIFY_SOURCE is defined in /usr/lib64/perl5/_h2ph_pre.ph which is
13
+ generated by h2ph. It uses value of @Config{'ccsymbols', 'cppsymbols',
14
+ 'cppccsymbols'} which does not contain definition for OPTIMIZE.
15
+
16
+ The patch updated h2ph to add OPTIMIZE if -O is used.
17
+ ---
18
+ utils/h2ph.PL | 5 +++++
19
+ 1 file changed, 5 insertions(+)
20
+
21
+ diff --git a/utils/h2ph.PL b/utils/h2ph.PL
22
+ index afa53c2..3950d11 100644
23
+ --- a/utils/h2ph.PL
24
+ +++ b/utils/h2ph.PL
25
+ @@ -865,6 +865,11 @@ sub _extract_cc_defines
26
+ my $allsymbols = join " ",
27
+ @Config{'ccsymbols', 'cppsymbols', 'cppccsymbols'};
28
+
29
+ + # If optimizing -O2 is used, add the definition
30
+ + if ($Config{'ccflags'} =~ /(?:\s+|^)-O([\d]+)(?:\s+|$)/) {
31
+ + $allsymbols .= " __OPTIMIZE__=$1";
32
+ + }
33
+ +
34
+ # Split compiler pre-definitions into 'key=value' pairs:
35
+ while ($allsymbols =~ /([^\s]+)=((\\\s|[^\s])+)/g) {
36
+ $define{$1} = $2;
37
+ --
38
+ 2.39.0
39
+
file modified
+10 -1
SPECS/perl.spec CHANGED
@@ -100,7 +100,7 @@ License: GPL+ or Artistic
100
100
Epoch: %{perl_epoch}
101
101
Version: %{perl_version}
102
102
# release number must be even higher, because dual-lived modules will be broken otherwise
103
- Release: 479%{?dist}
103
+ Release: 480%{?dist}
104
104
Summary: Practical Extraction and Report Language
105
105
Url: https://www.perl.org/
106
106
Source0: https://www.cpan.org/src/5.0/perl-%{perl_version}.tar.xz
@@ -286,6 +286,9 @@ Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li
286
286
# Link XS modules to libperl.so with EU::MM on Linux, bug #960048
287
287
Patch201: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch
288
288
289
+ # If optimizing -O is used, add the definition to .ph files, bug #2159759
290
+ Patch202: perl-5.36.0-Add-definition-of-OPTIMIZE-to-.ph-files.patch
291
+
289
292
# Update some of the bundled modules
290
293
# see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
291
294
@@ -4342,6 +4345,7 @@ you're not running VMS, this module does nothing.
4342
4345
%patch58 -p1
4343
4346
%patch200 -p1
4344
4347
%patch201 -p1
4348
+ %patch202 -p1
4345
4349
4346
4350
%if !%{defined perl_bootstrap}
4347
4351
# Local patch tracking
@@ -4399,6 +4403,7 @@ perl -x patchlevel.h \
4399
4403
'Fedora Patch57: Fix an arithmetic left shift of a minimal integer value (GH#18639)' \
4400
4404
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
4401
4405
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
4406
+ 'Fedora Patch202: Add definition of OPTIMIZE to .ph files (bug #2159759)' \
4402
4407
%{nil}
4403
4408
%endif
4404
4409
@@ -7171,6 +7176,10 @@ popd
7171
7176
7172
7177
# Old changelog entries are preserved in CVS.
7173
7178
%changelog
7179
+ * Wed Jan 18 2023 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.32.1-480
7180
+ - Add definition of OPTIMIZE to .ph files, if optimizing is used
7181
+ (bug#2159759)
7182
+
7174
7183
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4:5.32.1-479
7175
7184
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
7176
7185
Related: rhbz#1991688