Gentoo Archives: gentoo-amd64

From: "Kevin F. Quinn" <kevquinn@g.o>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: -fPIC - Toolchain broken?
Date: Mon, 23 Oct 2006 14:24:05
Message-Id: 20061023162050.48b4e70f@c1358217.kevquinn.com
In Reply to: [gentoo-amd64] Re: -fPIC - Toolchain broken? by Duncan <1i5t5.duncan@cox.net>
1 On Thu, 19 Oct 2006 20:43:28 +0000 (UTC)
2 "Duncan" <1i5t5.duncan@×××.net> wrote:
3
4 > Simon Stelling <blubb@g.o> posted 45379CDC.1010504@g.o,
5 > excerpted below, on Thu, 19 Oct 2006 17:42:20 +0200:
6 >
7 > > If you want to add instead of replace, CFLAGS="${CFLAGS} -fadded"
8 > > will do the job. Removing is done with CFLAGS=" ${CFLAGS}" ;
9 > > CFLAGS=${CFLAGS//-fremoved}
10
11 FWIW I think Simon meant:
12
13 CFLAGS=" ${CFLAGS}" ; CFLAGS=${CFLAGS// -fremoved}
14
15 assuming that adding the space was done to catch flags that match part
16 of longer flags.
17
18 > > So you can do effectively anything, given you know the bash
19 > > tricks ;)
20 >
21 > Hey, thanks! The add was a no-brainer here, but I hadn't thought
22 > about the remove trick yet. Very nice! =8^)
23
24 Watch also for flags that start with the same string; for example:
25
26 CFLAGS=${CFLAGS// -finline-functions}
27
28 would end up with "-called-once" in CFLAGS, if
29 "-finline-functions-called-once" was set.
30
31 Another easy one is doing:
32
33 CFLAGS=${CFLAGS// -g}
34
35 when CFLAGS has "-ggdb2" or similar set...
36
37 --
38 Kevin F. Quinn

Attachments

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

Replies

Subject Author
[gentoo-amd64] Re: -fPIC - Toolchain broken? Duncan <1i5t5.duncan@×××.net>