This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: -D commandline option?
- To: Axel Kittenberger <Anshil at gmx dot net>
- Subject: Re: -D commandline option?
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 11 Jan 2001 16:39:00 +0000
- Cc: binutils at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <27177.979210798@www12.gmx.net>
Axel Kittenberger wrote:
>
> Okay, according to the docu the -D option is ignored...
>
> Don't I've any possibilty to do condition compiling from command line?
Yes, invoke the gcc C preprocessor on it. The preferred way to do this is
to give it the extension .S (and it has to be a capital S). Then e.g.
gcc -o foo.o foo.S
> The reason is this, I've some header files that are included both, from c
> and from assembler files... so I used conditionals to distinguish between
> these....
> Other way, does 'as' predefine any macros identifing itself? (like
> __GNU_C__ in gcc)
Once you are using the C preprocessor, you can use the macro __ASSEMBLER__
to tell if it was included from assembler or not.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine