Date: | August 2012 |
---|---|
Author: | Raphael 'kena' Poss |
Abstract
This note explains how to install the cross-utilities, cross compilers and MGSim simulator. For questions, requests for help, etc., please post on the course's mailing list.
Get the latest binutils source from https://www.gnu.org/software/binutils/
Configure the binutils for the Alpha ISA:
tar -xzf .... cd ... mkdir build-alpha cd build-alpha ../configure --target=alpha-linux-gnu --disable-werror --prefix=/your/install/dir
(Choose a target prefix where you have disk space available. The total tooling may weigh up to 100MB.)
Build & install:
make make install
Repeat #2 and #3 with the MIPS target:
cd .. mkdir build-mips cd build-mips ../configure --target=mipsel-linux-gnu --disable-werror --prefix=/your/install/dir make make install
(you can use the same target directory as in #2)
Check the installation was successful:
export PATH=/your/install/dir/bin:$PATH alpha-linux-gnu-as --version mipsel-linux-gnu-as --version
This should report the correct version numbers.
Ensure you have libgmp ( http://gmplib.org/ ), libmpc ( http://www.multiprecision.org/ ) and libmpfr ( http://www.mpfr.org/ ) installed, with development files.
Get the latest GNU C compiler (core package) from http://gcc.gnu.org/
Configure the GNU C compiler for the Alpha ISA:
tar -xzf .... cd ... mkdir build-alpha cd build-alpha ../configure --target=alpha-linux-gnu \ --disable-bootstrap --disable-libmudflap --disable-libssp \ --disable-coverage --disable-gdb --disable-lto --disable-threads \ --disable-nls --disable-multilib --disable-libquadmath \ --enable-languages=c --prefix=/your/install/dir
(You might need to add the following at the end of the configure command line: CPPFLAGS=-I/path/to/include and LDFLAGS=-L/path/to/lib to indicate where the extra libs from step #1 can be found)
You then need to disable some components manually to simplify the install:
grep -v 'maybe-[a-z]*-target-\(libgcc\|libiberty\|libgomp\|zlib\)' <Makefile >Makefile.tmp mv Makefile.tmp Makefile
Build & install:
make make install
Repeat #3-#5 with the MIPS target:
cd .. mkdir build-mips cd build-mips ../configure --target=mipsel-linux-gnu \ --disable-bootstrap --disable-libmudflap --disable-libssp \ --disable-coverage --disable-gdb --disable-lto --disable-threads \ --disable-nls --disable-multilib --disable-libquadmath \ --enable-languages=c --prefix=/your/install/dir grep -v 'maybe-[a-z]*-target-\(libgcc\|libiberty\|libgomp\|zlib\)' <Makefile >Makefile.tmp mv Makefile.tmp Makefile make make install
(you can use the same target directory as in #3)
Check the installation was successful:
export PATH=/your/install/dir/bin:$PATH alpha-linux-gnu-gcc --version mipsel-linux-gnu-gcc --version
This should report the correct version numbers.
Ensure you have libev ( http://software.schmorp.de/pkg/libev.html ), argp ( standard in GNU C Library, otherwise argp-standalone http://www.lysator.liu.se/~nisse/misc/ ), GNU Make, and Python 2.x ( http://www.python.org/ ) installed, with development files. If possible ensure that SDL is also installed: http://www.libsdl.org/
Get the latest MGSim sources from http://dist.svp-home.org/deploy/
Configure MGSim for the Alpha ISA:
tar -xzf .... cd ... mkdir build-mtalpha cd build-mtalpha ../configure --target=mtalpha \ --disable-abort-on-trace-failure --disable-verbose-trace-checks \ --prefix=/your/install/dir
(You might need to add the following at the end of the configure command line: CPPFLAGS=-I/path/to/include and LDFLAGS=-L/path/to/lib to indicate where the extra libs from step #1 can be found)
Build & install:
make make install
Check the installation was successful:
export PATH=/your/install/dir/bin:$PATH mgsim --version
This should report the correct version numbers.