From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9868 invoked by alias); 21 Nov 2004 06:54:24 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 9855 invoked from network); 21 Nov 2004 06:54:19 -0000 Received: from unknown (HELO baradas.org) (66.166.225.55) by sourceware.org with SMTP; 21 Nov 2004 06:54:19 -0000 Received: by baradas.org (Postfix, from userid 500) id E73F09842D; Sun, 21 Nov 2004 01:54:05 -0500 (EST) From: Peter Barada To: santhu.kumar@gmail.com Cc: gcc@gcc.gnu.org In-reply-to: <761cb958041120224926e8e3da@mail.gmail.com> (message from Santhu on Sun, 21 Nov 2004 12:19:48 +0530) Subject: Re: reg. cross compiling References: <761cb958041120224926e8e3da@mail.gmail.com> Message-Id: <20041121065405.E73F09842D@baradas.org> Date: Sun, 21 Nov 2004 21:18:00 -0000 X-SW-Source: 2004-11/txt/msg00724.txt.bz2 >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