public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* reg. cross compiling
@ 2004-11-21 18:02 Santhu
  2004-11-21 21:18 ` Peter Barada
  0 siblings, 1 reply; 2+ messages in thread
From: Santhu @ 2004-11-21 18:02 UTC (permalink / raw)
  To: gcc

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: reg. cross compiling
  2004-11-21 18:02 reg. cross compiling Santhu
@ 2004-11-21 21:18 ` Peter Barada
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Barada @ 2004-11-21 21:18 UTC (permalink / raw)
  To: santhu.kumar; +Cc: gcc


>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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-21  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-21 18:02 reg. cross compiling Santhu
2004-11-21 21:18 ` Peter Barada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).