This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Lower the optimization on Digest-SHA for HP-UX cc.
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 19 Jun 2014 15:33:32 +0000 (11:33 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 19 Jun 2014 18:58:13 +0000 (14:58 -0400)
Upstream, but we are adding a platform specific hints file.

MANIFEST
cpan/Digest-SHA/hints/hpux.pl [new file with mode: 0644]

index dd8f08e..6cd6a75 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -683,6 +683,7 @@ cpan/Digest-MD5/t/md5-aaa.t         See if Digest::MD5 extension works
 cpan/Digest-MD5/t/threads.t            See if Digest::MD5 extension works
 cpan/Digest-MD5/t/utf8.t               See if Digest::MD5 extension works
 cpan/Digest-MD5/typemap                        Digest::MD5 extension
+cpan/Digest-SHA/hints/hpux.pl          Hint for HP-UX for named architecture
 cpan/Digest-SHA/lib/Digest/SHA.pm      Digest::SHA extension
 cpan/Digest-SHA/Makefile.PL            Digest::SHA Makefile.PL
 cpan/Digest-SHA/shasum                 shasum script
diff --git a/cpan/Digest-SHA/hints/hpux.pl b/cpan/Digest-SHA/hints/hpux.pl
new file mode 100644 (file)
index 0000000..942f223
--- /dev/null
@@ -0,0 +1,13 @@
+# With +O2 this HP-UX cc compiler creates code which coredumps (Bus error)
+# when running t/woodbury.t, but dropping to +O1 seems to dodge that.
+if ($Config{cc} eq 'cc' &&
+    $Config{archname} eq 'PA-RISC2.0' &&
+    $Config{ccversion} =~ /^B\.11\.11\./) {
+  if (defined $self->{OPTIMIZE}) {
+    $self->{OPTIMIZE} =~ s/\+O[2-9]/+O1/;
+    $self->{OPTIMIZE} =~ s/ \+Onolimit//;
+  } else {
+    $self->{OPTIMIZE} = '+O1';
+  }
+}
+