summaryrefslogtreecommitdiff
path: root/6-build-gcc-stage-2.sh
blob: 15e5e3c19c177a495cd9dbce846a013a10bffcd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -e
source ./common
export PATH="$prefix_dir/bin:${PATH:+:${PATH}}"

mkdir -p build/gcc-$gcc_ver-stage-2
cd build/gcc-$gcc_ver-stage-2
echo "Configuring gcc-${gcc_ver} (stage 2)"
../../unpacked/gcc-$gcc_ver/configure --prefix=$prefix_dir --target=$target --enable-languages=c,c++ >configure-stage-2.log 2>&1
if [ ! $? ]; then less configure-stage-2.log; exit; fi
echo "Building gcc-$gcc_ver (stage 2)"
make -j10 all-gcc >build-stage-2.log 2>&1
if [ ! $? ]; then less build-stage-2.log; exit; fi
echo "Installing gcc-$gcc_ver (stage 2)"
make install-gcc >install-stage-2.log 2>&1
if [ ! $? ]; then less install-stage-2.log; exit; fi
echo "Done with gcc-$gcc_ver (stage 2)"