This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
941382f9b91ea61720b6d484e37767b5e67c2063
[perl5.git] / cpan / Digest-SHA / hints / hpux.pl
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.
3 # Also gcc seems to have similar issues, so drop the opt also there.
4 # Modern HP-UX cc:s understand -On, so our task is easier.
5 #
6 # This was reported also at:
7 # https://rt.cpan.org/Ticket/Display.html?id=96498
8 # but the ticket was rejected since MSHELOR thinks Digest::SHA
9 # is doing nothing wrong.
10 if (defined $self->{OPTIMIZE}) {
11   # This will turn -O0 to -O1, but we will burn that bridge when we cross it.
12   $self->{OPTIMIZE} =~ s/[\+\-]O[0-9]*/-O1/;
13   $self->{OPTIMIZE} =~ s/NO_OPT/-O0/;
14   $self->{OPTIMIZE} =~ s/ \+Onolimit//;
15 } else {
16   $self->{OPTIMIZE} = '-O1';
17 }