How to cross compile Valgrind for PPC405

Here are the few steps required for cross compilation of valgrind for the PowerPC architecture.

First you need to get download the source.  There is a bug in cross compilation for latest release which is fixed in the source tree but not in the latest release.  So we have to check out straight from subversion:
svn co svn:// valgrind

I have created a little script to define the build environment:

export  CC=/nett/linux/MontaVista401/pro/devkit/ppc/405/bin/ppc_405-gcc
export  LD=/nett/linux/MontaVista401/pro/devkit/ppc/405/bin/ppc_405-ld
export  CXX=/nett/linux/MontaVista401/pro/devkit/ppc/405/bin/ppc_405-g++
export  AR=/nett/linux/MontaVista401/pro/devkit/ppc/405/bin/ppc_405-ar
export  CPP=/nett/linux/MontaVista401/pro/devkit/ppc/405/bin/ppc_405-cpp
./configure  --host=powerpc-unknown-linux --target=powerpc-unknown-linux  --prefix=/local/valgrind --build=i486-cross-linux-gnu</pre>

Then you just have to make && make install.  Simple!


1 Comment

Filed under Uncategorized

One response to “How to cross compile Valgrind for PPC405

  1. Stu

    Nice little script, cheers :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s