public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Chengyin Yao <chengyin.yao@live.com>
Cc: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: How to move gcc to compile to my own architecture?
Date: Fri, 16 Sep 2022 17:27:54 +0100	[thread overview]
Message-ID: <CAH6eHdTM17od+0__y28CK1SVkrx5_6wSHtPxnfAm8JO=-0mrxw@mail.gmail.com> (raw)
In-Reply-To: <AM5PR0602MB3251080495DE121D2397444DE3489@AM5PR0602MB3251.eurprd06.prod.outlook.com>

On Fri, 16 Sept 2022 at 17:05, Chengyin Yao via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Yea so I'm just wondering, how to compile gcc to (my own) architecture cpu that has a completely different architecture?

I'm not sure what you mean by "move gcc", and what is this "completely
different architecture"? The best answers depend on what you mean.

Have you created your own CPU with its own instruction set? Then you
want to "port" GCC (and binutils for the assembler and linker) to your
architecture. That's quite a lot of work. You could start by reading
https://gcc.gnu.org/onlinedocs/gccint/Back-End.html and
https://wiki.osdev.org/Porting_GCC_to_your_OS

  reply	other threads:[~2022-09-16 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 16:03 Chengyin Yao
2022-09-16 16:27 ` Jonathan Wakely [this message]
2022-09-16 19:50   ` Jackson Pfeffer
2022-09-16 20:09     ` Jonathan Wakely

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='CAH6eHdTM17od+0__y28CK1SVkrx5_6wSHtPxnfAm8JO=-0mrxw@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=chengyin.yao@live.com \
    --cc=gcc-help@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).