#!/bin/sh
set -e
makeflags=-j6

mkdir binutils
(
	cd binutils
	../binutils-configure.sh
	make $makeflags
	make $makeflags install
	cd ..
)

mkdir gcc-bootstrap
(
	cd gcc-bootstrap
	../gcc-bootstrap-configure.sh
	make $makeflags
	make $makeflags install
	cd ..
)

mkdir musl
(
	cd musl
	../musl-configure.sh
	make $makeflags
	make $makeflags install
	cd ..
)

mkdir gcc
(
	cd gcc
	../gcc-final-configure.sh
	make $makeflags
	make $makeflags install
	cd ..
)
