Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-dev@g.o
From: George Prowse <cokehabit@...>
Subject: Re: [RFC] CFLAGS paragraph for the GWN
Date: Sun, 01 Oct 2006 10:37:55 +1000
Lionel Bouton wrote:
> 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).
> 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 too.
> There are already good resources (
> 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.
> Here's a draft for review. You're welcomed to expand on the subject.
> --- Draft BEGIN ---
> <section>
> <title>CFLAGS</title>
> <body>
> <p>
> 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.
> </p>
> <p>
> 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 unstable
> system. Example of this are :
> <ul>
> <li>nss_ldap stopped working with -ffast-math</li>
> <li>...</li>
> </ul>
> </p>
> <p>
> Users with unsupported CFLAGS (see the <uri
> link=''>CFLAGS matrix</uri> for
> example) might want to return to safe CFLAGS (see <uri
> link=''>Safe CFLAGS</uri>) if recent
> 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.
> </p>
> </body>
> </section>
> --- Draft END ---
> 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 English
> is not my native tongue, feel free to spell check too.
> Cheers,
> Lionel.
I agree in principle because it would stop people using stupid CFLAGS. 
It should have an information section and a "use this CFLAG and dont ask 
us for help" section:

Good Compiler Flag
Enables safe loop optimisation and is enabled in most -O$
Bad Compiler flag
Sets |-fno-math-errno|, |-funsafe-math-optimizations|,
|-fno-trapping-math|, |-ffinite-math-only|, |-fno-rounding-math| and 

Used to speed up math functions but causes major b0rkage because it can 
result in incorrect output for programs which depend on an exact 
implementation of IEEE or ISO rules/specifications for math functions.

Use this and dont bother asking for help.
gentoo-dev@g.o mailing list

[RFC] CFLAGS paragraph for the GWN
-- Lionel Bouton
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [RFC] CFLAGS paragraph for the GWN
Next by thread:
[RFC] CFLAGS paragraph for the GWN
Previous by date:
Re: Profile masking and profiles package.mask
Next by date:
Re: Re: [RFC] CFLAGS paragraph for the GWN

Updated Jun 17, 2009

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.