Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Leonel Gayard <leonel.gayard@gmail.com>
To: linux-mips@linux-mips.org
Subject: How do I compile GCC to generate MIPS code ?
Date: Thu, 17 Mar 2005 02:54:09 +0000	[thread overview]
Message-ID: <2ccb2254050316185449699409@mail.gmail.com> (raw)

Hi all,

I have recently started to study the MIPS architecture. For instance,
I wanted to have GCC compile C code into MIPS assembly and run it in
SPIM. (I have an Intel machine running Linux).

So I want to try something like this:

gcc -Wall -pedantic -S --march=mips1 test.c

in order to have it generate MIPS assembly.

It does not work. All I get is:

cc1: error: bad value (mips32) for -march= switch
cc1: error: bad value (mips32) for -mcpu= switch

Clearly, I need to recompile GCC so it has MIPS in its available
architectures. Remark, this is not cross-compiling, because I want GCC
to run on an i686 machine, it just generates MIPS code.

Can any one help me do this ?

Thank you
Leonel

             reply	other threads:[~2005-03-17  2:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17  2:54 Leonel Gayard [this message]
2005-03-17  4:24 ` How do I compile GCC to generate MIPS code ? Kumba
2005-03-17  4:28 ` Steven J. Hill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ccb2254050316185449699409@mail.gmail.com \
    --to=leonel.gayard@gmail.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox