Index: tools/toolchain.sh
===================================================================
--- tools/toolchain.sh	(revision 3a75cb80507723e951e810ea8df80521b5dd9901)
+++ tools/toolchain.sh	(revision d2bd00f03251193a55f3408b33cc01195ef6236d)
@@ -57,8 +57,8 @@
 EOF
 
-BINUTILS_VERSION="2.27"
+BINUTILS_VERSION="2.28"
 BINUTILS_RELEASE=""
 ## BINUTILS_PATCHES="toolchain-binutils-2.23.1.patch"
-GCC_VERSION="6.3.0"
+GCC_VERSION="7.1.0"
 ## GCC_PATCHES="toolchain-gcc-4.8.1-targets.patch toolchain-gcc-4.8.1-headers.patch"
 GDB_VERSION="7.12.1"
@@ -152,5 +152,5 @@
 	echo "Possible target platforms are:"
 	echo " amd64      AMD64 (x86-64, x64)"
-	echo " arm32      ARM"
+	echo " arm32      ARM 32b"
 	echo " ia32       IA-32 (x86, i386)"
 	echo " ia64       IA-64 (Itanium)"
@@ -158,6 +158,7 @@
 	echo " mips32eb   MIPS big-endian 32b"
 	echo " mips64     MIPS little-endian 64b"
-	echo " ppc32      32-bit PowerPC"
-	echo " ppc64      64-bit PowerPC"
+	echo " ppc32      PowerPC 32b"
+	echo " ppc64      PowerPC 64v"
+	echo " riscv64    RISC-V 64b"
 	echo " sparc64    SPARC V9"
 	echo " all        build all targets"
@@ -348,6 +349,6 @@
 	GDB_SOURCE="ftp://ftp.gnu.org/gnu/gdb/"
 	
-	download_fetch "${BINUTILS_SOURCE}" "${BINUTILS}" "2869c9bf3e60ee97c74ac2a6bf4e9d68"
-	download_fetch "${GCC_SOURCE}" "${GCC}" "677a7623c7ef6ab99881bc4e048debb6"
+	download_fetch "${BINUTILS_SOURCE}" "${BINUTILS}" "9e8340c96626b469a603c15c9d843727"
+	download_fetch "${GCC_SOURCE}" "${GCC}" "6bf56a2bca9dac9dbbf8e8d1036964a8"
 	download_fetch "${GDB_SOURCE}" "${GDB}" "06c8f40521ed65fe36ebc2be29b56942"
 }
@@ -390,4 +391,8 @@
 			LINUX_TARGET="ppc64-linux-gnu"
 			HELENOS_TARGET="ppc64-helenos"
+			;;
+		"riscv64")
+			LINUX_TARGET="riscv64-unknown-linux-gnu"
+			HELENOS_TARGET="riscv64-helenos"
 			;;
 		"sparc64")
@@ -514,26 +519,29 @@
 	
 	
-	echo ">>> Processing GDB (${PLATFORM})"
-	cd "${GDBDIR}"
-	check_error $? "Change directory failed."
-	
-	change_title "GDB: configure (${PLATFORM})"
-	PATH="$PATH:${INSTALL_DIR}/${PREFIX}/bin" ./configure \
-		"--target=${TARGET}" \
-		"--prefix=${PREFIX}" "--program-prefix=${TARGET}-" \
-		--enable-werror=no
-	check_error $? "Error configuring GDB."
-	
-	change_title "GDB: make (${PLATFORM})"
-	PATH="${PATH}:${PREFIX}/bin:${INSTALL_DIR}/${PREFIX}/bin" make all
-	check_error $? "Error compiling GDB."
-	
-	change_title "GDB: make (${PLATFORM})"
-	if $REAL_INSTALL; then
-		PATH="${PATH}:${PREFIX}/bin" make install
-	else
-		PATH="${PATH}:${INSTALL_DIR}/${PREFIX}/bin" make install "DESTDIR=${INSTALL_DIR}"
-	fi
-	check_error $? "Error installing GDB."
+	# No GDB support for RISC-V so far
+	if [ "$PLATFORM" != "riscv64" ] ; then
+		echo ">>> Processing GDB (${PLATFORM})"
+		cd "${GDBDIR}"
+		check_error $? "Change directory failed."
+		
+		change_title "GDB: configure (${PLATFORM})"
+		PATH="$PATH:${INSTALL_DIR}/${PREFIX}/bin" ./configure \
+			"--target=${TARGET}" \
+			"--prefix=${PREFIX}" "--program-prefix=${TARGET}-" \
+			--enable-werror=no
+		check_error $? "Error configuring GDB."
+		
+		change_title "GDB: make (${PLATFORM})"
+		PATH="${PATH}:${PREFIX}/bin:${INSTALL_DIR}/${PREFIX}/bin" make all
+		check_error $? "Error compiling GDB."
+		
+		change_title "GDB: make (${PLATFORM})"
+		if $REAL_INSTALL ; then
+			PATH="${PATH}:${PREFIX}/bin" make install
+		else
+			PATH="${PATH}:${INSTALL_DIR}/${PREFIX}/bin" make install "DESTDIR=${INSTALL_DIR}"
+		fi
+		check_error $? "Error installing GDB."
+	fi
 	
 	
@@ -569,5 +577,5 @@
 
 case "$1" in
-	amd64|arm32|ia32|ia64|mips32|mips32eb|mips64|ppc32|ppc64|sparc64)
+	amd64|arm32|ia32|ia64|mips32|mips32eb|mips64|ppc32|ppc64|riscv64|sparc64)
 		prepare
 		build_target "$1"
@@ -584,4 +592,5 @@
 		build_target "ppc32"
 		build_target "ppc64"
+		build_target "riscv64"
 		build_target "sparc64"
 		;;
@@ -597,4 +606,5 @@
 		build_target "ppc32" &
 		build_target "ppc64" &
+		build_target "riscv64" &
 		build_target "sparc64" &
 		wait
@@ -618,5 +628,8 @@
 		wait
 		
+		build_target "riscv64" &
 		build_target "ppc64" &
+		wait
+		
 		build_target "sparc64" &
 		wait
