Gentoo Archives: gentoo-dev

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

Replies

Subject Author
Re: [gentoo-dev] [RFC] CFLAGS paragraph for the GWN Lionel Bouton <lionel-dev@××××××.name>