Valgrind Cross Compilation for ARM

I need to cross-compile VALGRIND to run on Freescale i.MX278 (ARM 9) running Linux. I have a tool chain provided by Freescale itself.

I have already set the PATH variable to the tool chain chain. I use the 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 ./configure but fails on make with the following error:

 gcc: error: unrecognized command line option '-marm' 
+6
source share
1 answer

First run the command below to make changes to the configuration file

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

Then run the configure parameter.

It will be compiled successfully.

+13
source

Source: https://habr.com/ru/post/984843/


All Articles