| View previous topic :: View next topic |
| Author |
Message |
DaveBowman n00b

Joined: 24 Apr 2003 Posts: 8
|
Posted: Sat May 31, 2003 4:02 pm Post subject: preprocessor macro |
|
|
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 |
|
 |
Jeff Binder Tux's lil' helper


Joined: 06 Dec 2002 Posts: 117 Location: RPI (Troy, NY, US, etc.)
|
Posted: Sat May 31, 2003 6:23 pm Post subject: |
|
|
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 |
|
 |
DaveBowman n00b

Joined: 24 Apr 2003 Posts: 8
|
Posted: Sat May 31, 2003 11:10 pm Post subject: |
|
|
| 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 |
|
 |
robmoss Retired Dev

Joined: 27 May 2003 Posts: 2634 Location: Jesus College, Oxford
|
Posted: Sun Jun 01, 2003 3:45 pm Post subject: |
|
|
I think what you're probably after is
| Code: | | CFLAGS="${CFLAGS} -DSOME_MACRO -fsome-flag" emerge some-package |
|
|
| Back to top |
|
 |
|