Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
perl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
staging
src-rhel
rpms
perl
Commits
6650735a
Commit
6650735a
authored
2 years ago
by
CentOS Sources
Browse files
Options
Downloads
Patches
Plain Diff
import perl-5.26.3-422.el8
parent
07c79c6d
Branches
c8s
Tags
imports/c8s/perl-5.26.3-422.el8
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SOURCES/perl-5.36.0-Add-definition-of-OPTIMIZE-to-.ph-files.patch
+39
-0
39 additions, 0 deletions
...perl-5.36.0-Add-definition-of-OPTIMIZE-to-.ph-files.patch
SPECS/perl.spec
+10
-1
10 additions, 1 deletion
SPECS/perl.spec
with
49 additions
and
1 deletion
SOURCES/perl-5.36.0-Add-definition-of-OPTIMIZE-to-.ph-files.patch
0 → 100644
+
39
−
0
View file @
6650735a
From 6d9d949fb4962e32636aee48a948081d8936d318 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Wed, 11 Jan 2023 09:12:18 +0100
Subject: [PATCH] Add definition of OPTIMIZE to .ph files
The fortify.h header includes a test to ensure that -O is used when
compiling with _FORTIFY_SOURCE, and the header looks for OPTIMIZE, which
is set by the compiler whenever -O is used. Perl translates this test
to the .ph file, but nothing ever sets OPTIMIZE. This causes a warning
for anything that uses features.ph.
_FORTIFY_SOURCE is defined in /usr/lib64/perl5/_h2ph_pre.ph which is
generated by h2ph. It uses value of @Config{'ccsymbols', 'cppsymbols',
'cppccsymbols'} which does not contain definition for OPTIMIZE.
The patch updated h2ph to add OPTIMIZE if -O is used.
---
utils/h2ph.PL | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index afa53c2..3950d11 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -865,6 +865,11 @@
sub _extract_cc_defines
my $allsymbols = join " ",
@Config{'ccsymbols', 'cppsymbols', 'cppccsymbols'};
+ # If optimizing -O2 is used, add the definition
+ if ($Config{'ccflags'} =~ /(?:\s+|^)-O([\d]+)(?:\s+|$)/) {
+ $allsymbols .= " __OPTIMIZE__=$1";
+ }
+
# Split compiler pre-definitions into 'key=value' pairs:
while ($allsymbols =~ /([^\s]+)=((\\\s|[^\s])+)/g) {
$define{$1} = $2;
--
2.39.0
This diff is collapsed.
Click to expand it.
SPECS/perl.spec
+
10
−
1
View file @
6650735a
...
...
@@ -81,7 +81,7 @@ License: GPL+ or Artistic
Epoch: %{perl_epoch}
Version: %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
Release: 42
1
%{?dist}
Release: 42
2
%{?dist}
Summary: Practical Extraction and Report Language
Url: http://www.perl.org/
Source0: http://www.cpan.org/src/5.0/perl-%{perl_version}.tar.bz2
...
...
@@ -321,6 +321,9 @@ Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li
# Link XS modules to libperl.so with EU::MM on Linux, bug #960048
Patch201: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch
# If optimizing -O is used, add the definition to .ph files, bug #2152012
Patch202: perl-5.36.0-Add-definition-of-OPTIMIZE-to-.ph-files.patch
# Update some of the bundled modules
# see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
...
...
@@ -2932,6 +2935,7 @@ Perl extension for Version Objects
%patch97 -p1
%patch200 -p1
%patch201 -p1
%patch202 -p1
%if !%{defined perl_bootstrap}
# Local patch tracking
...
...
@@ -2995,6 +2999,7 @@ perl -x patchlevel.h \
'RHEL Patch97: Fix a memory leak when compiling a regular expression with a non-word class (GH#17218)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
'Fedora Patch202: Add definition of OPTIMIZE to .ph files (bug #2152012)' \
%{nil}
%endif
...
...
@@ -5280,6 +5285,10 @@ popd
# Old changelog entries are preserved in CVS.
%changelog
* Wed Jan 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.26.3-422
- Add definition of OPTIMIZE to .ph files, if optimizing is used
(bug#2152012)
* Mon Oct 18 2021 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.26.3-421
- Fix a memory leak when compiling a regular expression with a non-word
class (bug #2014981)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment