Cross-compiling Valgrind for ARM

后端 未结 2 540
滥情空心
滥情空心 2021-01-05 00:07

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 v

相关标签:
2条回答
  • 2021-01-05 00:47

    A bit late to the party but for any one else coming here, it seems the valgrind build system differ between setting the environment variables in the shell and passing them as arguments to configure. Try:

    $ export CROSS_COMPILE=arm-fsl-linux-gnueabi-
    $ ./configure --target=arm-fsl-linux-gnueabi \
                  --host=armv7-fsl-linux-gnueabi \
                  --prefix=/opt/valgrind \
                  CFLAGS=-static \
                  CC=${CROSS_COMPILE}gcc \
                  CPP=${CROSS_COMPILE}cpp \
                  CXX=${CROSS_COMPILE}g++ \
                  LD=${CROSS_COMPILE}ld \
                  AR=${CROSS_COMPILE}ar
    
    0 讨论(0)
  • 2021-01-05 01:02

    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.

    0 讨论(0)
提交回复
热议问题