View previous topic :: View next topic |
Author |
Message |
kram n00b
Joined: 29 Nov 2002 Posts: 35
|
Posted: Sun Dec 29, 2002 1:31 am Post subject: -O Question |
|
|
I was just emerging transcode when I noticed this:
Code: | gcc -DHAVE_CONFIG_H -I.. -I. -I.. -I. -O6 -funroll-loops -ffast-math -DLINUX -D_MMX_ -march=athlon-tbird -Os -pipe -fomit-frame-pointer -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c `test -f 'mad_mmx.c' || echo './'`mad_mmx.c |
and from the gcc man page:
Code: | If you use multiple -O options, with or without level numbers, the last such option is the one that is effective. |
and my CFLAGS are "-march=athlon-tbird -Os -pipe -fomit-frame-pointer"
It seems that the ebuild is preventing transcode from being optimised the way the transcode developers intended... is it possible this happens with other packages?
I'm kinda curious because I woulda thought every bit of optimisation possible is desired in a package such as this. |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Sun Dec 29, 2002 3:09 am Post subject: Re: -O Question |
|
|
kram wrote: | It seems that the ebuild is preventing transcode from being optimised the way the transcode developers intended... | No, your CFLAGS are preventing gcc from compiling with the package-specific optimizations. If you wanted to optimize for speed, why not specify -O3 instead of -Os? Gentoo is simply doing what you told it to. _________________ I don't believe in witty sigs. |
|
Back to top |
|
|
kram n00b
Joined: 29 Nov 2002 Posts: 35
|
Posted: Sun Dec 29, 2002 3:32 am Post subject: |
|
|
That would still cause the -O6 to be ignored. I was just saying that it would make more sense for portage to use a package's default optimisations if they are "higher" than your CFLAGS, because the defaults are like that for a reason
It's probably hard to do I guess :\ |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Sun Dec 29, 2002 5:31 am Post subject: |
|
|
No, see, the Gentoo philosophy is to give the administrator as much control as possible. Thus, CFLAGS override everything else. It works out. _________________ I don't believe in witty sigs. |
|
Back to top |
|
|
|