2012-05-17 05:37:06 +04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Toolchain Installer for Debian-like systems. If you're running
|
|
|
|
# something else, you're pretty much on your own.
|
|
|
|
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
2012-10-08 11:17:32 +04:00
|
|
|
. $DIR/util.sh
|
2012-05-17 05:37:06 +04:00
|
|
|
|
2012-05-17 06:21:37 +04:00
|
|
|
function deleteUnusedGCC () {
|
2012-12-05 08:37:19 +04:00
|
|
|
# If you are running from the non-core GCC, run this function delete the stuff we don't care about
|
2012-05-17 06:21:37 +04:00
|
|
|
rm -r $1/boehm-gc $1/gcc/ada $1/gcc/go $1/gcc/java $1/gcc/objc $1/gcc/objcp $1/gcc/testsuite $1/gnattools $1/libada $1/libffi $1/libgo $1/libjava $1/libobjc
|
|
|
|
}
|
|
|
|
|
2012-05-17 05:37:06 +04:00
|
|
|
pushd "$DIR" > /dev/null
|
|
|
|
|
|
|
|
if [ ! -d tarballs ]; then
|
|
|
|
mkdir tarballs
|
|
|
|
fi
|
|
|
|
pushd tarballs > /dev/null
|
2012-05-31 17:53:42 +04:00
|
|
|
$INFO "wget" "Pulling source packages..."
|
2012-12-05 08:15:59 +04:00
|
|
|
grab "gcc" "http://gcc.petsads.us/releases/gcc-4.6.0" "gcc-core-4.6.0.tar.gz"
|
|
|
|
grab "g++" "http://gcc.petsads.us/releases/gcc-4.6.0" "gcc-g++-4.6.0.tar.gz"
|
|
|
|
#grab "mpc" "http://www.multiprecision.org/mpc/download" "mpc-0.9.tar.gz"
|
|
|
|
#grab "mpfr" "http://www.mpfr.org/mpfr-3.0.1" "mpfr-3.0.1.tar.gz"
|
|
|
|
#grab "gmp" "ftp://ftp.gmplib.org/pub/gmp-5.0.1" "gmp-5.0.1.tar.gz"
|
2012-09-13 07:06:22 +04:00
|
|
|
grab "binutils" "http://ftp.gnu.org/gnu/binutils" "binutils-2.22.tar.gz"
|
|
|
|
grab "newlib" "ftp://sources.redhat.com/pub/newlib" "newlib-1.19.0.tar.gz"
|
|
|
|
grab "freetype" "http://download.savannah.gnu.org/releases/freetype" "freetype-2.4.9.tar.gz"
|
|
|
|
grab "zlib" "http://zlib.net" "zlib-1.2.7.tar.gz"
|
2012-12-05 08:15:59 +04:00
|
|
|
grab "libpng" "https://github.com/downloads/klange/osdev" "libpng-1.5.13.tar.gz"
|
2012-05-17 05:37:06 +04:00
|
|
|
$INFO "wget" "Pulled source packages."
|
2012-09-30 02:57:41 +04:00
|
|
|
rm -rf "binutils-2.22" "freetype-2.4.9" "gcc-4.6.0" "gmp-5.0.1" "libpng-1.5.13" "mpc-0.9" "mpfr-3.0.1" "newlib-1.19.0" "zlib-1.2.7"
|
2012-05-17 05:37:06 +04:00
|
|
|
$INFO "tar" "Decompressing..."
|
2012-12-05 08:15:59 +04:00
|
|
|
deco "gcc" "gcc-core-4.6.0.tar.gz"
|
|
|
|
deco "g++" "gcc-g++-4.6.0.tar.gz"
|
|
|
|
#deco "mpc" "mpc-0.9.tar.gz"
|
|
|
|
#deco "mpfr" "mpfr-3.0.1.tar.gz"
|
|
|
|
#deco "gmp" "gmp-5.0.1.tar.gz"
|
2012-05-17 05:56:31 +04:00
|
|
|
deco "binutils" "binutils-2.22.tar.gz"
|
2012-05-17 06:21:37 +04:00
|
|
|
deco "newlib" "newlib-1.19.0.tar.gz"
|
2012-05-17 19:50:25 +04:00
|
|
|
deco "freetype" "freetype-2.4.9.tar.gz"
|
2012-09-13 07:06:22 +04:00
|
|
|
deco "zlib" "zlib-1.2.7.tar.gz"
|
2012-09-30 02:57:41 +04:00
|
|
|
deco "libpng" "libpng-1.5.13.tar.gz"
|
2012-05-17 05:37:06 +04:00
|
|
|
$INFO "tar" "Decompressed source packages."
|
|
|
|
$INFO "patch" "Patching..."
|
2012-05-17 05:56:31 +04:00
|
|
|
patc "gcc" "gcc-4.6.0"
|
2012-12-05 08:15:59 +04:00
|
|
|
#patc "mpc" "mpc-0.9"
|
|
|
|
#patc "mpfr" "mpfr-3.0.1"
|
|
|
|
#patc "gmp" "gmp-5.0.1"
|
2012-05-17 05:56:31 +04:00
|
|
|
patc "binutils" "binutils-2.22"
|
2012-05-17 06:21:37 +04:00
|
|
|
patc "newlib" "newlib-1.19.0"
|
2012-05-17 19:50:25 +04:00
|
|
|
patc "freetype" "freetype-2.4.9"
|
2012-09-30 02:57:41 +04:00
|
|
|
patc "libpng" "libpng-1.5.13"
|
2012-05-17 05:37:06 +04:00
|
|
|
$INFO "patch" "Patched third-party software."
|
2012-05-17 06:21:37 +04:00
|
|
|
$INFO "--" "Running additional bits..."
|
2012-12-05 08:37:19 +04:00
|
|
|
#deleteUnusedGCC "gcc-4.6.0"
|
2012-05-17 06:21:37 +04:00
|
|
|
installNewlibStuff "newlib-1.19.0"
|
2012-05-17 05:37:06 +04:00
|
|
|
popd > /dev/null
|
|
|
|
|
2012-05-17 07:03:17 +04:00
|
|
|
mkdir build
|
|
|
|
mkdir local
|
|
|
|
|
2012-05-17 05:37:06 +04:00
|
|
|
popd > /dev/null
|