This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Drop debugging, and handle HP-UX opt flags.
[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.
55149fe1 3# Also gcc seems to have similar issues, so drop the opt also there.
65cd38a7 4# Modern HP-UX cc:s understand -On, so our task is easier.
55149fe1
JH
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.
65cd38a7 10if (defined $self->{OPTIMIZE}) {
a312a431 11 $self->{OPTIMIZE} =~ s/ \+O[a-z_]+(?:=[\w,]+)?//; # Drop HP-UX +Onolimit etc.
65cd38a7
JH
12 # This will turn -O0 to -O1, but we will burn that bridge when we cross it.
13 $self->{OPTIMIZE} =~ s/[\+\-]O[0-9]*/-O1/;
65cd38a7
JH
14} else {
15 $self->{OPTIMIZE} = '-O1';
960d7aa9 16}