gnu gcc and as

Mar 28, 2010 2 Replies

I am using a GNU cross-compilation tool chain.



The problem I have is that, this tool chain, contain two AS command, one is AS other is AS.xxx. I am kind new to AS. In the past, when I compile a assembly code file code.S, I just call GCC, GCC call the AS internally. But this time, GCC interannlly, I think, is calling AS, but for CPU type I use, it has to be AS.xxx. So I had to explictly call AS.XXX, interad of GCC. The problem I noticed that AS.XXX can not deal well with preprocessor macros, like #ifdef etc. While GCC can properly processes macros, but it can not compile my code.



Any suggestions? Thanks,


For example in my cross toolchains I have arm-1136jfs-linux-gnueabi-as and arm-1136jfs-linux-gnueabi-gcc

To ensure the 'arm-1136jfs-linux-gnueabi-as' should be used by the precompiler I simply call 'arm-1136jfs-linux-gnueabi-gcc' instead of the plain 'gcc' for each source file.

jbe

Run the preprocessor separately, using the -E option.

--

Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required