Hi,
I cross compiled valgrind for ppc32 and that worked fine for me. Below
are some commands which I used for the same-
1. go to valgrind directory
2. export CC= give the C compiler path here
3. export CXX= give the C++ compiler path here
4. go to configure file of valgrind and add a line "host_os=linux"
5. Then do -
./configure --prefix='pwd'/bins --host=i686-pc-linux
--target=ppc-linux --enable-tls=no
(You will have your binaries available at <valgrind directory>/bins/)
6. Then do make
if you still get error then let me know the error.
Thanks & Regards,
Richa
________________________________
From: Chris Bornmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2008 10:28 PM
To: [email protected]
Subject: [Valgrind-users] Cross-Compiling Valgrind
Hi All,
I'm trying to cross-compile Valgrind 3.3.1 on a x86 running Linux 2.6.9
for a PPC8313 that will be running Linux 2.6.21. I tried the following
for my configure script:
./configure --prefix=/home/cbornman/bin/valgrind --host=i686-intel-linux
--target=powerpc-linux --disable-tls
My CC environment variable is set to:
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wr
s-linux-gnu-gcc --sysroot
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot
When I run configure I see at the very beginning:
configure: WARNING: If you wanted to set the --build type, don't use
--host.
If a cross compiler is detected then cross compile mode will be
used.
Configure finishes but when I then do the make I see:
...stuff...
make[3]: Entering directory
`/home/cbornman/valgrind/valgrind-3.3.1/coregrind'
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wr
s-linux-gnu-gcc --sysroot
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot
-I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux
-I../coregrind/x86-linux -I../include -I../VEX/pub
-DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1
-DVGP_x86_linux=1 -m32 -g -Wno-long-long -c -o
libcoregrind_x86_linux_a-m_cpuid.o `test -f 'm_cpuid.S' || echo
'./'`m_cpuid.S
m_cpuid.S: Assembler messages:
m_cpuid.S:39: Error: Unrecognized opcode: `pushl'
m_cpuid.S:40: Error: Unrecognized opcode: `movl'
...more unrecognized opcodes...
The VG_PLATFORM and VGA_x86 defines indicate that make thinks it's
compiling for x86.
I also tried not setting --host but got the following:
./configure --prefix=/home/cbornman/bin/valgrind --target=powerpc-linux
--disable-tls checking for a BSD-compatible install... /usr/bin/install
-c checking whether build environment is sane... yes checking for
gawk... gawk checking whether make sets $(MAKE)... yes checking whether
to enable maintainer-specific portions of Makefiles... no checking
whether ln -s works... yes checking for gcc...
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wr
s-linux-gnu-gcc --sysroot
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot
checking for C compiler default output file name... a.out checking
whether the C compiler works... configure: error: cannot run C compiled
programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Does anybody have experience with configure and cross-compiling who can
point to what I'm doing wrong? Any suggestions for other things to try?
Thanks!
- chris
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users