After installation of the CygWin or the MSys/MingW environment
for Windows you are ready to compile the needed cross-compiler
for the PowerPC processor.
First we have to prepare a directory structure for our
compilations. Go to the root of your Cygnus/MingW-Environment and
make a directory called GCC (I will use the same
locations and descriptions as Hitmen do in their guide
for easier adaption).
Inside this directory make the three directories build-binutils, build-gcc and build-newlib.
For easier understanding here's a little tree:
GCC
build-binutils
build-gcc
build-newlib
Copy your downloaded source tar-balls (those files
that end with .tar.gz or .tar.bz2)
into the GCC directory.
Now let's unzip and untar these files.
- Use the following commandline to unpack the files:
.tar.gz: gunzip filename.tar.gz
.tar.bz2: bunzip2 filename.tar.bz2
- Use the following commandline to untar the files:
tar xf filename.tar
Now your directory structure should look someting like:
GCC
build-binutils
build-gcc
build-newlib
binutils-2.14
gcc-3.3.2
newlib-1.11.0
Now everything is set to compile the whole xGCC toolchain
for the PowerPC architecture.
NOTE:
If you are working from a MSys/MingW environment you have
to patch the GCC sources to get them to compile from
MingW.
Credits: The credits for the gcc diff goes to Wintermute (visit his homepage) who also offers a complete pre-compiled GCC toolset at his site.
-
- Open up a MingW shell and change to the /GCC directory
cd /GCC
- Apply the patch to the GCC sourcetree
patch -p0 <gcc-3.2.2-MingW.diff
Now the sources are ready to be successfully compiled
on MingW.
|