|
From: Yu, H. <hc...@te...> - 2012-03-01 09:17:44
|
Hi all, I am working on I.MX51 EVK Babbage board, I found my application eats up much memory and wants to use valgrind to check the memory status. Founded source code from valgrind.org. BSP gcc position /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc. The source code URL: http://valgrind.org/downloads/valgrind-3.7.0.tar.bz2 Modified configure file "armv7*)" to "armv7*|arm*)" Wrote build.sh: =============== export CXX=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-g++ export LD=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld export CPP=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-cpp export AR=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ar export AS=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-as export CCAS=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc export CFLAGS="-pipe -Os -msoft-float -I/home/nfs/usr/include" export LDFLAGS="-L/home/nfs/usr/lib" ./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i686-ubuntu-linux-gnu --prefix=/usr/local/valgrind =============== Then when build, it complains the -marm and -mcpu, since the cross compile tool chain does not need to specify the cpu, I wrote a script replace.sh, it modifies the genenrated Makefiles to remove or modify the -marm -mcpu: (this is not the original version since I changed it several times). =============== function modify() { cat Makefile | sed -e "s/-mcpu=cortex-a8/-march=armv7/" > Makefile1 mv Makefile1 Makefile } echo modifying~~ modify for dirlist in $(ls $(pwd)) do if test -d ${dirlist}; then cd ${dirlist} modify cd .. fi done =============== After that I still get error m_commandline.c:1: error: bad value (armv7) for -march= switch The BSP gcc 4.1.2 manual shows: the armv7 is not supported for that tool chain, does that mean I cannot compile valgrind using that tool chain? Appreciate your replies. Haichao |