Initial commit

This commit is contained in:
Markus Koch 2015-03-22 14:30:14 +01:00
commit ece3f52602
1 changed files with 43 additions and 0 deletions

43
build.sh Executable file
View File

@ -0,0 +1,43 @@
# Download
echo "Initializing..."
gccver="gcc-4.9.2"
rt=`pwd`
cpucores=`nproc`
cd "$rt"
mkdir install
mkdir source
cd source
echo "Downloading gcc..."
wget -c "ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/$gccver/$gccver.tar.bz2"
#tar xvf $gccver.tar.bz2
cd $gccver
./contrib/download_prerequisites
cd ..
echo "Downloading ghdl..."
hg clone http://hg.code.sf.net/p/ghdl-updates/code ghdl
echo "Configuring ghdl..."
cd ghdl
./configure --with-gcc="$rt/source/$gccver" --prefix="$rt/install"
make copy-sources
echo "Configuring gcc..."
cd "$rt/source/$gccver"
./configure --enable-libada --enable-languages=c,vhdl --disable-multilib --disable-bootstrap --prefix="$rt/install"
echo "Compiling...."
make -j$cpucores
echo "Installing..."
make install
echo "done."
echo "cp $rt/install/bin/ghdl /usr/local/bin/ghdl"
echo "mkdir /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/vhdl"
echo "cp -r $rt/install/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/vhdl /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/vhdl"