summaryrefslogtreecommitdiff
path: root/lang/perl5.16/files
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-03-09 14:26:34 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-03-09 14:26:34 +0000
commit0a449ca9e21fe705916bedc14f6b023b78bada8b (patch)
treec0ae0ab788da174b23df694b4faf60ebd7afca16 /lang/perl5.16/files
parentFix build on i386. (diff)
Add an upstream patch fixing build with gcc5.
Submitted by: marino Sponsored by: Absolight
Notes
Notes: svn path=/head/; revision=380849
Diffstat (limited to 'lang/perl5.16/files')
-rw-r--r--lang/perl5.16/files/patch-ext_Errno_Errno__pm.PL39
1 files changed, 39 insertions, 0 deletions
diff --git a/lang/perl5.16/files/patch-ext_Errno_Errno__pm.PL b/lang/perl5.16/files/patch-ext_Errno_Errno__pm.PL
new file mode 100644
index 000000000000..88f40d765156
--- /dev/null
+++ b/lang/perl5.16/files/patch-ext_Errno_Errno__pm.PL
@@ -0,0 +1,39 @@
+--- ext/Errno/Errno_pm.PL.orig 2013-03-04 15:16:22 UTC
++++ ext/Errno/Errno_pm.PL
+@@ -242,20 +242,31 @@ sub write_errno_pm {
+ unless ($^O eq 'beos') { # trust what we have / get later
+ # 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";
+ }