I shouldn't assume (you know what happens)... But I assume they are asking how to compile GCC from source on a machine running (for example) some ARM chip running Linux to get an executable GCC that will run on (for example) an Intel x64 chip running windows. I assume (there it is again) that they are compiling on one well known "architecture" targeting another well known (but different) "architecture". I'm a GCC noob, but I think this basically amounts to them needing a cross compiler. Beyond that... Is probably a question for Jonathan the great. Jackson Pfeffer On Fri, Sep 16, 2022, 11:28 Jonathan Wakely via Gcc-help < gcc-help@gcc.gnu.org> wrote: > On Fri, 16 Sept 2022 at 17:05, Chengyin Yao via Gcc-help > 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 >