Cody Schafer avatar Cody Schafer committed 7b2e248

support downloading a tarball of gcc master from github.

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"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.