Retro68/build-toolchain.sh
2012-03-29 10:30:42 +02:00

45 lines
923 B
Bash

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