Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 402738 Details for
Bug 548094
dev-lang/perl-5.20.2 Errno module broken with GCC 5.1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
perl-5.20.2-gcc51.patch
perl-5.20.2-gcc51.patch (text/plain), 3.42 KB, created by
Ryan Hill (RETIRED)
on 2015-05-06 05:01:42 UTC
(
hide
)
Description:
perl-5.20.2-gcc51.patch
Filename:
MIME Type:
Creator:
Ryan Hill (RETIRED)
Created:
2015-05-06 05:01:42 UTC
Size:
3.42 KB
patch
obsolete
>Errno module is broken by preprocessor changes in GCC 5.1 >Fix integer overflow issue in h2ph > >https://bugs.gentoo.org/548094 >https://rt.perl.org/Public/Bug/Display.html?id=123784 >https://github.com/Perl/perl5/commit/816b056ffb99ae54642320e20dc30a59fd1effef >https://github.com/Perl/perl5/commit/3bea78d24634e630b610f59957e7a019205a67b2 > > >--- a/ext/Errno/Errno_pm.PL >+++ b/ext/Errno/Errno_pm.PL >@@ -225,20 +225,31 @@ sub write_errno_pm { > { # BeOS (support now removed) did not enter this block > # invoke CPP and read the output > >+ my $inhibit_linemarkers = ''; >+ if ($Config{gccversion} =~ /\A(\d+)\./ and $1 >= 5) { >+ # GCC 5.0 interleaves expanded macros with line numbers breaking >+ # each line into multiple lines. RT#123784 >+ $inhibit_linemarkers = ' -P'; >+ } >+ > if ($^O eq 'VMS') { >- my $cpp = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}"; >+ my $cpp = "$Config{cppstdin} $Config{cppflags}" . >+ $inhibit_linemarkers . " $Config{cppminus}"; > $cpp =~ s/sys\$input//i; > open(CPPO,"$cpp errno.c |") or > die "Cannot exec $Config{cppstdin}"; > } elsif ($IsMSWin32 || $^O eq 'NetWare') { >- open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or >- die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'"; >+ my $cpp = "$Config{cpprun} $Config{cppflags}" . >+ $inhibit_linemarkers; >+ open(CPPO,"$cpp errno.c |") or >+ die "Cannot run '$cpp errno.c'"; > } elsif ($IsSymbian) { >- my $cpp = "gcc -E -I$ENV{SDK}\\epoc32\\include\\libc -"; >+ my $cpp = "gcc -E -I$ENV{SDK}\\epoc32\\include\\libc" . >+ $inhibit_linemarkers ." -"; > open(CPPO,"$cpp < errno.c |") > or die "Cannot exec $cpp"; > } else { >- my $cpp = default_cpp(); >+ my $cpp = default_cpp() . $inhibit_linemarkers; > open(CPPO,"$cpp < errno.c |") > or die "Cannot exec $cpp"; > } >--- a/utils/h2ph.PL >+++ b/utils/h2ph.PL >@@ -769,7 +769,7 @@ sub inc_dirs > sub build_preamble_if_necessary > { > # Increment $VERSION every time this function is modified: >- my $VERSION = 3; >+ my $VERSION = 4; > my $preamble = "$Dest_dir/_h2ph_pre.ph"; > > # Can we skip building the preamble file? >@@ -788,6 +788,11 @@ sub build_preamble_if_necessary > > open PREAMBLE, ">$preamble" or die "Cannot open $preamble: $!"; > print PREAMBLE "# This file was created by h2ph version $VERSION\n"; >+ # Prevent non-portable hex constants from warning. >+ # >+ # We still produce an overflow warning if we can't represent >+ # a hex constant as an integer. >+ print PREAMBLE "no warnings qw(portable);\n"; > > foreach (sort keys %define) { > if ($opt_D) { >@@ -814,6 +819,18 @@ DEFINE > # integer: > print PREAMBLE > "unless (defined &$_) { sub $_() { $1 } }\n\n"; >+ } elsif ($define{$_} =~ /^([+-]?0x[\da-f]+)U?L{0,2}$/i) { >+ # hex integer >+ # Special cased, since perl warns on hex integers >+ # that can't be represented in a UV. >+ # >+ # This way we get the warning at time of use, so the user >+ # only gets the warning if they happen to use this >+ # platform-specific definition. >+ my $code = $1; >+ $code = "hex('$code')" if length $code > 10; >+ print PREAMBLE >+ "unless (defined &$_) { sub $_() { $code } }\n\n"; > } elsif ($define{$_} =~ /^\w+$/) { > my $def = $define{$_}; > if ($isatype{$def}) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 548094
:
402380
| 402738