Cross-compiling Valgrind for ARM

▼魔方 西西 提交于 2019-12-06 23:52:16

问题


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.

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

It passes the ./configure but fails on make with following error:

gcc: error: unrecognized command line option ‘-marm’

回答1:


First run the below command to make a change in the configure file

sed -i -e "s#armv7#arm#g" configure

Then run the configure option.

It will be cross-compiled successfully.



来源:https://stackoverflow.com/questions/29514706/cross-compiling-valgrind-for-arm

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