Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Checking for specific options in CFLAGS/CXXFLAGS
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
gtsquirrel
Tux's lil' helper
Tux's lil' helper


Joined: 21 Nov 2002
Posts: 85
Location: San Jose, CA

PostPosted: Mon Jun 02, 2003 8:36 pm    Post subject: Checking for specific options in CFLAGS/CXXFLAGS Reply with quote

Assuming I have an ebuild that cannot be compiled with any -O options (-O, -O2, -O3, ...), how can I have the ebuild check the CFLAGS variable for that specific flag and either error/die or remove that specific flag and continue?
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Mon Jun 02, 2003 9:21 pm    Post subject: Re: Checking for specific options in CFLAGS/CXXFLAGS Reply with quote

gtsquirrel wrote:
Assuming I have an ebuild that cannot be compiled with any -O options (-O, -O2, -O3, ...), how can I have the ebuild check the CFLAGS variable for that specific flag and either error/die or remove that specific flag and continue?
check out the OpenOffice.org ebuild. especialy the following part:
Code:
inherit flag-o-matic eutils   
# Compile problems with these ...

filter-flags "-funroll-loops"
filter-flags "-fomit-frame-pointer"
replace-flags "-O3" "-O2"

ALLOWED_FLAGS="-O -O1 -O2 -Os -mcpu -march -pipe"
strip-flags


cheers

SteveB
Back to top
View user's profile Send private message
gtsquirrel
Tux's lil' helper
Tux's lil' helper


Joined: 21 Nov 2002
Posts: 85
Location: San Jose, CA

PostPosted: Tue Jun 03, 2003 3:39 am    Post subject: awesome! Reply with quote

Rock on! Thanks a bunch for that!
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Tue Jun 03, 2003 6:57 am    Post subject: Re: awesome! Reply with quote

gtsquirrel wrote:
Rock on! Thanks a bunch for that!
you are wellcome :)
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