reg. cross compiling
Peter Barada
peter@the-baradas.com
Sun Nov 21 21:18:00 GMT 2004
>my task is to convert the C-code into VM-Code (VM is a kind of
>assembly lang developed by my collegues). for this, i'm taking the GNU
>assembly code generated by GCC by compiling with '-S' option.
>but the problem is that GCC is generating the GAS code based on the
>architecture of the machine it is running on.
>is there any way i can set the architecture info to make GCC to
>generate the assembly code for a target architecture? ( i.e, running
>on SPARC machine can i generate the assembly code for Intel x86 )
>thank you in advance.
Sure.
You want to build a cross-compiler, one to run on a sparc, but
produce code for the x86. Look at crosstool
(www.kegel.com/crosstool/) for a great tool to build GNU cross-toolchains,
and also look at the crossgcc mailing list archives
http://sources.redhat.com/ml/crossgcc/
--
Peter Barada
peter@the-baradas.com
More information about the Gcc
mailing list