Target specific behaviour
David Daney
ddaney@avtrex.com
Sat Feb 23 19:22:00 GMT 2008
Kevin André wrote:
> It seems it is not possible to have gcc behave as a cross compiler
> without compiling it as one.
You are correct.
> So I was wondering: what is there in GCC
> (except generating the actual assembler instructions) that is specific
> for the target that GCC was configured for?
>
Look in the GCC sources in the gcc/config/* directories. Each of these
target specific directories contains code for GCC's target. GCC's
architecture is such that only a single target is allowed for any given
instance of GCC.
> I am using a gcc that is configured as a normal compiler, but it's
> front end is used for compiling C code for another architecture. I
> have used options "-nostdlib -nostdinc" and specified replacement
> include paths. The size of types like "int" and the endianness are
> identical for both native and target architectures. Is the only
> difference that is left the ABI for the target architecture? Where is
> the ABI specified in the gcc sources?
>
In the target specific code in gcc/config/*.
> If you are wondering why I am asking this, refer to this message:
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-February/012653.html
>
That seems to be mostly about LLVM. This is gcc-help. LLVM and GCC are
not the same thing. Perhaps a message posted to a LLVM related forum
would yield better answers for you.
David Daney
More information about the Gcc-help
mailing list