senx
senx

Reputation: 650

How to determine architecture to build GCC cross compiler?

I'm trying to set up a build server on Linux which I will use to build C/C++ apps for Windows and Mac. I know that GCC supports a body of different architectures but I can't figure out how to determine targets against which I need to build GCC cross compiler.

Could someone please explain this to me?

Thanks in advance.

P.S. I know that precompiled solutions already exist, but I just want to understand this in detail by making a deep dive.

Upvotes: 3

Views: 1588

Answers (1)

Vincent Rivière
Vincent Rivière

Reputation: 136

On the target machine, run:

gcc -dumpmachine

Then use the result in the --target option when building your cross toolchain.

Upvotes: 6

Related Questions