直接点就是编译arm-gcc
我找了几天都没有找到编译好了的,结果一下子灵光一现,源码都有为什么不编译呢。
1.下载gcc源码
gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz
这是我下载的最新源码,需要翻墙下载https://releases.linaro.org/components/toolchain/gcc-linaro/
2.解压和编译过程
cd gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf
./configure --target=arm-none-linux-gnueabihf --prefix=/usr/local/arm5.4/
如果是configure参数有问题需要设置一下
make distclean
--target 是你需要编译的版本 none 这里可以你自己写一个
--perfix 是安装路径
修改一现Makefile文件,找到并添加,不是替换,是添加。不然会报错,这个是在国外网站上看到的,国内就没有几个人编译个这个东西
有兴趣可以看一下https://github.com/richfelker/musl-cross-make/issues/11