Mail archive
alpine-devel

[alpine-devel] force compile flag for musl?

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Wed, 25 Oct 2017 16:46:14 +0200

Hi,


I wonder what you think about overriding the -Os compile flag for musl,
and hardcode it to -O2.

I think this makes sense since the functions in libc are so often used
that we want trade better performance at the cost of slightly bigger
binary.

This means that we override whatever user as set CFLAGS to
in /etc/abuild.conf

We already do this with zlib.

What do you think?

diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index 1938bbb3ca..193002186d 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
_at_@ -54,6 +54,8 @@ build() {
        fi
 
        # note: not autotools
+ # force -O2 compile flag for better performance
+ CFLAGS="-O2" \
        LDFLAGS="$LDFLAGS -Wl,-soname,libc.musl-${CARCH}.so.1" \
        ./configure \
                --build=$CBUILD \

-nc


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Wed Oct 25 2017 - 16:46:14 GMT