Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
preprocessor macro
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
DaveBowman
n00b
n00b


Joined: 24 Apr 2003
Posts: 8

PostPosted: Sat May 31, 2003 4:02 pm    Post subject: preprocessor macro Reply with quote

When I emerge a package, how can I specify preprocessor macros to be passed to the compiler. If I was manually compiling with gcc I would specify a preprocessor macro with the -D option.

Thanks,
Jimmy.
Back to top
View user's profile Send private message
Jeff Binder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Dec 2002
Posts: 117
Location: RPI (Troy, NY, US, etc.)

PostPosted: Sat May 31, 2003 6:23 pm    Post subject: Reply with quote

You can pass whatever options you want to gcc:

CFLAGS="-DSOME_MACRO -fsome-flag" emerge some-package

Also, CXXFLAGS works for g++, LDFLAGS for the linker, CPPFLAGS for the C preprocessor, etc.
_________________
Anyone who attributes a quote to themself is a pompous fool.
--me
Back to top
View user's profile Send private message
DaveBowman
n00b
n00b


Joined: 24 Apr 2003
Posts: 8

PostPosted: Sat May 31, 2003 11:10 pm    Post subject: Reply with quote

When emerge is run, won't the CFLAGS in make.conf override any environment variable I set? Is there a way to append to the CFLAGS in make.conf just temporarily with a command line option in emerge.
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Sun Jun 01, 2003 3:45 pm    Post subject: Reply with quote

I think what you're probably after is

Code:
CFLAGS="${CFLAGS} -DSOME_MACRO -fsome-flag" emerge some-package
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