4

I need to debug a multi-threaded program which keeps throwing horrible segmentation faults, and I chose Valgrind to do so. The problem, though, is that the code is cross-compiled and run in an ARMv5 machine. I tried to build Valgrind for that architecture, but configure failed because that version is not supported:

$ CC=arm-linux-gnueabi-gcc  ./configure --prefix=/opt/valgrind     \
  --host=armv5-none-linux-gnueabi --target=arm-none-linux-gnueabi  \
  --build=i386-ubuntu-linux

(...)
checking for a supported CPU... no (armv5)
configure: error: Unsupported host architecture. Sorry

Is there a way to solve this issue? Could it be somehow possible to compile for ARMv7 (which I read is fully supported), and use it in my platform? I found this question, but it was asked two years ago and the answer points to a patch for older versions of Valgrind.

Community
  • 1
  • 1
Carles Araguz
  • 1,157
  • 1
  • 17
  • 37

2 Answers2

5

If you get to compile valgrind for an ARMv5 instruction set CPU you cannot run it since valgrind only runs on ARMv7 CPUs.

Valgrind cross compilation for ARMv5tel

ARM support seems to be added since "Release 3.6.0 (21 October 2010)":

http://valgrind.org/docs/manual/dist.news.html

But it has to run on an ARMv7 CPU even if it supports older instruction sets.

I compiled valgrind for an ARMv5 and it does not run, it throws "Illegal instruction".

https://community.nxp.com/message/863066?commentID=863066#comment-863066

Community
  • 1
  • 1
0

In configure file change "armv7*" to "arm", then your compilation will success.