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

谁都会走 提交于 2019-12-07 06:46:32

问题


I need to compile a program for Raspberry PI 3+ on Linux machine, and code must be compliant with c++17 standard. Official toolchain is outdated and lack c++17 compilation option. 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

2) Installing arm-linux-gbueabi-gcc package, as proposed here: Cross-compiling for Raspberry pi with modern gcc

What is the difference between two options? Is there some other possibilities that will work?


回答1:


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:

The GCC versions available as of now are as follows:

  • GCC 6.3.0
  • GCC 7.4.0
  • GCC 8.2.0
  • GCC 8.3.0

And, the Supported Environments:

  • Cross-Compiler: All Linux Distros (x32/x64) are currently supported.
  • Native-Compiler: All Raspberry Pi version/model with Raspbian OS is supported. Other OS may/may-not work.

also the currently Supported Languages are:

  • C++
  • C
  • Fortran


来源:https://stackoverflow.com/questions/52521138/cross-compilation-special-cross-compiler-or-just-gcc-with-option-march

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!