From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29554 invoked by alias); 4 Dec 2003 21:37:50 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29524 invoked from network); 4 Dec 2003 21:37:49 -0000 Received: from unknown (HELO panther.cs.ucla.edu) (131.179.128.25) by sources.redhat.com with SMTP; 4 Dec 2003 21:37:49 -0000 Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by panther.cs.ucla.edu (8.11.7p1+Sun/8.11.6/UCLACS-5.2) with ESMTP id hB4Lbf928035; Thu, 4 Dec 2003 13:37:42 -0800 (PST) Received: from eggert by penguin.cs.ucla.edu with local (Exim 3.35 #1 (Debian)) id 1AS1AL-00018w-00; Thu, 04 Dec 2003 13:37:41 -0800 To: Ben Elliston Cc: "Zack Weinberg" , rms@gnu.org, gcc@gcc.gnu.org, binutils@sources.redhat.com, gdb@sources.redhat.com Subject: Re: flag day for Solaris portions of config.{guess,sub} References: <8765hf4c8z.fsf@wasabisystems.com> <87wu9mt79r.fsf@egil.codesourcery.com> <871xrs5b9j.fsf@penguin.cs.ucla.edu> <87znegqb31.fsf@codesourcery.com> <87brqsw9d9.fsf@penguin.cs.ucla.edu> <871xroqlaf.fsf@egil.codesourcery.com> <87n0aaj4cl.fsf@penguin.cs.ucla.edu> <87wu9esxu6.fsf@egil.codesourcery.com> <87ad69rf42.fsf@egil.codesourcery.com> <87y8tsx58e.fsf@codesourcery.com> <8765gwvowl.fsf@wasabisystems.com> From: Paul Eggert Date: Thu, 04 Dec 2003 21:37:00 -0000 In-Reply-To: <8765gwvowl.fsf@wasabisystems.com> Message-ID: <87r7zkb6xm.fsf@penguin.cs.ucla.edu> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00089.txt.bz2 Ben Elliston writes: > I'm convinced that the proposed change ... would have too much > impact on users (both of Autoconf and auxillary config.* users). OK, how about the following more-conservative change instead? This patch uses correct version numbers for future versions of SunOS / Solaris, while leaving the existing incorrect numbers in place. This is an upward compatible change that shouldn't affect existing code that depends on the existin numbers, and this should avoid the backward-compatibility hassles that have been mentioned in this thread. 2003-12-04 Paul Eggert * config.guess, config.sub: Use names like "sunos5.10" for future Solaris versions, thus fixing the incorrect version numbers (like "solaris2.9") in the old scheme. diff -pru config/config.guess config-sunos/config.guess --- config/config.guess Sun Nov 23 21:42:42 2003 +++ config-sunos/config.guess Thu Dec 4 13:29:46 2003 @@ -136,6 +136,43 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +SunOS) + # Solaris 2.0 - 2.6 (SunOS 5.0 - 5.6) are "solaris2.0" - "solaris2.6", + # and Solaris 7 - 9 (SunOS 5.7 - 5.9) are "solaris2.7" - "solaris2.9". + # This numbering scheme is incorrect, and in retrospect it would have + # been better to use SunOS versions (namely, "sunos5.0" - "sunos5.9"). + # However, many configure scripts depend on this behavior, + # so use the traditional scheme for SunOS 5.0 through 5.9. + # Starting with SunOS 5.10, use sunos names uniformly (e.g., "sunos5.10"). + # As SunOS 5.9 and earlier become obsolete the incorrect numbering + # problem should also become obsolete. + + # If you prefer using "sunos" names uniformly, set + # CONFIG_PREFERS_SUNOS="true" in your environment, + # or modify the following line to read "true" rather than "false". + CONFIG_PREFERS_SUNOS_DEFAULT=false + + case "${UNAME_MACHINE}:${UNAME_RELEASE}" in + sun4*:[0-4].*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=$UNAME_VERSION ;; + esac ;; + esac + + # Use "sunos" names if they are preferred; otherwise use the + # traditional misnumbering scheme. + CONFIG_PREFERS_SUNOS=${CONFIG_PREFERS_SUNOS-$CONFIG_PREFERS_SUNOS_DEFAULT} + case "${CONFIG_PREFERS_SUNOS}:${UNAME_RELEASE}" in + true:* | *:[0-4].* | *:5.[1-9][0-9]*) + # Japanese Language versions have a version number like `4.1.3-JL'. + sun_os_release=sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` ;; + *) + sun_os_release=solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//' -e 's/-/_/'` ;; + esac ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -337,29 +374,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + sun4H:SunOS:*:*) + echo sparc-hal-$sun_os_release exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + sun4*:SunOS:*:* | tadpole*:SunOS:*:*) + echo sparc-sun-$sun_os_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/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo i386-pc-$sun_os_release exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} @@ -377,7 +399,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ esac exit 0 ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-$sun_os_release exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -807,7 +829,7 @@ EOF echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-$sun_os_release exit 0 ;; *:GNU:*:*) # the GNU system diff -pru config/config.sub config-sunos/config.sub --- config/config.sub Sun Nov 23 21:42:43 2003 +++ config-sunos/config.sub Wed Dec 3 15:04:23 2003 @@ -1110,15 +1110,27 @@ esac if [ x"$os" != x"" ] then + +# Deal with "traditional" names (-solaris*) versus "sunos" names (-sunos*) +# for SunOS 5.0 through 5.9. See config.guess for details. +# If you prefer using "sunos" names uniformly, set +# CONFIG_PREFERS_SUNOS="true" in your environment, +# or modify the following line to read "true" rather than "false". +CONFIG_PREFERS_SUNOS_DEFAULT=false +CONFIG_PREFERS_SUNOS=${CONFIG_PREFERS_SUNOS-$CONFIG_PREFERS_SUNOS_DEFAULT} + 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. + # Traditional -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) - os=-solaris2 + case "$CONFIG_PREFERS_SUNOS" in + true) os=-sunos5 ;; + *) os=-solaris2 ;; + esac ;; -svr4*) os=-sysv4 @@ -1135,6 +1147,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]*\ + | -sunos5.[1-9][0-9]* | -sunos[6-9]* | -sunos[1-9][0-9]* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ @@ -1182,11 +1195,11 @@ 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|'` + -sunos5.[0-9] | -sunos5.[0-9].*) + case "$CONFIG_PREFERS_SUNOS" in + true) ;; + *) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; + esac ;; -opened*) os=-openedition