This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: flag day for Solaris portions of config.{guess,sub}


<brane@xbc.nu> writes:

> What about the thousands of non-GNU packages that use config.guess?

Most of them won't care one way or another, for the same reason that
only a tiny fraction of GNU programs care.

Obviously there are both pros and cons to changing config.guess to use
correct Sun version numbers.  The people who will be hassled by the
correction (namely, a handful of maintainers) are more likely to
complain about it, while the people who will benefit from the
correction (e.g., newbie installers) don't know what's happening and
we won't hear from them here.  (If the American Congress were to vote
on this issue, the handful of special interests would win hands down.
Sigh. :-)

ro didn't favor the proposed change, but suggested that if we change
it, we should standardize on -sunos uniformly, and use e.g., -sunos5.9
rather than -solaris9.  That's fine with me, and in fact it's a bit
cleaner.  It may cause a bit more work since it renames -solaris2.0
through -solaris2.6 too, but these OSes are obsolete as Sun no longer
issues patches for them, so it's not a big deal these days.

Here's a patch to do it that way, if you prefer.


2003-11-24  Paul Eggert  <eggert@twinsun.com>

	Standardize on -sunos* for SunOS versions, rather than using
	-sunos* for older versions and (incorrectly-numbered) -solaris* for
	newer versions.

	* config.guess (sun4H:SunOS:5.*:*, sun4*:SunOS:5.*:*,
	tadpole*:SunOS:5.*:*, i86pc:SunOS:5.*:*, prep*:SunOS:5.*:*):
	Guess -sunosN instead of -solarisM, as we are standardizing
	on -sunos for SunOS hosts.
	* config.sub (i*86sol2, sun4sol2, -solaris*): Likewise.
	(-solaris, -sunos5*): Remove cases.
	(-solaris2, -solaris2.*, -solaris[789], -solaris[789].*,
	-solaris[1-9][0-9]*, -sunos*): New cases.

	* config.guess (sun4*:SunOS:6*:*):
	Remove case: There never will be a "Solaris 3".
	* config.sub (-sunos6*): Likewise.

cvs server: Diffing .
Index: config.guess
===================================================================
RCS file: /cvsroot/config/config/config.guess,v
retrieving revision 1.287
diff -p -u -r1.287 config.guess
--- config.guess	20 Nov 2003 09:20:24 -0000	1.287
+++ config.guess	24 Nov 2003 06:24:46 -0000
@@ -338,19 +338,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	    sparc) echo sparc-icl-nx7 && exit 0 ;;
 	esac ;;
     sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-hal-sunos${UNAME_RELEASE}
 	exit 0 ;;
+    # Previous versions of config.guess incorrectly identified Solaris 7
+    # as solaris2.7, and similarly for Solaris 8 and Solaris 9.
+    # config.guess now identifies these OSes by SunOS version, e.g.,
+    # sparc-sun-sunos5.9 instead of the incorrect sparc-sun-solaris2.9.
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-sunos${UNAME_RELEASE}
 	exit 0 ;;
     i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo i386-pc-sunos${UNAME_RELEASE}
 	exit 0 ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
@@ -807,7 +805,7 @@ EOF
 	echo powerpcle-unknown-cygwin
 	exit 0 ;;
     prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo powerpcle-unknown-sunos${UNAME_RELEASE}
 	exit 0 ;;
     *:GNU:*:*)
 	# the GNU system
Index: config.sub
===================================================================
RCS file: /cvsroot/config/config/config.sub,v
retrieving revision 1.297
diff -p -u -r1.297 config.sub
--- config.sub	20 Nov 2003 09:20:24 -0000	1.297
+++ config.sub	24 Nov 2003 06:24:48 -0000
@@ -593,7 +593,7 @@ case $basic_machine in
 		;;
 	i*86sol2)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
+		os=-sunos5
 		;;
 	i386mach)
 		basic_machine=i386-mach
@@ -916,7 +916,7 @@ case $basic_machine in
 		;;
 	sun4sol2)
 		basic_machine=sparc-sun
-		os=-solaris2
+		os=-sunos5
 		;;
 	sun3 | sun3-*)
 		basic_machine=m68k-sun
@@ -1113,12 +1113,17 @@ then
 case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
-	-solaris)
-		os=-solaris2
+	-solaris2 | -solaris2.*)
+		os=`echo "$os" | sed -e 's|solaris2|sunos5|'`
+		;;
+	-solaris[789] | -solaris[789].* | -solaris[1-9][0-9]*)
+		os=`echo "$os" | sed -e 's|solaris|sunos5.|'`
+		;;
+	-solaris*)
+		os=-sunos5
 		;;
 	-svr4*)
 		os=-sysv4
@@ -1135,7 +1140,7 @@ case $os in
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -sunos* | -sym* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1181,12 +1186,6 @@ case $os in
 		;;
 	-linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
 		;;
 	-opened*)
 		os=-openedition


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]