#!/bin/sh source ./common options_do_configure=1 options_do_build=1 options_do_install=1 if [ "$1" == "-i" ]; then options_do_configure= options_do_build= options_do_install=1 fi mkdir -p build/gcc-$gcc_ver ln -Tsfrv unpacked/mpc-$mpc_ver unpacked/gcc-$gcc_ver/mpc ln -Tsfrv unpacked/mpfr-$mpfr_ver unpacked/gcc-$gcc_ver/mpfr ln -Tsfrv unpacked/isl-$isl_ver unpacked/gcc-$gcc_ver/isl cd build/gcc-$gcc_ver if [ -n "$options_do_configure" ]; then echo "Configuring gcc-${gcc_ver} (stage 1)" ../../unpacked/gcc-$gcc_ver/configure \ --prefix=$prefix_dir \ --target=$target \ --with-newlib \ --with-gnu-as \ --with-gnu-ld \ --enable-lto \ --enable-linker-build-id \ --disable-libmudflap \ --disable-libgomp \ --disable-libssp \ --disable-libstdcxx-pch \ --enable-multiarch \ --enable-soft-float \ --enable-languages=c,c++ \ --with-headers=../../unpacked/newlib-$newlib_ver/newlib/libc/include \ --disable-shared \ >configure-stage-1.log 2>&1 ret=$? if [ $ret -ne 0 ]; then less configure-stage-1.log; exit 1; fi fi if [ -n "$options_do_build" ]; then echo "Building gcc-$gcc_ver (stage 1)" make -j$jobs all >build-stage-1.log 2>&1 ret=$? if [ $ret -ne 0 ]; then less build-stage-1.log; exit 1; fi fi if [ -n "$options_do_install" ]; then echo "Installing gcc-$gcc_ver (stage 1)" make install >install-stage-1.log 2>&1 ret=$? if [ $ret -ne 0 ]; then less install-stage-1.log; exit 1; fi fi if [ -z "$options_do_configure$options_do_build$options_do_install" ]; then echo "Nothing to be done for gcc-$gcc_ver (stage 1)" else echo "Done with gcc-$gcc_ver (stage 1)" fi