Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
explain custom-optimization use flag [solved]
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
cnistra
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2006
Posts: 78
Location: Göteborg, Sweden

PostPosted: Sat Jul 19, 2008 2:29 pm    Post subject: explain custom-optimization use flag [solved] Reply with quote

Hello, can somebody please explain this new use flag custom-optimization. A more detailed one than the output of euse would be grand.
Thanks!

PS.
euse -i custom-optimization wrote:
global use flags (searching: custom-optimization)
************************************************************
no matching entries found

local use flags (searching: custom-optimization)
************************************************************
[+ C ] custom-optimization (net-libs/xulrunner):
Fine-tune custom compiler optimizations

[+ C ] custom-optimization (www-client/mozilla-firefox):
Fine-tune custom compiler optimizations


Last edited by cnistra on Sat Jul 19, 2008 7:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Sat Jul 19, 2008 3:28 pm    Post subject: Reply with quote

Seems like they are not used in the ebuilds yet...

Still I'd also like to know for what they are meant. :)
Back to top
View user's profile Send private message
Arfrever
Bodhisattva
Bodhisattva


Joined: 29 Apr 2006
Posts: 2462
Location: Polska / Lenkija

PostPosted: Sat Jul 19, 2008 3:32 pm    Post subject: Reply with quote

cnistra wrote:
can somebody please explain this new use flag custom-optimization.


It allows to use the -O* option specified by user in CFLAGS/CXXFLAGS.
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Sat Jul 19, 2008 3:42 pm    Post subject: Reply with quote

And it works already?
How is it done?

I cannot see a query on that use flag in the ebuilds...
Back to top
View user's profile Send private message
armin76
Developer
Developer


Joined: 24 Apr 2006
Posts: 163

PostPosted: Sat Jul 19, 2008 3:48 pm    Post subject: Reply with quote

Its just for the mozilla-firefox-3 and xulrunner-1.9 ebuilds...if you emerge them with that use-flag enabled, it will use your -O* option, if you don't, which is the default, it will use mozilla's default, which uses a combination of -O1, -O0, -O2, -Os and -O3
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Sat Jul 19, 2008 3:57 pm    Post subject: Reply with quote

Yeah, I got that.
My question was more "ebuild technical".

How do you achieve the usage of different compiler options if the ebuild doesn't contain something like

<pseudo code>
if (custom-optimization use flag is set) {
use compiler option from make.conf;
} else {
use mozilla's options;
}
</pseudo code>

?
Back to top
View user's profile Send private message
Arfrever
Bodhisattva
Bodhisattva


Joined: 29 Apr 2006
Posts: 2462
Location: Polska / Lenkija

PostPosted: Sat Jul 19, 2008 4:29 pm    Post subject: Reply with quote

Schwinni wrote:
How do you achieve the usage of different compiler options if the ebuild doesn't contain something like

<pseudo code>
if (custom-optimization use flag is set) {
use compiler option from make.conf;
} else {
use mozilla's options;
}
</pseudo code>

?


It's in an eclass.

================================================

armin76: Why don't you support -O2 and -O3?
Back to top
View user's profile Send private message
armin76
Developer
Developer


Joined: 24 Apr 2006
Posts: 163

PostPosted: Sat Jul 19, 2008 4:52 pm    Post subject: Reply with quote

Oops, -O2 should be allowed.
I'll fix that
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Sat Jul 19, 2008 6:35 pm    Post subject: Reply with quote

Arfrever wrote:
It's in an eclass.


Aah, OK, now I understand. Thanks for teaching! :)
Back to top
View user's profile Send private message
cnistra
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2006
Posts: 78
Location: Göteborg, Sweden

PostPosted: Sat Jul 19, 2008 7:20 pm    Post subject: Reply with quote

Thanks everyone for the explanation. I'm not complaining but I think it's a bit odd to have a use flag for a ebuild to honour optimization options that have been deemed safe (or at least not filtered out) for that particular ebuild. Anyway, I'm looking forward to compile all the parts of firefox with O2. Thanks again.
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