⚙️ Regenerate/rename Dockerfiles and patches

Generate new Debian buster Dockerfiles and patches for Perls 5.26
through 5.30, and rename existing files to the new directory structure.
This commit is contained in:
Zak B. Elep 2019-07-18 14:03:14 +08:00
parent 55da8cbe45
commit 881b8c3329
120 changed files with 2324 additions and 0 deletions

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index e746fe3..335e968 100755
--- a/Configure
+++ b/Configure
@@ -4547,6 +4547,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 6f20c5e..684f369 100644 index 6f20c5e..684f369 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -536,3 +563,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a3ff285..4b54598 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -783,6 +783,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) {
@@ -800,6 +805,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index e746fe3..335e968 100755
--- a/Configure
+++ b/Configure
@@ -4547,6 +4547,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 6f20c5e..684f369 100644 index 6f20c5e..684f369 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -536,3 +563,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a3ff285..4b54598 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -783,6 +783,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) {
@@ -800,6 +805,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index e746fe3..335e968 100755
--- a/Configure
+++ b/Configure
@@ -4547,6 +4547,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 6f20c5e..684f369 100644 index 6f20c5e..684f369 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -536,3 +563,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a3ff285..4b54598 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -783,6 +783,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) {
@@ -800,6 +805,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index e746fe3..335e968 100755
--- a/Configure
+++ b/Configure
@@ -4547,6 +4547,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 6f20c5e..684f369 100644 index 6f20c5e..684f369 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -536,3 +563,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a3ff285..4b54598 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -783,6 +783,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) {
@@ -800,6 +805,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 01fa3c0..f986141 100755
--- a/Configure
+++ b/Configure
@@ -4570,6 +4570,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 124b8fc..670fabc 100644 index 124b8fc..670fabc 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -546,6 +573,19 @@ index e400dda..e25e31a 100755
### warn if we are going to skip long file names ### warn if we are going to skip long file names
if ($TOO_LONG) { if ($TOO_LONG) {
diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE}; diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE};
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 27dd7b9..947fae6 100755
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -41,7 +41,7 @@ $result = runperl( progfile => 'lib/h2ph.pht',
stderr => 1 );
like( $result, qr/syntax OK$/, "output compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.',"-w"],
prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
is( $result, '', "output free of warnings" );
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index 22a97eb..6eac035 100644 index 22a97eb..6eac035 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -618,3 +658,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index cd4b5a0..4820479 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -783,6 +783,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) {
@@ -800,6 +805,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 01fa3c0..f986141 100755
--- a/Configure
+++ b/Configure
@@ -4570,6 +4570,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 124b8fc..670fabc 100644 index 124b8fc..670fabc 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -546,6 +573,19 @@ index e400dda..e25e31a 100755
### warn if we are going to skip long file names ### warn if we are going to skip long file names
if ($TOO_LONG) { if ($TOO_LONG) {
diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE}; diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE};
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 27dd7b9..947fae6 100755
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -41,7 +41,7 @@ $result = runperl( progfile => 'lib/h2ph.pht',
stderr => 1 );
like( $result, qr/syntax OK$/, "output compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.',"-w"],
prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
is( $result, '', "output free of warnings" );
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index 22a97eb..6eac035 100644 index 22a97eb..6eac035 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -618,3 +658,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index cd4b5a0..4820479 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -783,6 +783,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) {
@@ -800,6 +805,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 01fa3c0..f986141 100755
--- a/Configure
+++ b/Configure
@@ -4570,6 +4570,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 124b8fc..670fabc 100644 index 124b8fc..670fabc 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -546,6 +573,19 @@ index e400dda..e25e31a 100755
### warn if we are going to skip long file names ### warn if we are going to skip long file names
if ($TOO_LONG) { if ($TOO_LONG) {
diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE}; diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE};
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 27dd7b9..947fae6 100755
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -41,7 +41,7 @@ $result = runperl( progfile => 'lib/h2ph.pht',
stderr => 1 );
like( $result, qr/syntax OK$/, "output compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.',"-w"],
prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
is( $result, '', "output free of warnings" );
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index 22a97eb..6eac035 100644 index 22a97eb..6eac035 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -618,3 +658,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index cd4b5a0..4820479 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -783,6 +783,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) {
@@ -800,6 +805,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 01fa3c0..f986141 100755
--- a/Configure
+++ b/Configure
@@ -4570,6 +4570,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 124b8fc..670fabc 100644 index 124b8fc..670fabc 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -546,6 +573,19 @@ index e400dda..e25e31a 100755
### warn if we are going to skip long file names ### warn if we are going to skip long file names
if ($TOO_LONG) { if ($TOO_LONG) {
diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE}; diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE};
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 27dd7b9..947fae6 100755
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -41,7 +41,7 @@ $result = runperl( progfile => 'lib/h2ph.pht',
stderr => 1 );
like( $result, qr/syntax OK$/, "output compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.',"-w"],
prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
is( $result, '', "output free of warnings" );
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index 22a97eb..6eac035 100644 index 22a97eb..6eac035 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -618,3 +658,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index cd4b5a0..4820479 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -783,6 +783,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) {
@@ -800,6 +805,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 3a8732b..1e390e0 100755
--- a/Configure
+++ b/Configure
@@ -4588,6 +4588,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t
index e400dda..e25e31a 100755 index e400dda..e25e31a 100755
--- a/cpan/Archive-Tar/t/02_methods.t --- a/cpan/Archive-Tar/t/02_methods.t
@ -534,6 +561,19 @@ index 89c6456..8659678 100644
} }
} }
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 27dd7b9..947fae6 100755
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -41,7 +41,7 @@ $result = runperl( progfile => 'lib/h2ph.pht',
stderr => 1 );
like( $result, qr/syntax OK$/, "output compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.',"-w"],
prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
is( $result, '', "output free of warnings" );
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index de26d84..52b0492 100644 index de26d84..52b0492 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -593,3 +633,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 8f56db4..7f0c987 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -789,6 +789,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) {
@@ -806,6 +811,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 3a8732b..1e390e0 100755
--- a/Configure
+++ b/Configure
@@ -4588,6 +4588,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t
index e400dda..e25e31a 100755 index e400dda..e25e31a 100755
--- a/cpan/Archive-Tar/t/02_methods.t --- a/cpan/Archive-Tar/t/02_methods.t
@ -534,6 +561,19 @@ index 89c6456..8659678 100644
} }
} }
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 27dd7b9..947fae6 100755
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -41,7 +41,7 @@ $result = runperl( progfile => 'lib/h2ph.pht',
stderr => 1 );
like( $result, qr/syntax OK$/, "output compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.',"-w"],
prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
is( $result, '', "output free of warnings" );
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index de26d84..52b0492 100644 index de26d84..52b0492 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -593,3 +633,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 8f56db4..7f0c987 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -789,6 +789,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) {
@@ -806,6 +811,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 3a8732b..1e390e0 100755
--- a/Configure
+++ b/Configure
@@ -4588,6 +4588,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t
index e400dda..e25e31a 100755 index e400dda..e25e31a 100755
--- a/cpan/Archive-Tar/t/02_methods.t --- a/cpan/Archive-Tar/t/02_methods.t
@ -534,6 +561,19 @@ index 89c6456..8659678 100644
} }
} }
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 27dd7b9..947fae6 100755
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -41,7 +41,7 @@ $result = runperl( progfile => 'lib/h2ph.pht',
stderr => 1 );
like( $result, qr/syntax OK$/, "output compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.',"-w"],
prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
is( $result, '', "output free of warnings" );
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index de26d84..52b0492 100644 index de26d84..52b0492 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -593,3 +633,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 8f56db4..7f0c987 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -789,6 +789,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) {
@@ -806,6 +811,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 3a8732b..1e390e0 100755
--- a/Configure
+++ b/Configure
@@ -4588,6 +4588,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t
index e400dda..e25e31a 100755 index e400dda..e25e31a 100755
--- a/cpan/Archive-Tar/t/02_methods.t --- a/cpan/Archive-Tar/t/02_methods.t
@ -534,6 +561,19 @@ index 89c6456..8659678 100644
} }
} }
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 27dd7b9..947fae6 100755
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -41,7 +41,7 @@ $result = runperl( progfile => 'lib/h2ph.pht',
stderr => 1 );
like( $result, qr/syntax OK$/, "output compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.',"-w"],
prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
is( $result, '', "output free of warnings" );
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index de26d84..52b0492 100644 index de26d84..52b0492 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -593,3 +633,38 @@ index 9bde518..45eb782 100755
# if the hash has already been populated with a significant amount # if the hash has already been populated with a significant amount
# of entries the number of mask bits can be higher # of entries the number of mask bits can be higher
my $keys = scalar keys %$hr; my $keys = scalar keys %$hr;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 8f56db4..7f0c987 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -789,6 +789,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) {
@@ -806,6 +811,18 @@ sub build_preamble_if_necessary
# 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+$/) {
print PREAMBLE
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 0bb5c4f..2e1c0b9 100755
--- a/Configure
+++ b/Configure
@@ -4588,6 +4588,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 56bc815..cf688be 100644 index 56bc815..cf688be 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -371,6 +398,19 @@ index d0ac9fa..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index 13a15b4..a564bb3 100644 index 13a15b4..a564bb3 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -386,3 +426,38 @@ index 13a15b4..a564bb3 100644
print "\nRunning Makefile.PL in $ext_dir\n"; print "\nRunning Makefile.PL in $ext_dir\n";
# Presumably this can be simplified # Presumably this can be simplified
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 4545d6d..605d9a0 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -790,6 +790,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) {
@@ -816,6 +821,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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 0bb5c4f..2e1c0b9 100755
--- a/Configure
+++ b/Configure
@@ -4588,6 +4588,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 56bc815..cf688be 100644 index 56bc815..cf688be 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -371,6 +398,19 @@ index d0ac9fa..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index 13a15b4..a564bb3 100644 index 13a15b4..a564bb3 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -386,3 +426,38 @@ index 13a15b4..a564bb3 100644
print "\nRunning Makefile.PL in $ext_dir\n"; print "\nRunning Makefile.PL in $ext_dir\n";
# Presumably this can be simplified # Presumably this can be simplified
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 4545d6d..605d9a0 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -790,6 +790,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) {
@@ -816,6 +821,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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 0bb5c4f..2e1c0b9 100755
--- a/Configure
+++ b/Configure
@@ -4588,6 +4588,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 56bc815..cf688be 100644 index 56bc815..cf688be 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -371,6 +398,19 @@ index d0ac9fa..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index 13a15b4..a564bb3 100644 index 13a15b4..a564bb3 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -386,3 +426,38 @@ index 13a15b4..a564bb3 100644
print "\nRunning Makefile.PL in $ext_dir\n"; print "\nRunning Makefile.PL in $ext_dir\n";
# Presumably this can be simplified # Presumably this can be simplified
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 4545d6d..605d9a0 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -790,6 +790,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) {
@@ -816,6 +821,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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 0bb5c4f..2e1c0b9 100755
--- a/Configure
+++ b/Configure
@@ -4588,6 +4588,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 56bc815..cf688be 100644 index 56bc815..cf688be 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -371,6 +398,19 @@ index d0ac9fa..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/make_ext.pl b/make_ext.pl diff --git a/make_ext.pl b/make_ext.pl
index 13a15b4..a564bb3 100644 index 13a15b4..a564bb3 100644
--- a/make_ext.pl --- a/make_ext.pl
@ -386,3 +426,38 @@ index 13a15b4..a564bb3 100644
print "\nRunning Makefile.PL in $ext_dir\n"; print "\nRunning Makefile.PL in $ext_dir\n";
# Presumably this can be simplified # Presumably this can be simplified
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 4545d6d..605d9a0 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -790,6 +790,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) {
@@ -816,6 +821,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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index fdbbf20..e517f41 100755
--- a/Configure
+++ b/Configure
@@ -4511,6 +4511,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 439f254..a324604 100644 index 439f254..a324604 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -357,3 +384,51 @@ index 688c68d..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a2d737b..9484d81 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index fdbbf20..e517f41 100755
--- a/Configure
+++ b/Configure
@@ -4511,6 +4511,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 439f254..a324604 100644 index 439f254..a324604 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -357,3 +384,51 @@ index 688c68d..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a2d737b..9484d81 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index fdbbf20..e517f41 100755
--- a/Configure
+++ b/Configure
@@ -4511,6 +4511,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 439f254..a324604 100644 index 439f254..a324604 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -357,3 +384,51 @@ index 688c68d..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a2d737b..9484d81 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index fdbbf20..e517f41 100755
--- a/Configure
+++ b/Configure
@@ -4511,6 +4511,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 439f254..a324604 100644 index 439f254..a324604 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -357,3 +384,51 @@ index 688c68d..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a2d737b..9484d81 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 30ab78a..19213f2 100755
--- a/Configure
+++ b/Configure
@@ -4520,6 +4520,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index b707911..2588f0b 100644 index b707911..2588f0b 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -340,3 +367,51 @@ index a148248..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a2d737b..9484d81 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 30ab78a..19213f2 100755
--- a/Configure
+++ b/Configure
@@ -4520,6 +4520,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index b707911..2588f0b 100644 index b707911..2588f0b 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -340,3 +367,51 @@ index a148248..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a2d737b..9484d81 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 30ab78a..19213f2 100755
--- a/Configure
+++ b/Configure
@@ -4520,6 +4520,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index b707911..2588f0b 100644 index b707911..2588f0b 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -340,3 +367,51 @@ index a148248..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a2d737b..9484d81 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -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}) {

View file

@ -1,3 +1,30 @@
diff --git a/Configure b/Configure
index 30ab78a..19213f2 100755
--- a/Configure
+++ b/Configure
@@ -4520,6 +4520,22 @@ case "$gccversion" in
$rm -f try try.*
esac
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+ case "$ccflags" in
+ *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+ *) ccflags="$ccflags -fwrapv" ;;
+ esac
+esac
+
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index b707911..2588f0b 100644 index b707911..2588f0b 100644
--- a/ext/Errno/Errno_pm.PL --- a/ext/Errno/Errno_pm.PL
@ -340,3 +367,51 @@ index a148248..a985a8e 100644
then then
if ldd $DBLIB | grep pthread >/dev/null if ldd $DBLIB | grep pthread >/dev/null
then then
diff --git a/lib/h2ph.t b/lib/h2ph.t
index 2b58f6a..64d9dc0 100644
--- a/lib/h2ph.t
+++ b/lib/h2ph.t
@@ -48,7 +48,7 @@ $result = runperl( progfile => '_h2ph_pre.ph',
stderr => 1 );
like( $result, qr/syntax OK$/, "preamble compiles");
-$result = runperl( switches => ["-w"],
+$result = runperl( switches => ['-I.', "-w"],
stderr => 1,
prog => <<'PROG' );
$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a2d737b..9484d81 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -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}) {

View file

@ -0,0 +1,29 @@
FROM buildpack-deps:buster
LABEL maintainer="Peter Martini <PeterCMartini@GMail.com>, Zak B. Elep <zakame@cpan.org>"
COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl
RUN true \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.26.3.tar.bz2 -o perl-5.26.3.tar.bz2 \
&& echo '9ff35a613213f29ab53975141af6825ae7d4408895538cac0922e47ab92a1477 *perl-5.26.3.tar.bz2' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.26.3.tar.bz2 -C /usr/src/perl \
&& rm perl-5.26.3.tar.bz2 \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Dusethreads -Duseshrplib -Dvendorprefix=/usr/local -des \
&& make -j$(nproc) \
&& TEST_JOBS=$(nproc) make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& true \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*
WORKDIR /root
CMD ["perl5.26.3","-de0"]

View file

@ -0,0 +1,29 @@
FROM buildpack-deps:buster
LABEL maintainer="Peter Martini <PeterCMartini@GMail.com>, Zak B. Elep <zakame@cpan.org>"
COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl
RUN true \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.26.3.tar.bz2 -o perl-5.26.3.tar.bz2 \
&& echo '9ff35a613213f29ab53975141af6825ae7d4408895538cac0922e47ab92a1477 *perl-5.26.3.tar.bz2' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.26.3.tar.bz2 -C /usr/src/perl \
&& rm perl-5.26.3.tar.bz2 \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Duseshrplib -Dvendorprefix=/usr/local -des \
&& make -j$(nproc) \
&& TEST_JOBS=$(nproc) make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& true \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*
WORKDIR /root
CMD ["perl5.26.3","-de0"]

View file

@ -0,0 +1,21 @@
diff --git a/hints/linux.sh b/hints/linux.sh
index 3f38ea0..a985a8e 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -178,6 +178,16 @@ case "$plibpth" in
;;
esac
+# For the musl libc, perl should #define _GNU_SOURCE. Otherwise, some
+# available functions, like memem, won't be used. See the discussion in
+# [perl #133760]. musl doesn't offer an easy way to identify it, but,
+# at least on alpine linux, the ldd --version output contains the
+# string 'musl.'
+case `ldd --version 2>&1` in
+ musl*) ccflags="$ccflags -D_GNU_SOURCE" ;;
+ *) ;;
+esac
+
# libquadmath is sometimes installed as gcc internal library,
# so contrary to our usual policy of *not* looking at gcc internal
# directories we now *do* look at them, in case they contain

View file

@ -0,0 +1,53 @@
FROM debian:buster-slim
LABEL maintainer="Peter Martini <PeterCMartini@GMail.com>, Zak B. Elep <zakame@cpan.org>"
COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
# cpio \
curl \
dpkg-dev \
# file \
gcc \
# g++ \
# libbz2-dev \
# libdb-dev \
libc6-dev \
# libgdbm-dev \
# liblzma-dev \
make \
netbase \
patch \
# procps \
# zlib1g-dev \
xz-utils \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.26.3.tar.bz2 -o perl-5.26.3.tar.bz2 \
&& echo '9ff35a613213f29ab53975141af6825ae7d4408895538cac0922e47ab92a1477 *perl-5.26.3.tar.bz2' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.26.3.tar.bz2 -C /usr/src/perl \
&& rm perl-5.26.3.tar.bz2 \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Dusethreads -Duseshrplib -Dvendorprefix=/usr/local -des \
&& make -j$(nproc) \
&& TEST_JOBS=$(nproc) make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& savedPackages="make netbase" \
&& apt-mark auto '.*' > /dev/null \
&& apt-mark manual $savedPackages \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -fr /var/cache/apt/* /var/lib/apt/lists/* \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*
WORKDIR /root
CMD ["perl5.26.3","-de0"]

View file

@ -0,0 +1,21 @@
diff --git a/hints/linux.sh b/hints/linux.sh
index 3f38ea0..a985a8e 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -178,6 +178,16 @@ case "$plibpth" in
;;
esac
+# For the musl libc, perl should #define _GNU_SOURCE. Otherwise, some
+# available functions, like memem, won't be used. See the discussion in
+# [perl #133760]. musl doesn't offer an easy way to identify it, but,
+# at least on alpine linux, the ldd --version output contains the
+# string 'musl.'
+case `ldd --version 2>&1` in
+ musl*) ccflags="$ccflags -D_GNU_SOURCE" ;;
+ *) ;;
+esac
+
# libquadmath is sometimes installed as gcc internal library,
# so contrary to our usual policy of *not* looking at gcc internal
# directories we now *do* look at them, in case they contain

View file

@ -0,0 +1,21 @@
diff --git a/hints/linux.sh b/hints/linux.sh
index 3f38ea0..a985a8e 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -178,6 +178,16 @@ case "$plibpth" in
;;
esac
+# For the musl libc, perl should #define _GNU_SOURCE. Otherwise, some
+# available functions, like memem, won't be used. See the discussion in
+# [perl #133760]. musl doesn't offer an easy way to identify it, but,
+# at least on alpine linux, the ldd --version output contains the
+# string 'musl.'
+case `ldd --version 2>&1` in
+ musl*) ccflags="$ccflags -D_GNU_SOURCE" ;;
+ *) ;;
+esac
+
# libquadmath is sometimes installed as gcc internal library,
# so contrary to our usual policy of *not* looking at gcc internal
# directories we now *do* look at them, in case they contain

View file

@ -0,0 +1,53 @@
FROM debian:buster-slim
LABEL maintainer="Peter Martini <PeterCMartini@GMail.com>, Zak B. Elep <zakame@cpan.org>"
COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
# cpio \
curl \
dpkg-dev \
# file \
gcc \
# g++ \
# libbz2-dev \
# libdb-dev \
libc6-dev \
# libgdbm-dev \
# liblzma-dev \
make \
netbase \
patch \
# procps \
# zlib1g-dev \
xz-utils \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.26.3.tar.bz2 -o perl-5.26.3.tar.bz2 \
&& echo '9ff35a613213f29ab53975141af6825ae7d4408895538cac0922e47ab92a1477 *perl-5.26.3.tar.bz2' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.26.3.tar.bz2 -C /usr/src/perl \
&& rm perl-5.26.3.tar.bz2 \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Duseshrplib -Dvendorprefix=/usr/local -des \
&& make -j$(nproc) \
&& TEST_JOBS=$(nproc) make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& savedPackages="make netbase" \
&& apt-mark auto '.*' > /dev/null \
&& apt-mark manual $savedPackages \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -fr /var/cache/apt/* /var/lib/apt/lists/* \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*
WORKDIR /root
CMD ["perl5.26.3","-de0"]

View file

@ -0,0 +1,21 @@
diff --git a/hints/linux.sh b/hints/linux.sh
index 3f38ea0..a985a8e 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -178,6 +178,16 @@ case "$plibpth" in
;;
esac
+# For the musl libc, perl should #define _GNU_SOURCE. Otherwise, some
+# available functions, like memem, won't be used. See the discussion in
+# [perl #133760]. musl doesn't offer an easy way to identify it, but,
+# at least on alpine linux, the ldd --version output contains the
+# string 'musl.'
+case `ldd --version 2>&1` in
+ musl*) ccflags="$ccflags -D_GNU_SOURCE" ;;
+ *) ;;
+esac
+
# libquadmath is sometimes installed as gcc internal library,
# so contrary to our usual policy of *not* looking at gcc internal
# directories we now *do* look at them, in case they contain

View file

@ -0,0 +1,29 @@
FROM buildpack-deps:buster
LABEL maintainer="Peter Martini <PeterCMartini@GMail.com>, Zak B. Elep <zakame@cpan.org>"
COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl
RUN true \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.28.2.tar.xz -o perl-5.28.2.tar.xz \
&& echo '0b0189bfa4b2da20e899b4bdd746ac402e8f746a58e4fcf5516484157f2aab07 *perl-5.28.2.tar.xz' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.28.2.tar.xz -C /usr/src/perl \
&& rm perl-5.28.2.tar.xz \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Dusethreads -Duseshrplib -Dvendorprefix=/usr/local -des \
&& make -j$(nproc) \
&& TEST_JOBS=$(nproc) make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& true \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*
WORKDIR /root
CMD ["perl5.28.2","-de0"]

View file

@ -0,0 +1,29 @@
FROM buildpack-deps:buster
LABEL maintainer="Peter Martini <PeterCMartini@GMail.com>, Zak B. Elep <zakame@cpan.org>"
COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl
RUN true \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.28.2.tar.xz -o perl-5.28.2.tar.xz \
&& echo '0b0189bfa4b2da20e899b4bdd746ac402e8f746a58e4fcf5516484157f2aab07 *perl-5.28.2.tar.xz' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.28.2.tar.xz -C /usr/src/perl \
&& rm perl-5.28.2.tar.xz \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Duseshrplib -Dvendorprefix=/usr/local -des \
&& make -j$(nproc) \
&& TEST_JOBS=$(nproc) make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& true \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*
WORKDIR /root
CMD ["perl5.28.2","-de0"]

View file

@ -0,0 +1,53 @@
FROM debian:buster-slim
LABEL maintainer="Peter Martini <PeterCMartini@GMail.com>, Zak B. Elep <zakame@cpan.org>"
COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
# cpio \
curl \
dpkg-dev \
# file \
gcc \
# g++ \
# libbz2-dev \
# libdb-dev \
libc6-dev \
# libgdbm-dev \
# liblzma-dev \
make \
netbase \
patch \
# procps \
# zlib1g-dev \
xz-utils \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.28.2.tar.xz -o perl-5.28.2.tar.xz \
&& echo '0b0189bfa4b2da20e899b4bdd746ac402e8f746a58e4fcf5516484157f2aab07 *perl-5.28.2.tar.xz' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.28.2.tar.xz -C /usr/src/perl \
&& rm perl-5.28.2.tar.xz \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Dusethreads -Duseshrplib -Dvendorprefix=/usr/local -des \
&& make -j$(nproc) \
&& TEST_JOBS=$(nproc) make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& savedPackages="make netbase" \
&& apt-mark auto '.*' > /dev/null \
&& apt-mark manual $savedPackages \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -fr /var/cache/apt/* /var/lib/apt/lists/* \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*
WORKDIR /root
CMD ["perl5.28.2","-de0"]

Some files were not shown because too many files have changed in this diff Show more