It seems to me that if ‘fooco’ expands to ‘cpu-fooco-foonlyos’,
where ‘cpu’ is whatever CPU was hip at the time Fooco was making
computers, then ‘cpu-fooco’ should also expand to ‘cpu-fooco-foonlyos’,
and ‘cpu-foonlyos’ should as well, except when ‘foonlyos’ is something
generic like ‘sysv’ or ‘bsd’.  Implement a bunch of cases where we
didn’t do this quite right.  Probably there are more.
---
 config.sub                | 49 ++++++++++++++++++++++++++++++---------
 testsuite/config-sub.data | 10 ++++++++
 2 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/config.sub b/config.sub
index 0eac68e..935a174 100755
--- a/config.sub
+++ b/config.sub
@@ -209,6 +209,7 @@ case $1 in
                                        | dec* \
                                        | delta* \
                                        | dg \
+                                       | digital \
                                        | dolphin \
                                        | encore* \
                                        | gould \
@@ -231,8 +232,10 @@ case $1 in
                                        | omron* \
                                        | pc533* \
                                        | sequent* \
+                                       | siemens \
                                        | sgi* \
                                        | sim \
+                                       | sni \
                                        | sony* \
                                        | sun \
                                        | sun[234]* \
@@ -1066,14 +1069,28 @@ case $cpu-$vendor in
                basic_os=${basic_os:-linux-gnueabihf}
                ;;
 
-       # Normalized CPU+vendor pairs that imply an OS,
-       # if not otherwise specified
+       # Normalized CPU+vendor pairs that imply an OS, if not otherwise 
specified
+       m68k-isi)
+               basic_os=${basic_os:-sysv}
+               ;;
+       m68k-sony)
+               basic_os=${basic_os:-newsos}
+               ;;
+       m68k-tektronix)
+               basic_os=${basic_os:-bsd}
+               ;;
+       m88k-harris)
+               basic_os=${basic_os:-sysv3}
+               ;;
        i386-bull | m68k-bull)
                basic_os=${basic_os:-sysv3}
                ;;
        rs6000-bull)
                basic_os=${basic_os:-bosx}
                ;;
+       mips-sni)
+               basic_os=${basic_os:-sysv4}
+               ;;
 
        # Here we normalize CPU types irrespective of the vendor
        amd64-*)
@@ -1612,6 +1629,7 @@ case $os in
                ;;
        utek*)
                os=bsd
+               vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'`
                ;;
        dynix*)
                os=bsd
@@ -1628,7 +1646,11 @@ case $os in
        386bsd)
                os=bsd
                ;;
-       ctix* | uts*)
+       ctix*)
+               os=sysv
+               vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'`
+               ;;
+       uts*)
                os=sysv
                ;;
        nova*)
@@ -1638,9 +1660,11 @@ case $os in
        # Preserve the version number of sinix5.
        sinix5.*)
                os=`echo "$os" | sed -e 's|sinix|sysv|'`
+               vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
                ;;
        sinix*)
                os=sysv4
+               vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
                ;;
        tpf*)
                os=tpf
@@ -1781,6 +1805,14 @@ case $cpu-$vendor in
                os=
                obj=elf
                ;;
+       # The -sgi and -siemens entries must be before the mips- entry
+       # or we get the wrong os.
+       *-sgi)
+               os=irix
+               ;;
+       *-siemens)
+               os=sysv4
+               ;;
        mips*-cisco)
                os=
                obj=elf
@@ -1793,7 +1825,8 @@ case $cpu-$vendor in
                os=
                obj=coff
                ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
+       # This must be before the sparc-* entry or we get the wrong os.
+       *-tti)
                os=sysv3
                ;;
        sparc-* | *-sun)
@@ -1825,7 +1858,7 @@ case $cpu-$vendor in
                os=hpux
                ;;
        *-hitachi)
-               os=hiux
+               os=hiuxwe2
                ;;
        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
                os=sysv
@@ -1869,12 +1902,6 @@ case $cpu-$vendor in
        *-encore)
                os=bsd
                ;;
-       *-sgi)
-               os=irix
-               ;;
-       *-siemens)
-               os=sysv4
-               ;;
        *-masscomp)
                os=rtu
                ;;
diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data
index 17e3790..1d54d61 100644
--- a/testsuite/config-sub.data
+++ b/testsuite/config-sub.data
@@ -298,6 +298,8 @@ hp9k893                                             
hppa1.1-hp-hpux
 hppa                                           hppa-unknown-none
 hppa-next                                      hppa-next-nextstep
 hppa1.0                                                hppa1.0-unknown-none
+hppa1.0-hitachi                                        hppa1.0-hitachi-hiuxwe2
+hppa1.1-hitachi                                        hppa1.1-hitachi-hiuxwe2
 hppa2.0                                                hppa2.0-unknown-none
 hppa2.0n                                       hppa2.0n-unknown-none
 hppa64                                         hppa64-unknown-none
@@ -445,6 +447,7 @@ m68knommu                                   
m68k-unknown-linux-gnu
 m68knommu-elf                                  m68k-unknown-elf
 m68knommu-linux                                        m68k-unknown-linux-gnu
 m88k                                           m88k-unknown-none
+m88k-harris                                    m88k-harris-sysv3
 m88k-omron                                     m88k-omron-luna
 m9s12z                                         s12z-unknown-none
 mac                                            m68k-apple-macos
@@ -473,7 +476,14 @@ mingw32ce                                  
arm-unknown-mingw32ce
 mingw64                                                x86_64-pc-mingw64
 miniframe                                      m68000-convergent-sysv
 mips                                           mips-unknown-elf
+mips-digital                                   mips-dec-ultrix4.2
 mips-sde-elf                                   mips-sde-elf
+mips-sgi                                       mips-sgi-irix
+mips-siemens                                   mips-siemens-sysv4
+mips-sinix                                     mips-sni-sysv4
+mips-sinix5                                    mips-sni-sysv4
+mips-sinix5.0                                  mips-sni-sysv5.0
+mips-sni                                       mips-sni-sysv4
 mips-zephyr                                    mips-unknown-zephyr
 mips16                                         mips16-unknown-elf
 mips64                                         mips64-unknown-elf
-- 
2.43.2


Reply via email to