This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -D commandline option?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]