Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: Gentoo Developers <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] per package cflags (was Re: Do we want optimal performance?)
Date: Thu, 09 Sep 2004 04:46:05
Message-Id: 20040909034930.GA16008@curie-int.orbis-terrarum.net
In Reply to: Re: [gentoo-dev] per package cflags (was Re: Do we want optimal performance?) by Ned Ludd
1 On Wed, Sep 08, 2004 at 11:42:56PM -0400, Ned Ludd wrote:
2 > On Wed, 2004-09-08 at 22:26, Robin H. Johnson wrote:
3 > > On Wed, Sep 08, 2004 at 09:51:15PM -0400, Travis Tilley wrote:
4 > > > Daniel Goller wrote:
5 > > > >although i am against overly tweaking CFLAGS, someone suggested
6 > > > >something that might be more sane to ask for:
7 > > > >
8 > > > >/etc/portage/packages.cflags
9 > > > >
10 > > > >an easy way to maintain your cflags you worked so hard for to obtain,
11 > > > >you can trade them in the forums or ebay and then append to your file,
12 > > > >not much work to implement in my eyes, and all the testing work is done
13 > > > >by those who want it
14 > > > mkdir /etc/portage and copy this file there (MUCH thanks to solar for
15 > > > writing this. he like... kicks ass an stuff). it implements an
16 > > > /etc/portage/package.cflags without needing to patch portage. i think
17 > > > this might require portage 2.0.51_pre... no idea, i havent used 2.0.50
18 > > > in a while.
19 > > [snip]
20 > > Could this be generalized to do /etc/portage/package.env like somebody
21 > > else asked for?
22 > >
23 > > And then simply put a CFLAGS line in the file referenced by package.env,
24 > > as it seems that it really would belong there.
25 >
26 > I played with that idea for a few mins, but unfortunately I found no
27 > easy way in bash to deal with the quotes.
28 > Assuming this syntax.
29 >
30 > sys-apps/paxctl CFLAGS="-Os -fomit-frame-pointer"
31 > sys-devel/gdb CFLAGS="-O2 -g3"
32 > app-misc/beep FEATURES="sfperms sandbox" LDFLAGS="-Wl,-z,now
33 > -Wl,-z,relro"
34 > dev-libs/openssl CFLAGS="-O3 -fno-omit-frame-pointer -m32"
35 > ..
36 >
37 > Maybe somebody else is motivated to do it from the basic idea. I gave up
38 > and settled for the easy way out of package.cflags package.ldflags here
39 > locally.
40 I'll take a look at it and see about hacking up a prototype :-).
41
42 The general consensus that was reached on the rough design of it was:
43 /etc/portage/package.env:
44 ebuild-atom file
45
46 where ebuild-atom is a complete version atom per ebuild(5) and file is
47 one or more space-seperated names of files found in
48 /etc/portage/package.env.d/ that get used after /etc/portage/bashrc.
49
50 --
51 Robin Hugh Johnson
52 E-Mail : robbat2@××××××××××××××.net
53 Home Page : http://www.orbis-terrarum.net/?l=people.robbat2
54 ICQ# : 30269588 or 41961639
55 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85

Replies