toolchain build script

This commit is contained in:
Wolfgang Thaller 2012-03-29 10:30:42 +02:00
parent f6d2cf79e9
commit cc2f5140a8

44
build-toolchain.sh Normal file
View File

@ -0,0 +1,44 @@
SRC=$(readlink -f `dirname $0`)
mkdir -p binutils-build
mkdir -p toolchain
PREFIX=`pwd`/toolchain/
cd binutils-build
export CFLAGS=-Wno-unused-but-set-variable
$SRC/binutils/configure --target=m68k-unknown-elf --prefix=$PREFIX
make -j8
make install
cd ..
mkdir -p gcc-build
cd gcc-build
$SRC/gcc/configure --target=m68k-unknown-elf --prefix=$PREFIX --enable-languages=c,c++ --with-arch=m68k --with-cpu=m68000 --disable-libssp
make -j8
make install
cd ..
#mkdir -p newlib-build
#cd newlib-build
BINUTILS=$(readlink -f binutils-build)
mkdir -p elf2flt-build
cd elf2flt-build
$SRC/elf2flt/configure --target=m68k-unknown-elf --prefix=$PREFIX --with-binutils-build-dir=$BINUTILS
make -j8
make install
cd ..
rm -rf hfsutils
cp -r $SRC/hfsutils .
cd hfsutils
./configure --prefix=$PREFIX
make
make install
cd ..
runhaskell ../Retro68/PrepareHeaders.hs ../Retro68/Universal\ Headers toolchain/m68k-unknown-elf/include