#!/bin/bash
set -ex
yum install -y gcc gcc-c++ make bison flex mpfr-devel texinfo xz bzip2
bash download_src.sh
tar -xvf gcc-8.3.0.tar.xz
cd gcc-8.3.0
./contrib/download_prerequisites
export PREFIX="/usr/local/gcc-8.3.0"
./configure --prefix="$PREFIX" --disable-nls --disable-multilib --enable-languages=c,c++,fortran
make -j4
make install
cd /root/
rm -rf /root/*
yum remove -y gcc gcc-c++ bison flex mpfr-devel
