简体   繁体   English

如何确定构建GCC交叉编译器的架构?

[英]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. 我正在尝试在Linux上建立一个构建服务器,我将用它来构建适用于Windows和Mac的C / C ++应用程序。 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. 我知道GCC支持一系列不同的体系结构,但我无法弄清楚如何确定构建GCC交叉编译器所需的目标。

Could someone please explain this to me? 有人可以向我解释一下吗?

Thanks in advance. 提前致谢。

PS I know that precompiled solutions already exist, but I just want to understand this in detail by making a deep dive. PS我知道预先编译的解决方案已经存在,但我只想深入了解这一点。

On the target machine, run: 在目标计算机上,运行:

gcc -dumpmachine

Then use the result in the --target option when building your cross toolchain. 然后在构建交叉工具链时使用--target选项中的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM