#!/bin/sh

PREFIX=$(pwd)/root

cd gcc
./contrib/download_prerequisites
cd ..
mkdir build-gcc
cd build-gcc
../gcc/configure --prefix="$PREFIX" \
                 --disable-nls \
                 --enable-languages=c \
                 --target=x86_64-elf \
                 --disable-bootstrap \
                 --without-headers \
                 --disable-shared \
                 --disable-threads \
                 --disable-libssp \
                 --disable-libquadmath \
                 --disable-libgomp \
                 --disable-libatomic \
                 --disable-libmudflap \
                 --disable-multilib
make -j$(nproc)
make install
