Commits

Cody Schafer committed 7b2e248

support downloading a tarball of gcc master from github.

  • Participants
  • Parent commits 215f53f

Comments (0)

Files changed (1)

 BINUTILS_VERSION=2.23.1
 #http://www.netgull.com/gcc/snapshots/4.8-20130210/gcc-4.8-20130210.tar.bz2
 #GCC_VERSION="4.8-$(date '+%Y%m%d')"
-GCC_VERSION="4.8-20130210"
-GCC_TYPE=snapshot
+#GCC_VERSION="4.8-20130210"
+#GCC_TYPE=snapshot
+GCC_VERSION=master
+GCC_TYPE=master
 MPFR_VERSION=3.1.1
 GMP_VERSION=5.1.1
 MPC_VERSION=1.0.1
 
 do_gcc () {
 	if [ $GCC_TYPE = "release" ]; then
+		GCC_EXT=bz2
 		download "gcc-$GCC_VERSION.tar.bz2" \
 			"http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2"
 	elif [ $GCC_TYPE = "snapshot" ]; then
+		GCC_EXT=bz2
 		SITE="http://www.netgull.com/gcc"
 		download "gcc-$GCC_VERSION.tar.bz2" \
 			"$SITE/snapshots/$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2"
+	elif [ $GCC_TYPE = "master" ]; then
+		GCC_EXT=gz
+		download "gcc-master.tar.gz" \
+			"https://github.com/mirrors/gcc/archive/master.tar.gz"
 	else
 		die "Invalid GCC_TYPE"
 	fi
 	extract "mpfr-$MPFR_VERSION.tar.bz2"
 	extract "gmp-$GMP_VERSION.tar.bz2"
 	extract "mpc-$MPC_VERSION.tar.gz"
-	extract "gcc-$GCC_VERSION.tar.bz2"
+	extract "gcc-$GCC_VERSION.tar.$GCC_EXT"
 
 	ln -s "$SRC/mpfr-$MPFR_VERSION" "$SRC/gcc-$GCC_VERSION/mpfr"
 	ln -s "$SRC/gmp-$GMP_VERSION"   "$SRC/gcc-$GCC_VERSION/gmp"