From: Marcus Holland-Moritz Date: Thu, 1 Jan 2004 05:32:15 +0000 (+0100) Subject: Use the optimization level -O2 by default on Linux/gcc. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=051e4fe1efae394fc029e116526cd46285a0a0df;p=p5sagit%2Fp5-mst-13.2.git Use the optimization level -O2 by default on Linux/gcc. See : Subject: Benchmarking (was Re: GCC bug breaking Perl_sv_catpvfn()?) From: "Marcus Holland-Moritz" Message-ID: <071601c3d020$4046d2a0$d500a8c0@R2D2> p4raw-id: //depot/perl@22043 --- diff --git a/hints/linux.sh b/hints/linux.sh index 437e5c9..043590b 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -80,19 +80,8 @@ case "`${cc:-cc} -V 2>&1`" in esac case "$optimize" in -'') # If we have modern enough gcc and well-supported enough CPU, - # crank up the optimization level. - case "`${cc:-gcc} -v 2>&1`" in - *"gcc version 2.95"*|*"gcc version 3."*) - case "`arch 2>&1`" in - i?86|ppc) optimize='-O3' ;; - esac - ;; - esac - case "$optimize" in - '') optimize='-O2' ;; - esac - ;; +# use -O2 by default ; -O3 doesn't seem to bring significant benefits with gcc +'') optimize='-O2' ;; esac # Are we using ELF? Thanks to Kenneth Albanowski