X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by lists.alpinelinux.org (Postfix) with ESMTP id 8905B5C592C for ; Wed, 25 Oct 2017 19:54:26 +0000 (GMT) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 5DBDB9E3160; Wed, 25 Oct 2017 19:54:26 +0000 (GMT) Received: from ncopa-desktop.copa.dup.pw (15.63.200.37.customer.cdi.no [37.200.63.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 9679E9E149D; Wed, 25 Oct 2017 19:54:25 +0000 (GMT) Date: Wed, 25 Oct 2017 21:54:22 +0200 From: Natanael Copa To: "A. Wilcox" Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] force compile flag for musl? Message-ID: <20171025215422.3c9ddcfd@ncopa-desktop.copa.dup.pw> In-Reply-To: <59F0E348.6020807@adelielinux.org> References: <20171025164614.14c4c57e@ncopa-desktop.copa.dup.pw> <59F0E348.6020807@adelielinux.org> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, 25 Oct 2017 14:17:28 -0500 "A. Wilcox" wrote: > On 25/10/17 09:46, Natanael Copa wrote: > > Hi, > >=20 > >=20 > > I wonder what you think about overriding the -Os compile flag for=20 > > musl, and hardcode it to -O2. =20 >=20 >=20 > Possibly. Is there some benchmarks available, maybe using libc-test > or such? >=20 >=20 > > What do you think? > >=20 > > + # force -O2 compile flag for better performance + > > CFLAGS=3D"-O2" \ =20 >=20 >=20 > 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). >=20 > This is INCREDIBLY important to us at Ad=E9lie 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=3Dpentium4 x86_32, for instance). Thanks. This is useful information. =20 > 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: CFLAGS=3D"$CFLAGS -O2" would be better. Alternatively we could have an optional performance opt, s= omething like: CFLAGS=3D"${CFLAGS_OPT_PERFORMACE:-$CFLAGS}" 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. Thanks! -nc >=20 > Best, > --arw >=20 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---