From: Jarkko Hietaniemi Date: Fri, 22 Aug 2003 12:14:14 +0000 (+0000) Subject: Lower Storable.xs optimization to -O2 on certain X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb81493d5a45ab2db637176c202a1469d2cd75b7;p=p5sagit%2Fp5-mst-13.2.git Lower Storable.xs optimization to -O2 on certain known platforms. p4raw-id: //depot/perl@20825 --- diff --git a/MANIFEST b/MANIFEST index 47d7111..6e5ab39 100644 --- a/MANIFEST +++ b/MANIFEST @@ -638,6 +638,7 @@ ext/Socket/Socket.xs Socket extension external subroutines ext/Socket/t/socketpair.t See if socketpair works ext/Socket/t/Socket.t See if Socket works ext/Storable/ChangeLog Storable extension +ext/Storable/hints/linux.pl Hint for Storable for named architecture ext/Storable/Makefile.PL Storable extension ext/Storable/MANIFEST Storable extension ext/Storable/README Storable extension diff --git a/ext/Storable/hints/linux.pl b/ext/Storable/hints/linux.pl new file mode 100644 index 0000000..6401081 --- /dev/null +++ b/ext/Storable/hints/linux.pl @@ -0,0 +1,12 @@ +# gcc -O3 (and higher) can cause Storable.xs to produce code that +# dumps core immediately in recurse.t and retrieve.t, in is_storing() +# and last_op_in_netorder(), respectively. In both cases the cxt is +# full of junk (and according to valgrind the cxt was never stack'd, +# malloc'd or free'd). Observed in Debian 3.0 x86, both with gccs +# 2.95.4 20011002 and 3.3. +use Config; +$self->{OPTIMIZE} = '-O2' + if -f '/etc/debian_version' && + ($Config{gccversion} =~ /^2\.95\.4 20011002 / || + $Config{gccversion} eq '3.3'); +