使用本地编译GCC的手臂交叉编译器 [英] compiling native GCC for arm using cross-compiler

查看:297
本文介绍了使用本地编译GCC的手臂交叉编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待一个ARM系统GCC创建一个土生土长的构建和我遇到了一些麻烦。构建机上的i686-Linux操作系统。每个教程中,我看到告诉我如何建立实际的交叉编译套件(这是我使用crosstools-NG已完成)。不过,我没有看到任何有关本地编译GCC ARM。我使用的配置字符串是下面,我曾与头只设置了SYSROOT。我也有交叉编译并安装了GMP和MPFR。

I am looking to create a native build of GCC for an ARM system and I am running into some trouble. The build machine is i686-linux. Every tutorial I see tells me how to set up the actual cross compiling suite (which I have already done using crosstools-ng). However, I don't see anything related to compiling native ARM GCC. The configure string I used is below, I have set up the sysroot only with headers. I have also cross-compiled and installed GMP and MPFR.

../../gcc-4.3.5/configure –host=arm-unknown-linux-gnueabi –build=i686-build_pc-linux-gnu –target=arm-unknown-linux-gnueabi –prefix=/home/vm/gcc-native/sysroot –with-sysroot=/home/vm/gcc-native/sysroot –enable-shared –enable-threads –disable-libmudflap –disable-libssp –disable-libgomp –disable-libstdcxx-pch –with-gnu-as –with-gnu-ld –enable-languages=c,c++ –enable-symvers=gnu –enable-__cxa_atexit –disable-nls –disable-multilib –with-gmp=/home/vm/gcc-native/sysroot/ –with-mpfr=/home/vm/gcc-native/sysroot/

GCC将建立一段时间,但随后这个模具:

GCC will build for a while but then dies with this:

检查目标文件后缀...配置:错误:无法计算出目标文件后缀:不能编译

我不知道如何做到这一点连我的系统上运行,因为我建立在i686-linux和目标/主机都是ARM的Linux操作系统。我的想法,现在是要找到一个LTIB发行,看着海合会一个规范文件,并试图按照所有的步骤。这LTIB随我船上的GCC编译失败我的系统上,由于与std命名空间冲突。

I am not sure how this would even run on my system as I am building on i686-linux and the target/host are both arm-linux. My thought right now is to find a ltib distro and looking at a spec file for GCC and trying to follow all of the steps. The GCC that ltib shipped with for my board fails to compile on my system due to conflicts with the std namespace.

任何信息/链接将AP preciated!

Any info/links would be appreciated!

推荐答案

照照的config.log文件(也许不是顶级的),看看它是试图做当测试失败。只需用grep的不能计算后缀消息,你应该找到合适的位(它不会在文件的结尾)。

Look in the config.log file (maybe not the top-level one) and see what it was trying to do when the test failed. Just grep for the cannot compute suffix message and you should find the right bit (it won't be at the end of the file).

请注意,你需要一个工作手臂未知的Linux-gnueabi-GCC 路径上的某个地方,如果你想建立一个跨本地工具链。即你需要一个交叉编译器来构建跨本地编译器。

Note that you'll need a working arm-unknown-linux-gnueabi-gcc on your path somewhere if you want to build a cross-native toolchain. I.e. you need a cross compiler to build cross-native compiler.

这篇关于使用本地编译GCC的手臂交叉编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆