Gentoo Archives: gentoo-dev

From: Chris Gianelloni <wolf31o2@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] CFLAGS paragraph for the GWN
Date: Tue, 03 Oct 2006 12:03:44
Message-Id: 1159876513.31030.2.camel@vertigo.twi-31o2.org
In Reply to: [gentoo-dev] [RFC] CFLAGS paragraph for the GWN by Lionel Bouton
1 On Tue, 2006-10-03 at 02:56 +0200, Lionel Bouton wrote:
2 > Here's an updated draft. I included most of your remarks and added some
3 > notes on append-flags/filter-flags. I'll probably submit it to Ulrich
4 > around the end of the week.
5
6 I surely hope you don't submit it to Ulrich if you want it to actually
7 ever get in the GWN. Instead, you should submit it to
8 gwn-feedback@g.o like the GWN tells you to do.
9
10 =]
11
12 Thanks,
13
14 > --- Draft BEGIN ---
15 > <section>
16 > <title>CFLAGS</title>
17 > <body>
18 >
19 > <p>
20 > Being able to tune the CFLAGS is part of one of the core principles of
21 > Gentoo: let the user be in control. Being in control brings both
22 > benefits and problems and CFLAGS tuning is not an exception.
23 > </p>
24 > <p>
25 > The recent upgrade to gcc-4.1.1 for x86 and amd64 users changed the
26 > landscape. Users that spent some time tuning their CFLAGS with gcc-3.4.6
27 > might find out that an upgrade to gcc-4.1.1 leaves them with an unstable
28 > system. Example of this are :
29 > <ul>
30 > <li>nss_ldap stopped working with <c>-ffast-math</c> (reported to break
31 > many packages changing with the actual gcc version)</li>
32 > <li><c>-fvisibility-inlines-hidden</c> still breaks some code</li>
33 > <li>if you used gcc-4.0, <c>-ftree-loop-linear</c> now breaks in
34 > gcc-4.1(at least with mesa)</li>
35 > <li>again for gcc-4.0 users, <c>-ftree-vectorize</c> is known to be
36 > broken in gcc-4.1 (at least for x86 and ppc, amd64 users seem to be
37 > safe)</li>
38 > <li><c>-fforce-addr</c> and <c>-fweb</c> break regularly on x86 with
39 > video libraries or graphic processing apps which use hand-optimised ASM</li>
40 > </ul>
41 > </p>
42 > <p>
43 > Users with unsupported CFLAGS (see the <uri
44 > link='http://gentoo-wiki.com/CFLAGS_matrix'>CFLAGS matrix</uri> for
45 > example) might want to return to safe CFLAGS (see <uri
46 > link='http://gentoo-wiki.com/Safe_Cflags'>Safe CFLAGS</uri>) if recent
47 > updates caused them stability problems. On the other hand, more
48 > adventurous users might want to experiment with CFLAGS that didn't work
49 > properly with gcc-3.4.6... As always, the user is in control.
50 > </p>
51 > <p>
52 > Notes:
53 > <ul>
54 > <li>The gcc man page contains warnings for some unsafe optimization
55 > options. You should read it carefully when you experiment with CFLAGS or
56 > upgrade GCC on a CFLAGS-customized Gentoo.</li>
57 > <li>Some options that are unsafe in the system-wide CFLAGS might be
58 > added automatically in some ebuilds if the developper deems them safe
59 > (by redefining CFLAGS or using append-flags of the flag-o-matic eclass).
60 > For example <c>-ffast-math</c> is added by the xmame/xmess ebuilds on
61 > most architectures even if you don't put it in your CFLAGS.</li>
62 > <li>You might get an idea of the stability issues of a specific
63 > optimization option by running: <c>find /usr/portage -name '*.ebuild'|
64 > xargs grep -- '-<your-risky-optimization-option>'</c>. It takes quite
65 > some time, but might be enlightening: look for the 'filter-flags'.</li>
66 > </ul>
67 > </p>
68 > </body>
69 > </section>
70 > --- Draft END ---
71 >
72 > Lionel
73 --
74 Chris Gianelloni
75 Release Engineering Strategic Lead
76 Alpha/AMD64/x86 Architecture Teams
77 Games Developer/Council Member/Foundation Trustee
78 Gentoo Foundation

Attachments

File name MIME type
signature.asc application/pgp-signature