Cross compile valgrind

来源:互联网 发布:投影机写码软件 编辑:程序博客网 时间:2024/06/05 22:58

1. Download source code from official website

wget http://valgrind.org/downloads/valgrind-3.9.0.tar.bz2
tar xvf valgrind-3.9.0.tar.bz2
cd valgrind-3.9.0
apt-get install automake
./autogen.sh

2. Modify Configuration file

vi configure
armv7*) 改成 armv7*|arm)

3. Configure

./configure –host=arm-linux CC=arm-none-linux-gnueabi-gcc CPP=arm-none-linux-gnueabi-cpp CXX=arm-none-linux-gnueabi-g++ –prefix=./valgrind

4. Make and install

make
make install

Notice:

  • –prefix=/path1 which should be consistance with target path on the embedded board, otherwise run valgrind, it would prompt“valgrind: failed to start tool ‘memcheck’ for platform ‘arm-linux’: No such file or directory”。
  • ARM version must be equal to or greater than v7
0 0
原创粉丝点击