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.
[perl5.git] / cpan / Digest-SHA / hints / hpux.pl
CommitLineData
960d7aa9
JH
1# With +O2 this HP-UX cc compiler creates code which coredumps (Bus error)
2# when running t/woodbury.t, but dropping to +O1 seems to dodge that.
4f893e61 3#
55149fe1
JH
4# Also gcc seems to have similar issues, so drop the opt also there.
5#
6# This was reported also at:
4f893e61 7# https://rt.cpan.org/Ticket/Display.html?id=96498
55149fe1
JH
8# but the ticket was rejected since MSHELOR thinks Digest::SHA
9# is doing nothing wrong.
10if ($Config{ccversion} =~ /^B\.11\.*\./) {
11 if ($Config{cc} eq 'cc') {
12 if (defined $self->{OPTIMIZE}) {
13 $self->{OPTIMIZE} =~ s/\+O[2-9]/+O1/;
14 $self->{OPTIMIZE} =~ s/ \+Onolimit//;
15 } else {
16 $self->{OPTIMIZE} = '+O1';
17 }
18 } elsif ($Config{cc} =~ /gcc/) {
19 if (defined $self->{OPTIMIZE}) {
20 $self->{OPTIMIZE} =~ s/\-O[2-9]*/-O1/;
21 } else {
22 $self->{OPTIMIZE} = '-O1';
23 }
960d7aa9
JH
24 }
25}