Re: [alpine-devel] force compile flag for musl?
On Wed, 25 Oct 2017 14:17:28 -0500
"A. Wilcox" <awilfox_at_adelielinux.org> wrote:
> On 25/10/17 09:46, Natanael Copa wrote:
> > Hi,
> > I wonder what you think about overriding the -Os compile flag for
> > musl, and hardcode it to -O2.
> Possibly. Is there some benchmarks available, maybe using libc-test
> or such?
> > What do you think?
> > + # force -O2 compile flag for better performance +
> > CFLAGS="-O2" \
> No. Stuff in abuild.conf needs to be preserved and -O2 tacked on the
> end (GCC will only honour last -O flag passed, so this is what you want).
> This is INCREDIBLY important to us at Adélie because for instance
> ppc64 BE requires -fno-inline-small-functions due to GCC bug elsewise
> it will cause ABI issues with long double. We also use -march / -mcpu
> which would be discarded here as well, which would cause it to be
> slower on some platforms (-O2 won't help as much on x86_32 as it would
> on -march=pentium4 x86_32, for instance).
Thanks. This is useful information.
> I agree with the idea of using -O2 but not with the implementation of
> blowing away all other CFLAGS.
I was thinking about this, yes. I think something like:
would be better. Alternatively we could have an optional performance opt, something like:
But I think we just keep it simple as it is, because I measured it and
-O2 was actually slightly slower for the specific use case.
Received on Wed Oct 25 2017 - 21:54:22 UTC