From: Jarkko Hietaniemi Date: Wed, 28 Nov 2001 14:15:25 +0000 (+0000) Subject: In Linux if we have modern enough gcc and supported X-Git-Tag: accepted/trunk/20130322.191538~29151 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb782340ac189f87a9572b63a1fcb9dd8bc50473;p=platform%2Fupstream%2Fperl.git In Linux if we have modern enough gcc and supported enough CPU, crank up the optimization level to -O3. p4raw-id: //depot/perl@13342 --- diff --git a/hints/linux.sh b/hints/linux.sh index bbd88be..9837ee8 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -97,7 +97,19 @@ case "$usemymalloc" in esac case "$optimize" in -'') optimize='-O2' ;; +'') # If we have modern enough gcc and well-supported enough CPU, + # crank up the optimization level. + case "`${cc:-gcc} -v 2>&1`" in + *gcc-2.95*|*gcc-3.*) + case "`arch 2>&1`" in + i?86|ppc) optimize='-O3' ;; + esac + ;; + esac + case "$optimize" in + '') optimize='-O2' ;; + esac + ;; esac # Are we using ELF? Thanks to Kenneth Albanowski