用于ARM的交叉编译Valgrind [英] Cross-compiling Valgrind for ARM
本文介绍了用于ARM的交叉编译Valgrind的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要交叉编译VALGRIND才能在运行Linux的Freescale i.MX278(ARM 9)上运行。我有飞思卡尔本身提供的工具链。
I need to cross-compile VALGRIND to run on Freescale i.MX278 (ARM 9) running Linux. I have the tool chain provided by Freescale itself.
我已经将PATH变量设置为工具链路径。我正在进一步使用以下命令:
I have already set the PATH variable to tool chain path. I'm using following command further:
$ export CROSS_COMPILE=arm-fsl-linux-gnueabi-
$ export CC=${CROSS_COMPILE}gcc
$ export CPP=${CROSS_COMPILE}cpp
$ export CXX=${CROSS_COMPILE}g++
$ export LD=${CROSS_COMPILE}ld
$ export AR=${CROSS_COMPILE}ar
$ ./configure --target=arm-fsl-linux-gnueabi \
--host=armv7-fsl-linux-gnueabi \
--prefix=/opt/valgrind \
CFLAGS=-static
它通过 ./ configure
,但是在 make
上失败,并显示以下错误:
It passes the ./configure
but fails on make
with following error:
gcc: error: unrecognized command line option ‘-marm’
推荐答案
首先运行以下命令在配置文件中进行更改
First run the below command to make a change in the configure file
sed -i -e s#armv7#arm#g configure
sed -i -e "s#armv7#arm#g" configure
然后运行configure选项。
Then run the configure option.
它将被交叉编译成功。
这篇关于用于ARM的交叉编译Valgrind的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文