From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
by nuthatch.gentoo.org with esmtp (Exim 4.60)
(envelope-from )
id 1GTlxl-0003J7-Aa
for garchives@archives.gentoo.org; Sat, 30 Sep 2006 21:01:33 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k8UL0auw026063;
Sat, 30 Sep 2006 21:00:36 GMT
Received: from citycable.ch (mail.alinto.citycable.ch [85.218.0.111])
by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k8UKwaON028494
for ; Sat, 30 Sep 2006 20:58:36 GMT
Received: (qmail 19487 invoked by uid 64); 30 Sep 2006 20:58:35 -0000
Received: from dominique.michel@citycable.ch by alinto.net (uvscan: v4.4.00/v4863. Clean); 30 Sep 2006 20:58:35 -0000
Received: from unknown (HELO localhost) (dominique.michel@citycable.ch@85.218.2.234)
by smtp.alinto.citycable.ch with SMTP; 30 Sep 2006 20:58:35 -0000
Date: Sat, 30 Sep 2006 22:58:27 +0200
From: Dominique Michel
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [RFC] CFLAGS paragraph for the GWN
Message-ID: <20060930225827.725ae31d@localhost>
In-Reply-To: <451ED52E.5030407@bouton.name>
References: <451ED52E.5030407@bouton.name>
X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.19; i686-pc-linux-gnu)
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEXy8ubtkoXo7+b1+fbN
cGKCeWDtamweFA8eMkmKPkPtvcWRoqyV0Pn7AAACbElEQVQ4jXXTMWvbQBQA4MOlizsdXEXp
KAi09mKcLZ0EJxONDRJVkikg9AtqTm63gtHDmVJs1GsnC0JiaTMJGN2f67uzznJb+gZj9PFO
7717IqdtvCAmem4bxMLp/2BEyEBF1+U/0H8uhI6rv+BVLNrY/gH9T0L8yAxk2yMY3YuZxDCn
TY/gpBByyTGktIcZOIvFjPNJmqYJDwrx3cIoBrE0zzG4FF8tfBAwM+DonKCYWjgROZ6Upjcm
5Qje58JAmlKKGfIAjzaDUuogZBY2Bjg14eDbywMIqZvwqgqFBcVFB0seYONLb00ZZlh4p0F6
FHNoUMyKAzxowJSQTyj+XloYs3MN3GeMpzyYSTMshLM00ODpWlPp4SDbqs4cViDcGAgmlK/a
PsaOg7DvIQ3wzANMqB/iQW/XTkoTLO6XhSeHUoQKe+NLjyY/Ldx7CW2D4WTYhZ3V0GP64RpP
Q/E66IUWMLj3+nDn4w2ejMACyXFeHZy6ETcZehc49bv1GQ/0bazNuzm97mDkhnoie9i30WYM
w/YCnYT7Fx308s98n0IT//Jod1+aOzdzYXLVbftol+PC+REG3u+0AxdEtuSMB6G+DLGwMH4E
vXGmJn8VCLM9LhmrOAMQYt5Wi/DFgIC52iFkUzMpDVmjAaDZRGC+JGwDqzJ/G5fUUcWZAaE7
YfvPLYtIU1Wb4A2IeS7uDMgcIFutiCr766qGfKHyuxvTIERKXVNSN27lDgCuBuojlpxIyJV6
ritS1uWWuHF2Ww7qcIKbqEFVNbmtmm3vGSCHbVXjikrY3SpVxwQWw2aIjwG+ueXTJDmHeK6a
HfwGyU5ZSlGeSRQAAAAASUVORK5CYII=
Precedence: bulk
List-Post:
List-Help:
List-Unsubscribe:
List-Subscribe:
List-Id: Gentoo Linux mail
X-BeenThere: gentoo-dev@gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-aduser: dominique.michel@citycable.ch/85.218.2.234
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id k8UL0awp026063
X-Archives-Salt: 8a9ebd3c-0940-445b-a115-0b5de266e860
X-Archives-Hash: c8f99bf3063683670c970c9c94a85f1e
Le Sat, 30 Sep 2006 22:35:58 +0200,
Lionel Bouton a =C3=A9crit :
> Hi, I just had an unpleasant experience with -ffast-math and GCC 4.1.1
> (it borked my LDAP authentication on several systems which worked with
> the same CFLAGS as long as GCC 3.4.6 was used).
>=20
> There is a lot of material out there about CFLAGS and Gentoo (google
> returns 387000 pages) but what's working for someone might not for
> another. There are flags that work for a GCC version and most ebuilds
> and don't work with another GCC version (my unfortunate experience) or
> some ebuilds. Flag combination/architecture/LDFLAGS might be an issue t=
oo.
>=20
> There are already good resources (http://gentoo-wiki.com/CFLAGS_matrix
> was mentioned to me by robbat2) but they may not be advertised enough.
> I'd like to propose a paragraph to the GWN editor which presents some
> gotchas and good references on the subject.
>=20
> Here's a draft for review. You're welcomed to expand on the subject.
>=20
> --- Draft BEGIN ---
>
> CFLAGS
>
>=20
>
> Being able to tune the CFLAGS is part of one of the core principles of
> Gentoo: let the user be in control. Being in control brings both
> benefits and problems and CFLAGS tuning is not an exception.
>
>
> The recent upgrade to gcc-4.1.1 for x86 and amd64 users changed the
> landscape. Users that spent some time tuning their CFLAGS with gcc-3.4.=
6
> might find out that an upgrade to gcc-4.1.1 leaves them with an unstabl=
e
> system. Example of this are :
>
> - nss_ldap stopped working with -ffast-math
> - ...
>
>
>
> Users with unsupported CFLAGS (see the link=3D'http://gentoo-wiki.com/CFLAGS_matrix'>CFLAGS matrix for
> example) might want to return to safe CFLAGS (see link=3D'http://gentoo-wiki.com/Safe_Cflags'>Safe CFLAGS) if recen=
t
> updates caused them stability problems. On the other hand, more
> adventurous users might want to experiment with CFLAGS that didn't work
> properly with gcc-3.4.6... As always, the user is in control.
>
>
>
> --- Draft END ---
>=20
> If possible, I'd like to expand the list of 3.4.6 -> 4.1.1 upgrade
> problems which are linked to experimental CFLAGS. If you want to expand
> the subject to cover other tuning/stability gotchas that recent updates
> might have brought into the light, please feel free to do so. As Englis=
h
> is not my native tongue, feel free to spell check too.
>=20
> Cheers,
>=20
> Lionel.
My personal experience with other CFLAGS as the ones in the handbook is a=
t
gcc-4.1.1 have a better optimisation with the default gentoo CFLAGS. Even
with -O2, the result is a faster system, and -O3 seam to be safer with ma=
th
related applications as with gcc-3.4.*.
But in the other hand, other flags seam to be more problematic as with
gcc-3.4.*. And the new optimisations flags as the vectorisation flags are=
not
easy to use, because the result depend on the code of the program. They c=
an or
not brake the code, and when the program run well, they can make it faste=
r
or slower. All depend of the size and complexity of the loops. And I thin=
k also
of the arch.
So my conclusion is:
For system flags, just keep the default, and if you want to experiment, d=
o
profiling for each single program you want to optimize.
Cheers,
Dominique
--=20
Dominique Michel
--=20
gentoo-dev@gentoo.org mailing list