Read Me
gcc-toolchain
by benjamin gerard <ben@sashipa.com>
2003/05/05
Introduction:
------------
gcc-toolchain are shell scripts to help to build gcc cross compiler. I
have developped these scripts for my own use. Indeed I think it may be
useful to release them. I have only tested them on my linux x86. It
should probably works with other linux platform but may need
modifications for other GNU environment (like cygwin).
Files:
-----
gcc-toolchain/
Top directory.
gcc-toolchain/build/
Build directory.
gcc-toolchain/build/mkbuilddir.sh
Script to create a build directory for a given package on a
given target.
gcc-toolchain/build/build-tools.sh
Script to be 'sourced' by other build scripts.
gcc-toolchain/build/build-cross-binutils.sh
Script to build cross platform binutils.
gcc-toolchain/build/build-cross-gcc.sh
Script to build cross platform gcc.
Building:
--------
- Goto to the top directory.
Make binutils
=============
- Copy, link or unarchive the binutils package here. This should
give something like: gcc-toolchain/binutils-{VERSION}.
- Go to the build directory. A run the ./mkbuilddir.sh script. You
must be this directory to perform this operation. Anyway the
script should throw an error if you run it from anywhere
else. This script takes 3 parameters <target> <tool> <version>.
<target> specifies the cross compiler target (sh-elf ...).
<tool> specifies the package to compile. Here it is binutils.
<version> must match the package version (2.13).
e.g: ./mkbuild sh-elf binutils 2.13
This script only checks if the ../<tool>-<version> directory exist
and creates a ./<target>-<tool>-<version> directory. If tool in
one of binutils or gcc, the script creates a additionnal symbolic
links build.sh to the proper build script.
- Go to target build directory (the one that have just been
created) and run the build.sh script. This script takes one
parameter in [ clean uninstall build ].
<clean> : clean the build target build directory.
<uninstall> : uninstall is not implemented in binutils nor gcc Makefile.
<build> : configure, build and install.
You must specify the target directory in the PREFIX environment variable.
e.g: cd sh-elf-binutils-2.13
export PREFIX=$HOME/cross-gcc
./build.sh build
Make gcc
========
Process exactly as for binutils. The PREFIX installation directory
MUST be the same or gcc compilation will failed at step 2. The gcc
compilation options must be edited in the
gcc-toolchain/build/build-cross-gcc.sh The default script
configuration will build a C and C++ compiler with newlib. It disables
multi-threading, NLS and more ...