diff --git a/gcc/config.sub b/gcc/config.sub
index 12bc0bdd658d98fbb04c5af34409666cd68db98e..55ba7bf18eaa1dc9211de21642a634216c04503e 100755
--- a/gcc/config.sub
+++ b/gcc/config.sub
@@ -498,6 +498,9 @@ case $os in
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
+	-solaris)
+		os=-solaris2
+		;;
 	# First accept the basic system types.
 	# The portable systems comes first.
 	# Each alternative must end in a *, to match a version number.