From: Michael G. Schwern Date: Tue, 18 Feb 2003 21:31:37 +0000 (+0000) Subject: Re: -Os for Darwin why? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c803703701b66ee8fee828b4344c92c4d0124184;p=p5sagit%2Fp5-mst-13.2.git Re: -Os for Darwin why? Message-Id: <20030218113739.D25848@ttul.org> p4raw-id: //depot/perl@18746 --- diff --git a/hints/darwin.sh b/hints/darwin.sh index 4fa2254..65cd322 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -58,12 +58,15 @@ usenm='true'; # pace with CPU speed over time (on any platform), this is probably a # reasonable assertion. if [ -z "${optimize}" ]; then - case "$osvers" in - [12345].*) optimize='-O3' ;; - *) optimize='-Os' ;; + case "`${cc:-gcc} -v 2>&1`" in + *"gcc version 3."*) optimize='-Os' ;; + *) optimize='-O3' ;; esac +else + optimize='-O3' fi + # -pipe: makes compilation go faster. # -fno-common because common symbols are not allowed in MH_DYLIB ccflags="${ccflags} -pipe -fno-common"