Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: CFLAGS question from a AMD64 newbie
Date: Tue, 16 Dec 2008 22:46:57
Message-Id: pan.2008.12.16.22.46.40@cox.net
In Reply to: Re: [gentoo-amd64] Re: CFLAGS question from a AMD64 newbie by Branko Badrljica
1 Branko Badrljica <brankob@××××××××××.com> posted
2 4948332A.3080109@××××××××××.com, excerpted below, on Wed, 17 Dec 2008
3 00:00:58 +0100:
4
5 > Duncan wrote:
6 >> -combine is the one that causes the most problems, handled per trouble-
7 >> package as mentioned in the other thread using /etc/portage/env/*
8 >> files. The -fredorder-blocks-and-partition can in some cases as well,
9 >> but if you don't have either of those in CXXFLAGS, you'll avoid a lot
10 >> of the problem right there. Those are the only C(XX)FLAGS I have had
11 >> issues with lately. The others have worked just fine.
12 >>
13 > Do you have link to info on that per-package environment mechanism ? I
14 > couldn't find anything...
15
16 I'm headed to work so don't have time to look ATM, but AFAIK I either saw
17 it discussed on the portage-dev list or found it in the form of a
18 changelog entry, likely referring to the bug number where it was
19 requested, then later added.
20
21 This is one of the features they don't like to talk about too much,
22 because emerge --info says nothing about it. Basically, they don't trust
23 their users to mention it when reporting bugs (and, honestly, it's hard
24 to remember what you might have put there a year and two release versions
25 ago...).
26
27 The feature is somewhat limited, in that these files are sourced in the
28 bash portion of portage (basically, ebuild.sh) -- the python portion
29 knows nothing about them. Therefore, the env files can only affect stuff
30 like cflags that are normally processed in bash. It doesn't affect for
31 instance some of the FEATURES that the python portion (basically the
32 dependency checking and the part that glues all the phases together, see
33 the ebuild (1) manpage for the normal phases, and ebuild (5) manpage for
34 how they are expressed in the ebuilds as functions) uses and controls.
35
36 Starting from /etc/portage/env, you create the category as a subdir, then
37 the package (which can include the version, but doesn't take the full
38 atom syntax) as the filename.
39
40 Inside the file you can do things like:
41
42 # comments
43 MAKEOPTS=-j1
44 CFLAGS="${CFLAGS/ -combine/}"
45
46 (See standard bash rules for how that cflags thing is interpreted, but
47 it's like a sed substitution.)
48
49 --
50 Duncan - List replies preferred. No HTML msgs.
51 "Every nonfree program has a lord, a master --
52 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: CFLAGS question from a AMD64 newbie Branko Badrljica <brankob@××××××××××.com>