summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-01-27 21:51:27 +0000
committerNicholas Clark <nick@ccl4.org>2004-01-27 21:51:27 +0000
commitdeade07f0bde6c2aae1e343d2c3d09fab8fcd7ee (patch)
tree7622f3eaadb906d5d686a78ee9a388e7ea095e7a /ext
parentdede81231bb6ec127910ed7dddb6f1aeb0cf28da (diff)
downloadperl-deade07f0bde6c2aae1e343d2c3d09fab8fcd7ee.tar.gz
Storable's hints file shouldn't blanket set optimize to -O2 on Linux
Only *drop* optimize to -O2 if it's -O3 on gcc on Linux p4raw-id: //depot/perl@22238
Diffstat (limited to 'ext')
-rw-r--r--ext/Storable/hints/linux.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/Storable/hints/linux.pl b/ext/Storable/hints/linux.pl
index ed80f8466c..05661afb9f 100644
--- a/ext/Storable/hints/linux.pl
+++ b/ext/Storable/hints/linux.pl
@@ -6,5 +6,10 @@
# 20011002 and 3.3, and in Redhat 7.1 with gcc 3.3.1. The failures
# happen only for unthreaded builds, threaded builds work okay.
use Config;
-$self->{OPTIMIZE} = '-O2';
+if ($Config{gccversion}) {
+ my $optimize = $Config{optimize};
+ if ($optimize =~ s/(^| )-O3( |$)/$1-O2$2/) {
+ $self->{OPTIMIZE} = $optimize;
+ }
+}