Gentoo Archives: gentoo-dev

From: Martin Schlemmer <azarah@g.o>
To: Douglas Russell <puggy@×××××××××.com>
Cc: Gentoo-Dev <gentoo-dev@g.o>
Subject: Re: [gentoo-dev] flag-o-matic eclass strip-unsupported-flags function
Date: Tue, 05 Aug 2003 20:29:40
Message-Id: 1060115400.8355.29.camel@nosferatu.lan
In Reply to: [gentoo-dev] flag-o-matic eclass strip-unsupported-flags function by Douglas Russell
1 On Tue, 2003-08-05 at 17:59, Douglas Russell wrote:
2 > -----BEGIN PGP SIGNED MESSAGE-----
3 > Hash: SHA1
4 >
5 > While fixing a bug it came to my attention that when an ebuild may wish to
6 > strip off CFLAGS known not to work, it will have to either strip off
7 > unnecessarily large amounts of optimisations or run the risk of being
8 > incompatible with different versions of gcc.
9 >
10 > For example, if removing -finline-functions from -O3, the optimal result with
11 > gcc 3 or greater is -O2 -frename-functions. However, gcc versions less than 3
12 > have no -frename-functions and will hence fail. Either dropping all the way
13 > down to -O2 unnecessarily on some systems or some conditional statements are
14 > required. The latter is obviously desirable to maximise optimisations.
15 >
16 > Rather than have conditional statements for every possible connotation of gcc
17 > in the ebuild however, I have written this addition to the flag-o-matic
18 > eclass which basically queries gcc for each of the used optimisations and
19 > strips the unsupported ones.
20 >
21 > Attached is a patch for the flag-o-matic eclass. Any feedback or suggestions
22 > would be appreciated.
23 >
24
25 What about:
26
27 CFLAGS="-O3 -fno-inline-functions"
28
29 rather ? =)
30
31
32 Cheers,
33
34 --
35
36 Martin Schlemmer
37 Gentoo Linux Developer, Desktop/System Team Developer
38 Cape Town, South Africa

Attachments

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