Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/perl/files/, dev-lang/perl/
Date: Sun, 30 Dec 2018 21:26:59
Message-Id: 1546205198.e576790a512945d1884868c55e87721b4d75b56b.dilfridge@gentoo
1 commit: e576790a512945d1884868c55e87721b4d75b56b
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 30 21:26:22 2018 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 30 21:26:38 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e576790a
7
8 dev-lang/perl: Add hppa workaround, bug 634162
9
10 Patch from Debian, see https://bugs.debian.org/869122
11
12 Closes: https://bugs.gentoo.org/634162
13 Package-Manager: Portage-2.3.53, Repoman-2.3.12
14 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
15
16 dev-lang/perl/files/perl-5.26.2-hppa.patch | 105 +++++++++++++++++++++++++++++
17 dev-lang/perl/perl-5.26.2.ebuild | 4 ++
18 dev-lang/perl/perl-5.26.9999.ebuild | 4 ++
19 dev-lang/perl/perl-5.28.0.ebuild | 4 ++
20 dev-lang/perl/perl-5.28.9999.ebuild | 4 ++
21 5 files changed, 121 insertions(+)
22
23 diff --git a/dev-lang/perl/files/perl-5.26.2-hppa.patch b/dev-lang/perl/files/perl-5.26.2-hppa.patch
24 new file mode 100644
25 index 00000000000..83ed944353e
26 --- /dev/null
27 +++ b/dev-lang/perl/files/perl-5.26.2-hppa.patch
28 @@ -0,0 +1,105 @@
29 +https://bugs.gentoo.org/634162
30 +
31 +Source:
32 +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869122
33 +
34 +Index: perl-5.26.0/op.c
35 +===================================================================
36 +--- perl-5.26.0.orig/op.c
37 ++++ perl-5.26.0/op.c
38 +@@ -14832,6 +14832,7 @@ Perl_custom_op_get_field(pTHX_ const OP
39 + SV *keysv;
40 + HE *he = NULL;
41 + XOP *xop;
42 ++ XOPRETANY any;
43 +
44 + static const XOP xop_null = { 0, 0, 0, 0, 0 };
45 +
46 +@@ -14874,58 +14875,37 @@ Perl_custom_op_get_field(pTHX_ const OP
47 + else
48 + xop = INT2PTR(XOP *, SvIV(HeVAL(he)));
49 + }
50 +- {
51 +- XOPRETANY any;
52 +- if(field == XOPe_xop_ptr) {
53 +- any.xop_ptr = xop;
54 +- } else {
55 +- const U32 flags = XopFLAGS(xop);
56 +- if(flags & field) {
57 +- switch(field) {
58 +- case XOPe_xop_name:
59 +- any.xop_name = xop->xop_name;
60 +- break;
61 +- case XOPe_xop_desc:
62 +- any.xop_desc = xop->xop_desc;
63 +- break;
64 +- case XOPe_xop_class:
65 +- any.xop_class = xop->xop_class;
66 +- break;
67 +- case XOPe_xop_peep:
68 +- any.xop_peep = xop->xop_peep;
69 +- break;
70 +- default:
71 +- NOT_REACHED; /* NOTREACHED */
72 +- break;
73 +- }
74 +- } else {
75 +- switch(field) {
76 +- case XOPe_xop_name:
77 +- any.xop_name = XOPd_xop_name;
78 +- break;
79 +- case XOPe_xop_desc:
80 +- any.xop_desc = XOPd_xop_desc;
81 +- break;
82 +- case XOPe_xop_class:
83 +- any.xop_class = XOPd_xop_class;
84 +- break;
85 +- case XOPe_xop_peep:
86 +- any.xop_peep = XOPd_xop_peep;
87 +- break;
88 +- default:
89 +- NOT_REACHED; /* NOTREACHED */
90 +- break;
91 +- }
92 +- }
93 ++
94 ++ if(field == XOPe_xop_ptr) {
95 ++ any.xop_ptr = xop;
96 ++ } else {
97 ++ const U32 flags = XopFLAGS(xop);
98 ++ switch(field) {
99 ++ case XOPe_xop_name:
100 ++ any.xop_name = (flags & field) ? xop->xop_name : XOPd_xop_name;
101 ++ break;
102 ++ case XOPe_xop_desc:
103 ++ any.xop_desc = (flags & field) ? xop->xop_desc : XOPd_xop_desc;
104 ++ break;
105 ++ case XOPe_xop_class:
106 ++ any.xop_class = (flags & field) ? xop->xop_class : XOPd_xop_class;
107 ++ break;
108 ++ case XOPe_xop_peep:
109 ++ any.xop_peep = (flags & field) ? xop->xop_peep : XOPd_xop_peep;
110 ++ break;
111 ++ default:
112 ++ NOT_REACHED; /* NOTREACHED */
113 ++ break;
114 + }
115 +- /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
116 +- * op.c: In function 'Perl_custom_op_get_field':
117 +- * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
118 +- * This is because on those platforms (with -DEBUGGING) NOT_REACHED
119 +- * expands to assert(0), which expands to ((0) ? (void)0 :
120 +- * __assert(...)), and gcc doesn't know that __assert can never return. */
121 +- return any;
122 + }
123 ++
124 ++ /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
125 ++ * op.c: In function 'Perl_custom_op_get_field':
126 ++ * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
127 ++ * This is because on those platforms (with -DEBUGGING) NOT_REACHED
128 ++ * expands to assert(0), which expands to ((0) ? (void)0 :
129 ++ * __assert(...)), and gcc doesn't know that __assert can never return. */
130 ++ return any;
131 + }
132 +
133 + /*
134
135 diff --git a/dev-lang/perl/perl-5.26.2.ebuild b/dev-lang/perl/perl-5.26.2.ebuild
136 index e2af84bf47d..3efe8267e5b 100644
137 --- a/dev-lang/perl/perl-5.26.2.ebuild
138 +++ b/dev-lang/perl/perl-5.26.2.ebuild
139 @@ -307,6 +307,10 @@ src_prepare() {
140 local patch
141 EPATCH_OPTS+=" -p1"
142
143 + if use hppa ; then
144 + epatch "${FILESDIR}/${PN}-5.26.2-hppa.patch" # bug 634162
145 + fi
146 +
147 if [[ ${CHOST} == *-solaris* ]] ; then
148 # do NOT mess with nsl, on Solaris this is always necessary,
149 # when -lsocket is used e.g. to get h_errno
150
151 diff --git a/dev-lang/perl/perl-5.26.9999.ebuild b/dev-lang/perl/perl-5.26.9999.ebuild
152 index e2af84bf47d..3efe8267e5b 100644
153 --- a/dev-lang/perl/perl-5.26.9999.ebuild
154 +++ b/dev-lang/perl/perl-5.26.9999.ebuild
155 @@ -307,6 +307,10 @@ src_prepare() {
156 local patch
157 EPATCH_OPTS+=" -p1"
158
159 + if use hppa ; then
160 + epatch "${FILESDIR}/${PN}-5.26.2-hppa.patch" # bug 634162
161 + fi
162 +
163 if [[ ${CHOST} == *-solaris* ]] ; then
164 # do NOT mess with nsl, on Solaris this is always necessary,
165 # when -lsocket is used e.g. to get h_errno
166
167 diff --git a/dev-lang/perl/perl-5.28.0.ebuild b/dev-lang/perl/perl-5.28.0.ebuild
168 index a88e2d54acf..13cbdc3c005 100644
169 --- a/dev-lang/perl/perl-5.28.0.ebuild
170 +++ b/dev-lang/perl/perl-5.28.0.ebuild
171 @@ -307,6 +307,10 @@ src_prepare() {
172 local patch
173 EPATCH_OPTS+=" -p1"
174
175 + if use hppa ; then
176 + epatch "${FILESDIR}/${PN}-5.26.2-hppa.patch" # bug 634162
177 + fi
178 +
179 if [[ ${CHOST} == *-solaris* ]] ; then
180 # do NOT mess with nsl, on Solaris this is always necessary,
181 # when -lsocket is used e.g. to get h_errno
182
183 diff --git a/dev-lang/perl/perl-5.28.9999.ebuild b/dev-lang/perl/perl-5.28.9999.ebuild
184 index a88e2d54acf..13cbdc3c005 100644
185 --- a/dev-lang/perl/perl-5.28.9999.ebuild
186 +++ b/dev-lang/perl/perl-5.28.9999.ebuild
187 @@ -307,6 +307,10 @@ src_prepare() {
188 local patch
189 EPATCH_OPTS+=" -p1"
190
191 + if use hppa ; then
192 + epatch "${FILESDIR}/${PN}-5.26.2-hppa.patch" # bug 634162
193 + fi
194 +
195 if [[ ${CHOST} == *-solaris* ]] ; then
196 # do NOT mess with nsl, on Solaris this is always necessary,
197 # when -lsocket is used e.g. to get h_errno