This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
HP-UX release wider match; also drop gcc opt level.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 24 Jun 2014 12:46:58 +0000 (08:46 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 24 Jun 2014 12:50:24 +0000 (08:50 -0400)
cpan/Digest-SHA/hints/hpux.pl

index e48609e..e1ad05d 100644 (file)
@@ -1,15 +1,25 @@
 # 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.
 #
-# This might turn out to be temporary, see:
+# Also gcc seems to have similar issues, so drop the opt also there.
+#
+# This was reported also at:
 # https://rt.cpan.org/Ticket/Display.html?id=96498
-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';
+# but the ticket was rejected since MSHELOR thinks Digest::SHA
+# is doing nothing wrong.
+if ($Config{ccversion} =~ /^B\.11\.*\./) {
+  if ($Config{cc} eq 'cc') {
+    if (defined $self->{OPTIMIZE}) {
+      $self->{OPTIMIZE} =~ s/\+O[2-9]/+O1/;
+      $self->{OPTIMIZE} =~ s/ \+Onolimit//;
+    } else {
+      $self->{OPTIMIZE} = '+O1';
+    }
+  } elsif ($Config{cc} =~ /gcc/) {
+    if (defined $self->{OPTIMIZE}) {
+      $self->{OPTIMIZE} =~ s/\-O[2-9]*/-O1/;
+    } else {
+      $self->{OPTIMIZE} = '-O1';
+    }
   }
 }