config-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 6/6] * config.sub: Consolidate OS version checking


From: John Ericson
Subject: [PATCH 6/6] * config.sub: Consolidate OS version checking
Date: Sat, 19 May 2018 22:15:49 -0400

This is all that remains of the case at the top, and it can now be
straight-forwardly merged with the rest down at the bottom.
---
 ChangeLog  |   1 +
 config.sub | 127 +++++++++++++++++++++++++++----------------------------------
 2 files changed, 58 insertions(+), 70 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0d00a3a..75249ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
        * config.sub: No more os-driven subsitiion of -pc with sed
        * config.sub: No more forced "-sequent" in the `basic_machine` for "ipx"
        * config.sub: Don't Force `basic_machine` based on `os` just for "mint" 
and "clix"
+       * config.sub: Consolidate OS version checking
 
 2018-05-19  Ben Elliston  <address@hidden>
 
diff --git a/config.sub b/config.sub
index 99bf891..7e701bf 100755
--- a/config.sub
+++ b/config.sub
@@ -562,65 +562,6 @@ case $1 in
                ;;
 esac
 
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       bluegene*)
-               os=cnk
-               ;;
-       scout)
-               ;;
-       chorusos*)
-               os=chorusos
-               basic_machine=$1
-               ;;
-       chorusrdb)
-               os=chorusrdb
-               basic_machine=$1
-               ;;
-       hiux*)
-               os=hiuxwe2
-               ;;
-       sco6)
-               os=sco5v6
-               ;;
-       sco5)
-               os=sco3.2v5
-               ;;
-       sco4)
-               os=sco3.2v4
-               ;;
-       sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               ;;
-       sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               ;;
-       sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               ;;
-       sco*)
-               os=sco3.2v2
-               ;;
-       isc)
-               os=isc2.2
-               ;;
-       lynx*178)
-               os=lynxos178
-               ;;
-       lynx*5)
-               os=lynxos5
-               ;;
-       lynx*)
-               os=lynxos
-               ;;
-       psos*)
-               os=psos
-               ;;
-esac
-
 # Decode aliases for certain CPU-COMPANY combinations.
 case $basic_machine in
        # Recognize the basic CPU types without company name.
@@ -1354,6 +1295,9 @@ case $os in
        auroraux)
                os=auroraux
                ;;
+       bluegene*)
+               os=cnk
+               ;;
        solaris1 | solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1370,26 +1314,57 @@ case $os in
        es1800*)
                os=ose
                ;;
+       # Some version numbers need modification
+       chorusos*)
+               os=chorusos
+               ;;
+       isc)
+               os=isc2.2
+               ;;
+       sco6)
+               os=sco5v6
+               ;;
+       sco5)
+               os=sco3.2v5
+               ;;
+       sco4)
+               os=sco3.2v4
+               ;;
+       sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               ;;
+       sco3.2v[4-9]* | sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               ;;
+       scout)
+               # Don't match below
+               ;;
+       sco*)
+               os=sco3.2v2
+               ;;
+       psos*)
+               os=psos
+               ;;
        # Now accept the basic system types.
        # The portable systems comes first.
        # Each alternative MUST end in a * to match a version number.
        # sysv* is not here because it comes later, after sysvr4.
        gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-            | *vms* | sco* | esix* | isc* | aix* | cnk* | sunos | sunos[34]*\
+            | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
             | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
             | sym* | kopensolaris* | plan9* \
             | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
             | aos* | aros* | cloudabi* | sortix* \
             | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
             | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
-            | hiux* | knetbsd* | mirbsd* | netbsd* \
+            | knetbsd* | mirbsd* | netbsd* \
             | bitrig* | openbsd* | solidbsd* | libertybsd* \
             | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
             | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
             | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
             | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
-            | chorusos* | chorusrdb* | cegcc* | glidix* \
-            | cygwin* | msys* | pe* | psos* | moss* | proelf* | rtems* \
+            | chorusrdb* | cegcc* | glidix* \
+            | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
             | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
             | linux-newlib* | linux-musl* | linux-uclibc* \
             | uxpv* | beos* | mpeix* | udk* | moxiebox* \
@@ -1413,6 +1388,9 @@ case $os in
                        ;;
                esac
                ;;
+       hiux*)
+               os=hiuxwe2
+               ;;
        nto-qnx*)
                ;;
        nto*)
@@ -1422,20 +1400,23 @@ case $os in
            | windows* | osx | abug | netware* | os9* \
            | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
                ;;
-       mac*)
-               os=`echo "$os" | sed -e 's|mac|macos|'`
-               ;;
        linux-dietlibc)
                os=linux-dietlibc
                ;;
        linux*)
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                ;;
-       sunos5*)
-               os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+       lynx*178)
+               os=lynxos178
                ;;
-       sunos6*)
-               os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+       lynx*5)
+               os=lynxos5
+               ;;
+       lynx*)
+               os=lynxos
+               ;;
+       mac*)
+               os=`echo "$os" | sed -e 's|mac|macos|'`
                ;;
        opened*)
                os=openedition
@@ -1443,6 +1424,12 @@ case $os in
        os400*)
                os=os400
                ;;
+       sunos5*)
+               os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+               ;;
+       sunos6*)
+               os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+               ;;
        wince*)
                os=wince
                ;;
-- 
2.16.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]