Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/perl/
Date: Wed, 01 Sep 2021 00:49:07
Message-Id: 1630457335.176c1daa9c86574370fdf5ebfd23dd0edd163bdd.sam@gentoo
1 commit: 176c1daa9c86574370fdf5ebfd23dd0edd163bdd
2 Author: Jeremi Piotrowski <jpiotrowski <AT> microsoft <DOT> com>
3 AuthorDate: Tue Aug 31 08:49:06 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 1 00:48:55 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=176c1daa
7
8 dev-lang/perl: append required cflags when x-compiling
9
10 The cross-build system wants to append cflags required by the build to the
11 'optimize' variable, but doesn't touch the variable when the user overrides it.
12 Since the ebuild passes '-Doptimize="${CFLAGS}"', we are responsible for
13 passing the correct flags, so append '-fwrapv -fno-strict-aliasing' to cflags
14 when we are cross-compiling.
15
16 Bug: https://bugs.gentoo.org/811237
17 Reported-by: Github User DRKV333
18 Signed-off-by: Jeremi Piotrowski <jpiotrowski <AT> microsoft.com>
19 Closes: https://github.com/gentoo/gentoo/pull/22167
20 Signed-off-by: Sam James <sam <AT> gentoo.org>
21
22 dev-lang/perl/perl-5.32.1.ebuild | 5 +++++
23 dev-lang/perl/perl-5.34.0-r1.ebuild | 5 +++++
24 dev-lang/perl/perl-5.34.0-r2.ebuild | 5 +++++
25 dev-lang/perl/perl-5.34.0.ebuild | 5 +++++
26 4 files changed, 20 insertions(+)
27
28 diff --git a/dev-lang/perl/perl-5.32.1.ebuild b/dev-lang/perl/perl-5.32.1.ebuild
29 index 149bcd1b624..97963cf4402 100644
30 --- a/dev-lang/perl/perl-5.32.1.ebuild
31 +++ b/dev-lang/perl/perl-5.32.1.ebuild
32 @@ -585,6 +585,11 @@ src_configure() {
33 myconf -DDEBUGGING=none
34 fi
35
36 + # modifying 'optimize' prevents cross configure script from appending required flags
37 + if tc-is-cross-compiler; then
38 + append-cflags "-fwrapv -fno-strict-aliasing"
39 + fi
40 +
41 # Autodiscover all old version directories, some of them will even be newer
42 # if you downgrade
43 if [[ -z ${PERL_OLDVERSEN} ]]; then
44
45 diff --git a/dev-lang/perl/perl-5.34.0-r1.ebuild b/dev-lang/perl/perl-5.34.0-r1.ebuild
46 index 6d709db3098..8f4017c8989 100644
47 --- a/dev-lang/perl/perl-5.34.0-r1.ebuild
48 +++ b/dev-lang/perl/perl-5.34.0-r1.ebuild
49 @@ -585,6 +585,11 @@ src_configure() {
50 myconf -DDEBUGGING=none
51 fi
52
53 + # modifying 'optimize' prevents cross configure script from appending required flags
54 + if tc-is-cross-compiler; then
55 + append-cflags "-fwrapv -fno-strict-aliasing"
56 + fi
57 +
58 # Autodiscover all old version directories, some of them will even be newer
59 # if you downgrade
60 if [[ -z ${PERL_OLDVERSEN} ]]; then
61
62 diff --git a/dev-lang/perl/perl-5.34.0-r2.ebuild b/dev-lang/perl/perl-5.34.0-r2.ebuild
63 index 37a81ddac84..2ec3fee9bfa 100644
64 --- a/dev-lang/perl/perl-5.34.0-r2.ebuild
65 +++ b/dev-lang/perl/perl-5.34.0-r2.ebuild
66 @@ -586,6 +586,11 @@ src_configure() {
67 myconf -DDEBUGGING=none
68 fi
69
70 + # modifying 'optimize' prevents cross configure script from appending required flags
71 + if tc-is-cross-compiler; then
72 + append-cflags "-fwrapv -fno-strict-aliasing"
73 + fi
74 +
75 # Autodiscover all old version directories, some of them will even be newer
76 # if you downgrade
77 if [[ -z ${PERL_OLDVERSEN} ]]; then
78
79 diff --git a/dev-lang/perl/perl-5.34.0.ebuild b/dev-lang/perl/perl-5.34.0.ebuild
80 index 6af9e5af88f..a9aa55e7376 100644
81 --- a/dev-lang/perl/perl-5.34.0.ebuild
82 +++ b/dev-lang/perl/perl-5.34.0.ebuild
83 @@ -582,6 +582,11 @@ src_configure() {
84 myconf -DDEBUGGING=none
85 fi
86
87 + # modifying 'optimize' prevents cross configure script from appending required flags
88 + if tc-is-cross-compiler; then
89 + append-cflags "-fwrapv -fno-strict-aliasing"
90 + fi
91 +
92 # Autodiscover all old version directories, some of them will even be newer
93 # if you downgrade
94 if [[ -z ${PERL_OLDVERSEN} ]]; then