This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: reg. cross compiling
- From: Peter Barada <peter at the-baradas dot com>
- To: santhu dot kumar at gmail dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 21 Nov 2004 01:54:05 -0500 (EST)
- Subject: Re: reg. cross compiling
- References: <761cb958041120224926e8e3da@mail.gmail.com>
>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