Mail archive

Re: [alpine-devel] force compile flag for musl?

From: A. Wilcox <>
Date: Wed, 25 Oct 2017 14:17:28 -0500

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).

I agree with the idea of using -O2 but not with the implementation of
blowing away all other CFLAGS.


A. Wilcox (awilfox)
Project Lead, Adélie Linux

Received on Wed Oct 25 2017 - 14:17:28 GMT