Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
-O Question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
kram
n00b
n00b


Joined: 29 Nov 2002
Posts: 35

PostPosted: Sun Dec 29, 2002 1:31 am    Post subject: -O Question Reply with quote

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
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Sun Dec 29, 2002 3:09 am    Post subject: Re: -O Question Reply with quote

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
View user's profile Send private message
kram
n00b
n00b


Joined: 29 Nov 2002
Posts: 35

PostPosted: Sun Dec 29, 2002 3:32 am    Post subject: Reply with quote

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
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Sun Dec 29, 2002 5:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum