1 |
On Tue, 2006-05-30 at 08:04 +0200, Bo Ørsted Andresen wrote: |
2 |
> Tuesday 30 May 2006 07:41 skrev Graham Murray: |
3 |
> > > Besides, by looking at the terminal while merging packages, you will |
4 |
> > > soon notice, that lot's of packages add their very own CFLAGS to your |
5 |
> > > default ones. For example mplayer or xine-lib was compiled with '-O3' on |
6 |
> > > my system, allthough i have '-O2' in my CFLAGS. (As far as i know, "gcc |
7 |
> > > -O3 -O2" == "gcc -O3"). |
8 |
> > |
9 |
> > Where packages do this, should they not filter out the appropriate |
10 |
> > flags from the user's CFLAGS and substitute their flags rather than |
11 |
> > having both flags on the command line? |
12 |
> |
13 |
> Not in this particular case. xine-lib is a good example. src_compile() |
14 |
> contains the following in the ebuild (and more): |
15 |
> |
16 |
> if [[ $(tc-arch) == "x86" ]]; then |
17 |
> filter-flags -fforce-addr |
18 |
> filter-flags -momit-leaf-frame-pointer |
19 |
> is-flag -O? || append-flags -O2 |
20 |
> fi |
21 |
> |
22 |
> On an x86 architecture it filters out -fforce-addr |
23 |
> and -momit-leaf-frame-pointer. If the CFLAGS contain any optimizations it |
24 |
> just appends -O2 yielding that -O2 will be used as stated by Christian |
25 |
> Limberg. In 'man gcc' you find the following statement: |
26 |
> |
27 |
> "If you use multiple -O options, with or without level numbers, the last such |
28 |
> option is the one that is effective." |
29 |
> |
30 |
> So this is completely legal. |
31 |
> |
32 |
> And I very much doubt that there are any ebuilds in the portage tree that |
33 |
> enforces -O3 or higher... |
34 |
> |
35 |
Well, you are right: However, what i said still applies: Lot's of |
36 |
packages add their very own CFLAGS (-fomit-frame-pointer, |
37 |
-ffunction-sections are two examples for xine-lib). |
38 |
|
39 |
Matthias |
40 |
|
41 |
-- |
42 |
gentoo-user@g.o mailing list |