-D commandline option?

Jonathan Larmour jlarmour@redhat.com
Thu Jan 11 08:39:00 GMT 2001


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


More information about the Binutils mailing list