why does standard configure uses -Os?

Joshua Root jmr at macports.org
Sat Dec 23 23:12:55 UTC 2017


On 2017-12-24 08:40 , Eitan Adler wrote:
> In macports base in standard_configure.sh
> 
> there is this line:
>   6 env PATH=/usr/bin:/bin:/usr/sbin:/sbin CFLAGS="-pipe -Os"
> ./configure --enable-readline
> 
> Why do we compile with -Os instead of -O2?
> 
> As far as I could the only difference, in llvm 4.0.1, is to disable
> the "libcalls-shrinkwrap" opt pass.

It's what Apple uses, so presumably better tested. IIRC they found it
tends to perform a little better than -O2.

- Josh


More information about the macports-dev mailing list