简体   繁体   English

交叉编译:特殊的交叉编译器还是带有选项 -march 的 gcc?

[英]Cross compilation: special cross compiler or just gcc with option -march?

I need to compile a program for Raspberry PI 3+ on Linux machine, and code must be compliant with c++17 standard.我需要在 Linux 机器上为 Raspberry PI 3+ 编译一个程序,并且代码必须符合 c++17 标准。 Official toolchain is outdated and lack c++17 compilation option.官方工具链已过时且缺少 c++17 编译选项。 Two solutions that I can see right now are:我现在可以看到的两个解决方案是:

1) gcc has an option -march, which described here: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html 1) gcc 有一个选项 -march,这里描述: https : //gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

2) Installing arm-linux-gbueabi-gcc package, as proposed here: Cross-compiling for Raspberry pi with modern gcc 2) 安装 arm-linux-gbueabi-gcc 软件包,如下所示: Cross- compileing for Raspberry pi with modern gcc

What is the difference between two options?两个选项有什么区别? Is there some other possibilities that will work?还有其他一些可行的可能性吗?

If you want full Cross Compiler c++17 standard for your Raspberry Pi, you can try my Latest Pre-Built/Pre-Compiled Open-Sourced GCC Toolchains for Raspberry Pi along with well-documented instructions from this Github Repo :如果你想为你的 Raspberry Pi 使用完整的交叉编译器 c++17 标准,你可以尝试我的最新预构建/预编译开源 GCC 工具链,以及来自这个Github Repo 的详细说明

The GCC versions available as of now are as follows:目前可用的 GCC 版本如下:

  • GCC 6.3.0海湾合作委员会 6.3.0
  • GCC 7.4.0海湾合作委员会 7.4.0
  • GCC 8.2.0海湾合作委员会 8.2.0
  • GCC 8.3.0海湾合作委员会 8.3.0

And, the Supported Environments:并且,支持的环境:

  • Cross-Compiler: All Linux Distros (x32/x64) are currently supported.交叉编译器:当前支持所有 Linux 发行版 (x32/x64)。
  • Native-Compiler: All Raspberry Pi version/model with Raspbian OS is supported.本机编译器:支持所有带有 Raspbian 操作系统的 Raspberry Pi 版本/型号。 Other OS may/may-not work.其他操作系统可能/可能不工作。

also the currently Supported Languages are:目前支持的语言还有:

  • C++ C++
  • C C
  • Fortran复式

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

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