Changeset 6418c91d in rtems


Ignore:
Timestamp:
07/06/18 07:25:57 (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
dd32e2b2
Parents:
fc5cc9a
git-author:
Sebastian Huber <sebastian.huber@…> (07/06/18 07:25:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/06/18 08:06:02)
Message:

Update config.guess and config.sub

Update via:

wget -O config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -O config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'

Update #3433.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • config.guess

    rfc5cc9a r6418c91d  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright 1992-2015 Free Software Foundation, Inc.
    4 
    5 timestamp='2015-10-21'
     3#   Copyright 1992-2018 Free Software Foundation, Inc.
     4
     5timestamp='2018-06-26'
    66
    77# This file is free software; you can redistribute it and/or modify it
     
    1616#
    1717# You should have received a copy of the GNU General Public License
    18 # along with this program; if not, see <http://www.gnu.org/licenses/>.
     18# along with this program; if not, see <https://www.gnu.org/licenses/>.
    1919#
    2020# As a special exception to the GNU General Public License, if you
     
    2828#
    2929# You can get the latest version of this script from:
    30 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
     30# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
    3131#
    3232# Please send patches to <config-patches@gnu.org>.
     
    4040Output the configuration name of the system \`$me' is run on.
    4141
    42 Operation modes:
     42Options:
    4343  -h, --help         print this help, then exit
    4444  -t, --time-stamp   print date of last modification, then exit
     
    5151
    5252Originally written by Per Bothner.
    53 Copyright 1992-2015 Free Software Foundation, Inc.
     53Copyright 1992-2018 Free Software Foundation, Inc.
    5454
    5555This is free software; see the source for copying conditions.  There is NO
     
    107107dummy=$tmp/dummy ;
    108108tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    109 case $CC_FOR_BUILD,$HOST_CC,$CC in
    110  ,,)    echo "int x;" > $dummy.c ;
     109case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
     110 ,,)    echo "int x;" > "$dummy.c" ;
    111111        for c in cc gcc c89 c99 ; do
    112           if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
     112          if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
    113113             CC_FOR_BUILD="$c"; break ;
    114114          fi ;
     
    133133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    134134
    135 case "${UNAME_SYSTEM}" in
     135case "$UNAME_SYSTEM" in
    136136Linux|GNU|GNU/*)
    137137        # If the system lacks a compiler, then just pick glibc.
     
    139139        LIBC=gnu
    140140
    141         eval $set_cc_for_build
    142         cat <<-EOF > $dummy.c
     141        eval "$set_cc_for_build"
     142        cat <<-EOF > "$dummy.c"
    143143        #include <features.h>
    144144        #if defined(__UCLIBC__)
     
    150150        #endif
    151151        EOF
    152         eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
     152        eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
     153
     154        # If ldd exists, use it to detect musl libc.
     155        if command -v ldd >/dev/null && \
     156                ldd --version 2>&1 | grep -q ^musl
     157        then
     158            LIBC=musl
     159        fi
    153160        ;;
    154161esac
     
    156163# Note: order is significant - the case branches are not exclusive.
    157164
    158 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     165case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
    159166    *:NetBSD:*:*)
    160167        # NetBSD (nbsd) targets should (where applicable) match one or
     
    170177        sysctl="sysctl -n hw.machine_arch"
    171178        UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
    172             /sbin/$sysctl 2>/dev/null || \
    173             /usr/sbin/$sysctl 2>/dev/null || \
     179            "/sbin/$sysctl" 2>/dev/null || \
     180            "/usr/sbin/$sysctl" 2>/dev/null || \
    174181            echo unknown)`
    175         case "${UNAME_MACHINE_ARCH}" in
     182        case "$UNAME_MACHINE_ARCH" in
    176183            armeb) machine=armeb-unknown ;;
    177184            arm*) machine=arm-unknown ;;
     
    180187            sh5el) machine=sh5le-unknown ;;
    181188            earmv*)
    182                 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
    183                 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
    184                 machine=${arch}${endian}-unknown
     189                arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
     190                endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
     191                machine="${arch}${endian}"-unknown
    185192                ;;
    186             *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
     193            *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
    187194        esac
    188195        # The Operating System including object format, if it has switched
    189         # to ELF recently, or will in the future.
    190         case "${UNAME_MACHINE_ARCH}" in
    191             arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
    192                 eval $set_cc_for_build
     196        # to ELF recently (or will in the future) and ABI.
     197        case "$UNAME_MACHINE_ARCH" in
     198            earm*)
     199                os=netbsdelf
     200                ;;
     201            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
     202                eval "$set_cc_for_build"
    193203                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
    194204                        | grep -q __ELF__
     
    206216        esac
    207217        # Determine ABI tags.
    208         case "${UNAME_MACHINE_ARCH}" in
     218        case "$UNAME_MACHINE_ARCH" in
    209219            earm*)
    210220                expr='s/^earmv[0-9]/-eabi/;s/eb$//'
    211                 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
     221                abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
    212222                ;;
    213223        esac
     
    217227        # kernel version information, so it can be replaced with a
    218228        # suitable tag, in the style of linux-gnu.
    219         case "${UNAME_VERSION}" in
     229        case "$UNAME_VERSION" in
    220230            Debian*)
    221231                release='-gnu'
    222232                ;;
    223233            *)
    224                 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
     234                release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
    225235                ;;
    226236        esac
     
    228238        # contains redundant information, the shorter form:
    229239        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    230         echo "${machine}-${os}${release}${abi}"
     240        echo "$machine-${os}${release}${abi-}"
    231241        exit ;;
    232242    *:Bitrig:*:*)
    233243        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
    234         echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
     244        echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
    235245        exit ;;
    236246    *:OpenBSD:*:*)
    237247        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
    238         echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
     248        echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
     249        exit ;;
     250    *:LibertyBSD:*:*)
     251        UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
     252        echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
     253        exit ;;
     254    *:MidnightBSD:*:*)
     255        echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
    239256        exit ;;
    240257    *:ekkoBSD:*:*)
    241         echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
     258        echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
    242259        exit ;;
    243260    *:SolidBSD:*:*)
    244         echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
     261        echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
    245262        exit ;;
    246263    macppc:MirBSD:*:*)
    247         echo powerpc-unknown-mirbsd${UNAME_RELEASE}
     264        echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
    248265        exit ;;
    249266    *:MirBSD:*:*)
    250         echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
     267        echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
    251268        exit ;;
    252269    *:Sortix:*:*)
    253         echo ${UNAME_MACHINE}-unknown-sortix
    254         exit ;;
     270        echo "$UNAME_MACHINE"-unknown-sortix
     271        exit ;;
     272    *:Redox:*:*)
     273        echo "$UNAME_MACHINE"-unknown-redox
     274        exit ;;
     275    mips:OSF1:*.*)
     276        echo mips-dec-osf1
     277        exit ;;
    255278    alpha:OSF1:*:*)
    256279        case $UNAME_RELEASE in
     
    269292        case "$ALPHA_CPU_TYPE" in
    270293            "EV4 (21064)")
    271                 UNAME_MACHINE="alpha" ;;
     294                UNAME_MACHINE=alpha ;;
    272295            "EV4.5 (21064)")
    273                 UNAME_MACHINE="alpha" ;;
     296                UNAME_MACHINE=alpha ;;
    274297            "LCA4 (21066/21068)")
    275                 UNAME_MACHINE="alpha" ;;
     298                UNAME_MACHINE=alpha ;;
    276299            "EV5 (21164)")
    277                 UNAME_MACHINE="alphaev5" ;;
     300                UNAME_MACHINE=alphaev5 ;;
    278301            "EV5.6 (21164A)")
    279                 UNAME_MACHINE="alphaev56" ;;
     302                UNAME_MACHINE=alphaev56 ;;
    280303            "EV5.6 (21164PC)")
    281                 UNAME_MACHINE="alphapca56" ;;
     304                UNAME_MACHINE=alphapca56 ;;
    282305            "EV5.7 (21164PC)")
    283                 UNAME_MACHINE="alphapca57" ;;
     306                UNAME_MACHINE=alphapca57 ;;
    284307            "EV6 (21264)")
    285                 UNAME_MACHINE="alphaev6" ;;
     308                UNAME_MACHINE=alphaev6 ;;
    286309            "EV6.7 (21264A)")
    287                 UNAME_MACHINE="alphaev67" ;;
     310                UNAME_MACHINE=alphaev67 ;;
    288311            "EV6.8CB (21264C)")
    289                 UNAME_MACHINE="alphaev68" ;;
     312                UNAME_MACHINE=alphaev68 ;;
    290313            "EV6.8AL (21264B)")
    291                 UNAME_MACHINE="alphaev68" ;;
     314                UNAME_MACHINE=alphaev68 ;;
    292315            "EV6.8CX (21264D)")
    293                 UNAME_MACHINE="alphaev68" ;;
     316                UNAME_MACHINE=alphaev68 ;;
    294317            "EV6.9A (21264/EV69A)")
    295                 UNAME_MACHINE="alphaev69" ;;
     318                UNAME_MACHINE=alphaev69 ;;
    296319            "EV7 (21364)")
    297                 UNAME_MACHINE="alphaev7" ;;
     320                UNAME_MACHINE=alphaev7 ;;
    298321            "EV7.9 (21364A)")
    299                 UNAME_MACHINE="alphaev79" ;;
     322                UNAME_MACHINE=alphaev79 ;;
    300323        esac
    301324        # A Pn.n version is a patched version.
     
    304327        # A Xn.n version is an unreleased experimental baselevel.
    305328        # 1.2 uses "1.2" for uname -r.
    306         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     329        echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
    307330        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
    308331        exitcode=$?
    309332        trap '' 0
    310333        exit $exitcode ;;
    311     Alpha\ *:Windows_NT*:*)
    312         # How do we know it's Interix rather than the generic POSIX subsystem?
    313         # Should we change UNAME_MACHINE based on the output of uname instead
    314         # of the specific Alpha model?
    315         echo alpha-pc-interix
    316         exit ;;
    317     21064:Windows_NT:50:3)
    318         echo alpha-dec-winnt3.5
    319         exit ;;
    320334    Amiga*:UNIX_System_V:4.0:*)
    321335        echo m68k-unknown-sysv4
    322336        exit ;;
    323337    *:[Aa]miga[Oo][Ss]:*:*)
    324         echo ${UNAME_MACHINE}-unknown-amigaos
     338        echo "$UNAME_MACHINE"-unknown-amigaos
    325339        exit ;;
    326340    *:[Mm]orph[Oo][Ss]:*:*)
    327         echo ${UNAME_MACHINE}-unknown-morphos
     341        echo "$UNAME_MACHINE"-unknown-morphos
    328342        exit ;;
    329343    *:OS/390:*:*)
     
    337351        exit ;;
    338352    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    339         echo arm-acorn-riscix${UNAME_RELEASE}
     353        echo arm-acorn-riscix"$UNAME_RELEASE"
    340354        exit ;;
    341355    arm*:riscos:*:*|arm*:RISCOS:*:*)
     
    364378        esac ;;
    365379    s390x:SunOS:*:*)
    366         echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     380        echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
    367381        exit ;;
    368382    sun4H:SunOS:5.*:*)
    369         echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     383        echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
    370384        exit ;;
    371385    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    372         echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     386        echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
    373387        exit ;;
    374388    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
    375         echo i386-pc-auroraux${UNAME_RELEASE}
     389        echo i386-pc-auroraux"$UNAME_RELEASE"
    376390        exit ;;
    377391    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
    378         eval $set_cc_for_build
    379         SUN_ARCH="i386"
     392        eval "$set_cc_for_build"
     393        SUN_ARCH=i386
    380394        # If there is a compiler, see if it is configured for 64-bit objects.
    381395        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
    382396        # This test works for both compilers.
    383         if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     397        if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
    384398            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
    385                 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
     399                (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
    386400                grep IS_64BIT_ARCH >/dev/null
    387401            then
    388                 SUN_ARCH="x86_64"
     402                SUN_ARCH=x86_64
    389403            fi
    390404        fi
    391         echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     405        echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
    392406        exit ;;
    393407    sun4*:SunOS:6*:*)
     
    395409        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
    396410        # it's likely to be more like Solaris than SunOS4.
    397         echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     411        echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
    398412        exit ;;
    399413    sun4*:SunOS:*:*)
     
    404418        esac
    405419        # Japanese Language versions have a version number like `4.1.3-JL'.
    406         echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
     420        echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
    407421        exit ;;
    408422    sun3*:SunOS:*:*)
    409         echo m68k-sun-sunos${UNAME_RELEASE}
     423        echo m68k-sun-sunos"$UNAME_RELEASE"
    410424        exit ;;
    411425    sun*:*:4.2BSD:*)
    412426        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
    413         test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
     427        test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
    414428        case "`/bin/arch`" in
    415429            sun3)
    416                 echo m68k-sun-sunos${UNAME_RELEASE}
     430                echo m68k-sun-sunos"$UNAME_RELEASE"
    417431                ;;
    418432            sun4)
    419                 echo sparc-sun-sunos${UNAME_RELEASE}
     433                echo sparc-sun-sunos"$UNAME_RELEASE"
    420434                ;;
    421435        esac
    422436        exit ;;
    423437    aushp:SunOS:*:*)
    424         echo sparc-auspex-sunos${UNAME_RELEASE}
     438        echo sparc-auspex-sunos"$UNAME_RELEASE"
    425439        exit ;;
    426440    # The situation for MiNT is a little confusing.  The machine name
     
    433447    # be no problem.
    434448    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    435         echo m68k-atari-mint${UNAME_RELEASE}
     449        echo m68k-atari-mint"$UNAME_RELEASE"
    436450        exit ;;
    437451    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    438         echo m68k-atari-mint${UNAME_RELEASE}
     452        echo m68k-atari-mint"$UNAME_RELEASE"
    439453        exit ;;
    440454    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    441         echo m68k-atari-mint${UNAME_RELEASE}
     455        echo m68k-atari-mint"$UNAME_RELEASE"
    442456        exit ;;
    443457    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    444         echo m68k-milan-mint${UNAME_RELEASE}
     458        echo m68k-milan-mint"$UNAME_RELEASE"
    445459        exit ;;
    446460    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    447         echo m68k-hades-mint${UNAME_RELEASE}
     461        echo m68k-hades-mint"$UNAME_RELEASE"
    448462        exit ;;
    449463    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    450         echo m68k-unknown-mint${UNAME_RELEASE}
     464        echo m68k-unknown-mint"$UNAME_RELEASE"
    451465        exit ;;
    452466    m68k:machten:*:*)
    453         echo m68k-apple-machten${UNAME_RELEASE}
     467        echo m68k-apple-machten"$UNAME_RELEASE"
    454468        exit ;;
    455469    powerpc:machten:*:*)
    456         echo powerpc-apple-machten${UNAME_RELEASE}
     470        echo powerpc-apple-machten"$UNAME_RELEASE"
    457471        exit ;;
    458472    RISC*:Mach:*:*)
     
    460474        exit ;;
    461475    RISC*:ULTRIX:*:*)
    462         echo mips-dec-ultrix${UNAME_RELEASE}
     476        echo mips-dec-ultrix"$UNAME_RELEASE"
    463477        exit ;;
    464478    VAX*:ULTRIX*:*:*)
    465         echo vax-dec-ultrix${UNAME_RELEASE}
     479        echo vax-dec-ultrix"$UNAME_RELEASE"
    466480        exit ;;
    467481    2020:CLIX:*:* | 2430:CLIX:*:*)
    468         echo clipper-intergraph-clix${UNAME_RELEASE}
     482        echo clipper-intergraph-clix"$UNAME_RELEASE"
    469483        exit ;;
    470484    mips:*:*:UMIPS | mips:*:*:RISCos)
    471         eval $set_cc_for_build
    472         sed 's/^        //' << EOF >$dummy.c
     485        eval "$set_cc_for_build"
     486        sed 's/^        //' << EOF > "$dummy.c"
    473487#ifdef __cplusplus
    474488#include <stdio.h>  /* for printf() prototype */
     
    479493        #if defined (host_mips) && defined (MIPSEB)
    480494        #if defined (SYSTYPE_SYSV)
    481           printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
     495          printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
    482496        #endif
    483497        #if defined (SYSTYPE_SVR4)
    484           printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
     498          printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
    485499        #endif
    486500        #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
    487           printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
     501          printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
    488502        #endif
    489503        #endif
     
    491505        }
    492506EOF
    493         $CC_FOR_BUILD -o $dummy $dummy.c &&
    494           dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
    495           SYSTEM_NAME=`$dummy $dummyarg` &&
     507        $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
     508          dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
     509          SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
    496510            { echo "$SYSTEM_NAME"; exit; }
    497         echo mips-mips-riscos${UNAME_RELEASE}
     511        echo mips-mips-riscos"$UNAME_RELEASE"
    498512        exit ;;
    499513    Motorola:PowerMAX_OS:*:*)
     
    521535        # DG/UX returns AViiON for all architectures
    522536        UNAME_PROCESSOR=`/usr/bin/uname -p`
    523         if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
     537        if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
    524538        then
    525             if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
    526                [ ${TARGET_BINARY_INTERFACE}x = x ]
     539            if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
     540               [ "$TARGET_BINARY_INTERFACE"x = x ]
    527541            then
    528                 echo m88k-dg-dgux${UNAME_RELEASE}
     542                echo m88k-dg-dgux"$UNAME_RELEASE"
    529543            else
    530                 echo m88k-dg-dguxbcs${UNAME_RELEASE}
     544                echo m88k-dg-dguxbcs"$UNAME_RELEASE"
    531545            fi
    532546        else
    533             echo i586-dg-dgux${UNAME_RELEASE}
     547            echo i586-dg-dgux"$UNAME_RELEASE"
    534548        fi
    535549        exit ;;
     
    548562        exit ;;
    549563    *:IRIX*:*:*)
    550         echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
     564        echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
    551565        exit ;;
    552566    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
     
    560574                IBM_REV=`/usr/bin/oslevel`
    561575        else
    562                 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    563         fi
    564         echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
     576                IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
     577        fi
     578        echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
    565579        exit ;;
    566580    *:AIX:2:3)
    567581        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
    568                 eval $set_cc_for_build
    569                 sed 's/^                //' << EOF >$dummy.c
     582                eval "$set_cc_for_build"
     583                sed 's/^                //' << EOF > "$dummy.c"
    570584                #include <sys/systemcfg.h>
    571585
     
    578592                        }
    579593EOF
    580                 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
     594                if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
    581595                then
    582596                        echo "$SYSTEM_NAME"
     
    592606    *:AIX:*:[4567])
    593607        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    594         if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
     608        if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
    595609                IBM_ARCH=rs6000
    596610        else
     
    601615                           awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
    602616        else
    603                 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    604         fi
    605         echo ${IBM_ARCH}-ibm-aix${IBM_REV}
     617                IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
     618        fi
     619        echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
    606620        exit ;;
    607621    *:AIX:*:*)
    608622        echo rs6000-ibm-aix
    609623        exit ;;
    610     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
     624    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
    611625        echo romp-ibm-bsd4.4
    612626        exit ;;
    613627    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    614         echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
     628        echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
    615629        exit ;;                             # report: romp-ibm BSD 4.3
    616630    *:BOSX:*:*)
     
    627641        exit ;;
    628642    9000/[34678]??:HP-UX:*:*)
    629         HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    630         case "${UNAME_MACHINE}" in
    631             9000/31? )            HP_ARCH=m68000 ;;
    632             9000/[34]?? )         HP_ARCH=m68k ;;
     643        HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
     644        case "$UNAME_MACHINE" in
     645            9000/31?)            HP_ARCH=m68000 ;;
     646            9000/[34]??)         HP_ARCH=m68k ;;
    633647            9000/[678][0-9][0-9])
    634648                if [ -x /usr/bin/getconf ]; then
    635649                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
    636650                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
    637                     case "${sc_cpu_version}" in
    638                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
    639                       528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
     651                    case "$sc_cpu_version" in
     652                      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
     653                      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
    640654                      532)                      # CPU_PA_RISC2_0
    641                         case "${sc_kernel_bits}" in
    642                           32) HP_ARCH="hppa2.0n" ;;
    643                           64) HP_ARCH="hppa2.0w" ;;
    644                           '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
     655                        case "$sc_kernel_bits" in
     656                          32) HP_ARCH=hppa2.0n ;;
     657                          64) HP_ARCH=hppa2.0w ;;
     658                          '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
    645659                        esac ;;
    646660                    esac
    647661                fi
    648                 if [ "${HP_ARCH}" = "" ]; then
    649                     eval $set_cc_for_build
    650                     sed 's/^            //' << EOF >$dummy.c
     662                if [ "$HP_ARCH" = "" ]; then
     663                    eval "$set_cc_for_build"
     664                    sed 's/^            //' << EOF > "$dummy.c"
    651665
    652666                #define _HPUX_SOURCE
     
    681695                }
    682696EOF
    683                     (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
     697                    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
    684698                    test -z "$HP_ARCH" && HP_ARCH=hppa
    685699                fi ;;
    686700        esac
    687         if [ ${HP_ARCH} = "hppa2.0w" ]
     701        if [ "$HP_ARCH" = hppa2.0w ]
    688702        then
    689             eval $set_cc_for_build
     703            eval "$set_cc_for_build"
    690704
    691705            # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
     
    698712            # => hppa64-hp-hpux11.23
    699713
    700             if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
     714            if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
    701715                grep -q __LP64__
    702716            then
    703                 HP_ARCH="hppa2.0w"
     717                HP_ARCH=hppa2.0w
    704718            else
    705                 HP_ARCH="hppa64"
     719                HP_ARCH=hppa64
    706720            fi
    707721        fi
    708         echo ${HP_ARCH}-hp-hpux${HPUX_REV}
     722        echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
    709723        exit ;;
    710724    ia64:HP-UX:*:*)
    711         HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    712         echo ia64-hp-hpux${HPUX_REV}
     725        HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
     726        echo ia64-hp-hpux"$HPUX_REV"
    713727        exit ;;
    714728    3050*:HI-UX:*:*)
    715         eval $set_cc_for_build
    716         sed 's/^        //' << EOF >$dummy.c
     729        eval "$set_cc_for_build"
     730        sed 's/^        //' << EOF > "$dummy.c"
    717731        #include <unistd.h>
    718732        int
     
    739753        }
    740754EOF
    741         $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
     755        $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
    742756                { echo "$SYSTEM_NAME"; exit; }
    743757        echo unknown-hitachi-hiuxwe2
    744758        exit ;;
    745     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
     759    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
    746760        echo hppa1.1-hp-bsd
    747761        exit ;;
     
    752766        echo hppa1.0-hp-mpeix
    753767        exit ;;
    754     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
     768    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
    755769        echo hppa1.1-hp-osf
    756770        exit ;;
     
    760774    i*86:OSF1:*:*)
    761775        if [ -x /usr/sbin/sysversion ] ; then
    762             echo ${UNAME_MACHINE}-unknown-osf1mk
     776            echo "$UNAME_MACHINE"-unknown-osf1mk
    763777        else
    764             echo ${UNAME_MACHINE}-unknown-osf1
     778            echo "$UNAME_MACHINE"-unknown-osf1
    765779        fi
    766780        exit ;;
     
    787801        exit ;;
    788802    CRAY*Y-MP:*:*:*)
    789         echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     803        echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    790804        exit ;;
    791805    CRAY*[A-Z]90:*:*:*)
    792         echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
     806        echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
    793807        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
    794808              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
     
    796810        exit ;;
    797811    CRAY*TS:*:*:*)
    798         echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     812        echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    799813        exit ;;
    800814    CRAY*T3E:*:*:*)
    801         echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     815        echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    802816        exit ;;
    803817    CRAY*SV1:*:*:*)
    804         echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     818        echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    805819        exit ;;
    806820    *:UNICOS/mp:*:*)
    807         echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     821        echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    808822        exit ;;
    809823    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    810         FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    811         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    812         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
     824        FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
     825        FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
     826        FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
    813827        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    814828        exit ;;
    815829    5000:UNIX_System_V:4.*:*)
    816         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    817         FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
     830        FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
     831        FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
    818832        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    819833        exit ;;
    820834    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    821         echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
     835        echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
    822836        exit ;;
    823837    sparc*:BSD/OS:*:*)
    824         echo sparc-unknown-bsdi${UNAME_RELEASE}
     838        echo sparc-unknown-bsdi"$UNAME_RELEASE"
    825839        exit ;;
    826840    *:BSD/OS:*:*)
    827         echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
     841        echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
    828842        exit ;;
    829843    *:FreeBSD:*:*)
    830844        UNAME_PROCESSOR=`/usr/bin/uname -p`
    831         case ${UNAME_PROCESSOR} in
     845        case "$UNAME_PROCESSOR" in
    832846            amd64)
    833                 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    834             *)
    835                 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     847                UNAME_PROCESSOR=x86_64 ;;
     848            i386)
     849                UNAME_PROCESSOR=i586 ;;
    836850        esac
     851        echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
    837852        exit ;;
    838853    i*:CYGWIN*:*)
    839         echo ${UNAME_MACHINE}-pc-cygwin
     854        echo "$UNAME_MACHINE"-pc-cygwin
    840855        exit ;;
    841856    *:MINGW64*:*)
    842         echo ${UNAME_MACHINE}-pc-mingw64
     857        echo "$UNAME_MACHINE"-pc-mingw64
    843858        exit ;;
    844859    *:MINGW*:*)
    845         echo ${UNAME_MACHINE}-pc-mingw32
     860        echo "$UNAME_MACHINE"-pc-mingw32
    846861        exit ;;
    847862    *:MSYS*:*)
    848         echo ${UNAME_MACHINE}-pc-msys
    849         exit ;;
    850     i*:windows32*:*)
    851         # uname -m includes "-pc" on this system.
    852         echo ${UNAME_MACHINE}-mingw32
     863        echo "$UNAME_MACHINE"-pc-msys
    853864        exit ;;
    854865    i*:PW*:*)
    855         echo ${UNAME_MACHINE}-pc-pw32
     866        echo "$UNAME_MACHINE"-pc-pw32
    856867        exit ;;
    857868    *:Interix*:*)
    858         case ${UNAME_MACHINE} in
     869        case "$UNAME_MACHINE" in
    859870            x86)
    860                 echo i586-pc-interix${UNAME_RELEASE}
     871                echo i586-pc-interix"$UNAME_RELEASE"
    861872                exit ;;
    862873            authenticamd | genuineintel | EM64T)
    863                 echo x86_64-unknown-interix${UNAME_RELEASE}
     874                echo x86_64-unknown-interix"$UNAME_RELEASE"
    864875                exit ;;
    865876            IA64)
    866                 echo ia64-unknown-interix${UNAME_RELEASE}
     877                echo ia64-unknown-interix"$UNAME_RELEASE"
    867878                exit ;;
    868879        esac ;;
    869     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
    870         echo i${UNAME_MACHINE}-pc-mks
    871         exit ;;
    872     8664:Windows_NT:*)
    873         echo x86_64-pc-mks
    874         exit ;;
    875     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    876         # How do we know it's Interix rather than the generic POSIX subsystem?
    877         # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    878         # UNAME_MACHINE based on the output of uname instead of i386?
    879         echo i586-pc-interix
    880         exit ;;
    881880    i*:UWIN*:*)
    882         echo ${UNAME_MACHINE}-pc-uwin
     881        echo "$UNAME_MACHINE"-pc-uwin
    883882        exit ;;
    884883    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
    885884        echo x86_64-unknown-cygwin
    886885        exit ;;
    887     p*:CYGWIN*:*)
    888         echo powerpcle-unknown-cygwin
    889         exit ;;
    890886    prep*:SunOS:5.*:*)
    891         echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     887        echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
    892888        exit ;;
    893889    *:GNU:*:*)
    894890        # the GNU system
    895         echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
     891        echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
    896892        exit ;;
    897893    *:GNU/*:*:*)
    898894        # other systems with GNU libc and userland
    899         echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
    900         exit ;;
    901     i*86:Minix:*:*)
    902         echo ${UNAME_MACHINE}-pc-minix
     895        echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
     896        exit ;;
     897    *:Minix:*:*)
     898        echo "$UNAME_MACHINE"-unknown-minix
    903899        exit ;;
    904900    aarch64:Linux:*:*)
    905         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     901        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    906902        exit ;;
    907903    aarch64_be:Linux:*:*)
    908904        UNAME_MACHINE=aarch64_be
    909         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     905        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    910906        exit ;;
    911907    alpha:Linux:*:*)
     
    920916        esac
    921917        objdump --private-headers /bin/sh | grep -q ld.so.1
    922         if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
    923         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     918        if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
     919        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    924920        exit ;;
    925921    arc:Linux:*:* | arceb:Linux:*:*)
    926         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     922        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    927923        exit ;;
    928924    arm*:Linux:*:*)
    929         eval $set_cc_for_build
     925        eval "$set_cc_for_build"
    930926        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
    931927            | grep -q __ARM_EABI__
    932928        then
    933             echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     929            echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    934930        else
    935931            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
    936932                | grep -q __ARM_PCS_VFP
    937933            then
    938                 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
     934                echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
    939935            else
    940                 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
     936                echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
    941937            fi
    942938        fi
    943939        exit ;;
    944940    avr32*:Linux:*:*)
    945         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     941        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    946942        exit ;;
    947943    cris:Linux:*:*)
    948         echo ${UNAME_MACHINE}-axis-linux-${LIBC}
     944        echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
    949945        exit ;;
    950946    crisv32:Linux:*:*)
    951         echo ${UNAME_MACHINE}-axis-linux-${LIBC}
     947        echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
    952948        exit ;;
    953949    e2k:Linux:*:*)
    954         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     950        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    955951        exit ;;
    956952    frv:Linux:*:*)
    957         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     953        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    958954        exit ;;
    959955    hexagon:Linux:*:*)
    960         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     956        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    961957        exit ;;
    962958    i*86:Linux:*:*)
    963         echo ${UNAME_MACHINE}-pc-linux-${LIBC}
     959        echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
    964960        exit ;;
    965961    ia64:Linux:*:*)
    966         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     962        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    967963        exit ;;
    968964    k1om:Linux:*:*)
    969         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     965        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    970966        exit ;;
    971967    m32r*:Linux:*:*)
    972         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     968        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    973969        exit ;;
    974970    m68*:Linux:*:*)
    975         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     971        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    976972        exit ;;
    977973    mips:Linux:*:* | mips64:Linux:*:*)
    978         eval $set_cc_for_build
    979         sed 's/^        //' << EOF >$dummy.c
     974        eval "$set_cc_for_build"
     975        sed 's/^        //' << EOF > "$dummy.c"
    980976        #undef CPU
    981977        #undef ${UNAME_MACHINE}
     
    991987        #endif
    992988EOF
    993         eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
    994         test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
     989        eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
     990        test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
    995991        ;;
     992    mips64el:Linux:*:*)
     993        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
     994        exit ;;
    996995    openrisc*:Linux:*:*)
    997         echo or1k-unknown-linux-${LIBC}
     996        echo or1k-unknown-linux-"$LIBC"
    998997        exit ;;
    999998    or32:Linux:*:* | or1k*:Linux:*:*)
    1000         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     999        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    10011000        exit ;;
    10021001    padre:Linux:*:*)
    1003         echo sparc-unknown-linux-${LIBC}
     1002        echo sparc-unknown-linux-"$LIBC"
    10041003        exit ;;
    10051004    parisc64:Linux:*:* | hppa64:Linux:*:*)
    1006         echo hppa64-unknown-linux-${LIBC}
     1005        echo hppa64-unknown-linux-"$LIBC"
    10071006        exit ;;
    10081007    parisc:Linux:*:* | hppa:Linux:*:*)
    10091008        # Look for CPU level
    10101009        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
    1011           PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
    1012           PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
    1013           *)    echo hppa-unknown-linux-${LIBC} ;;
     1010          PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
     1011          PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
     1012          *)    echo hppa-unknown-linux-"$LIBC" ;;
    10141013        esac
    10151014        exit ;;
    10161015    ppc64:Linux:*:*)
    1017         echo powerpc64-unknown-linux-${LIBC}
     1016        echo powerpc64-unknown-linux-"$LIBC"
    10181017        exit ;;
    10191018    ppc:Linux:*:*)
    1020         echo powerpc-unknown-linux-${LIBC}
     1019        echo powerpc-unknown-linux-"$LIBC"
    10211020        exit ;;
    10221021    ppc64le:Linux:*:*)
    1023         echo powerpc64le-unknown-linux-${LIBC}
     1022        echo powerpc64le-unknown-linux-"$LIBC"
    10241023        exit ;;
    10251024    ppcle:Linux:*:*)
    1026         echo powerpcle-unknown-linux-${LIBC}
     1025        echo powerpcle-unknown-linux-"$LIBC"
     1026        exit ;;
     1027    riscv32:Linux:*:* | riscv64:Linux:*:*)
     1028        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    10271029        exit ;;
    10281030    s390:Linux:*:* | s390x:Linux:*:*)
    1029         echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
     1031        echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
    10301032        exit ;;
    10311033    sh64*:Linux:*:*)
    1032         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     1034        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    10331035        exit ;;
    10341036    sh*:Linux:*:*)
    1035         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     1037        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    10361038        exit ;;
    10371039    sparc:Linux:*:* | sparc64:Linux:*:*)
    1038         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     1040        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    10391041        exit ;;
    10401042    tile*:Linux:*:*)
    1041         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     1043        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    10421044        exit ;;
    10431045    vax:Linux:*:*)
    1044         echo ${UNAME_MACHINE}-dec-linux-${LIBC}
     1046        echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
    10451047        exit ;;
    10461048    x86_64:Linux:*:*)
    1047         echo ${UNAME_MACHINE}-pc-linux-${LIBC}
     1049        echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
    10481050        exit ;;
    10491051    xtensa*:Linux:*:*)
    1050         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     1052        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    10511053        exit ;;
    10521054    i*86:DYNIX/ptx:4*:*)
     
    10621064        # I just have to hope.  -- rms.
    10631065        # Use sysv4.2uw... so that sysv4* matches it.
    1064         echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
     1066        echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
    10651067        exit ;;
    10661068    i*86:OS/2:*:*)
    10671069        # If we were able to find `uname', then EMX Unix compatibility
    10681070        # is probably installed.
    1069         echo ${UNAME_MACHINE}-pc-os2-emx
     1071        echo "$UNAME_MACHINE"-pc-os2-emx
    10701072        exit ;;
    10711073    i*86:XTS-300:*:STOP)
    1072         echo ${UNAME_MACHINE}-unknown-stop
     1074        echo "$UNAME_MACHINE"-unknown-stop
    10731075        exit ;;
    10741076    i*86:atheos:*:*)
    1075         echo ${UNAME_MACHINE}-unknown-atheos
     1077        echo "$UNAME_MACHINE"-unknown-atheos
    10761078        exit ;;
    10771079    i*86:syllable:*:*)
    1078         echo ${UNAME_MACHINE}-pc-syllable
     1080        echo "$UNAME_MACHINE"-pc-syllable
    10791081        exit ;;
    10801082    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
    1081         echo i386-unknown-lynxos${UNAME_RELEASE}
     1083        echo i386-unknown-lynxos"$UNAME_RELEASE"
    10821084        exit ;;
    10831085    i*86:*DOS:*:*)
    1084         echo ${UNAME_MACHINE}-pc-msdosdjgpp
    1085         exit ;;
    1086     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    1087         UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
     1086        echo "$UNAME_MACHINE"-pc-msdosdjgpp
     1087        exit ;;
     1088    i*86:*:4.*:*)
     1089        UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
    10881090        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
    1089                 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
     1091                echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
    10901092        else
    1091                 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
     1093                echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
    10921094        fi
    10931095        exit ;;
     
    10991101            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
    11001102        esac
    1101         echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
     1103        echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
    11021104        exit ;;
    11031105    i*86:*:3.2:*)
    11041106        if test -f /usr/options/cb.name; then
    11051107                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
    1106                 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
     1108                echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
    11071109        elif /bin/uname -X 2>/dev/null >/dev/null ; then
    11081110                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
     
    11141116                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
    11151117                        && UNAME_MACHINE=i686
    1116                 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
     1118                echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
    11171119        else
    1118                 echo ${UNAME_MACHINE}-pc-sysv32
     1120                echo "$UNAME_MACHINE"-pc-sysv32
    11191121        fi
    11201122        exit ;;
     
    11361138    i860:*:4.*:*) # i860-SVR4
    11371139        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
    1138           echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
     1140          echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
    11391141        else # Add other i860-SVR4 vendors below as they are discovered.
    1140           echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
     1142          echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
    11411143        fi
    11421144        exit ;;
     
    11581160        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
    11591161        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1160           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
     1162          && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
    11611163        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
    1162           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     1164          && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
    11631165    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    11641166        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
     
    11691171            && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
    11701172        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1171             && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
     1173            && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
    11721174        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
    1173             && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
     1175            && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
    11741176        /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
    1175             && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     1177            && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
    11761178    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    1177         echo m68k-unknown-lynxos${UNAME_RELEASE}
     1179        echo m68k-unknown-lynxos"$UNAME_RELEASE"
    11781180        exit ;;
    11791181    mc68030:UNIX_System_V:4.*:*)
     
    11811183        exit ;;
    11821184    TSUNAMI:LynxOS:2.*:*)
    1183         echo sparc-unknown-lynxos${UNAME_RELEASE}
     1185        echo sparc-unknown-lynxos"$UNAME_RELEASE"
    11841186        exit ;;
    11851187    rs6000:LynxOS:2.*:*)
    1186         echo rs6000-unknown-lynxos${UNAME_RELEASE}
     1188        echo rs6000-unknown-lynxos"$UNAME_RELEASE"
    11871189        exit ;;
    11881190    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
    1189         echo powerpc-unknown-lynxos${UNAME_RELEASE}
     1191        echo powerpc-unknown-lynxos"$UNAME_RELEASE"
    11901192        exit ;;
    11911193    SM[BE]S:UNIX_SV:*:*)
    1192         echo mips-dde-sysv${UNAME_RELEASE}
     1194        echo mips-dde-sysv"$UNAME_RELEASE"
    11931195        exit ;;
    11941196    RM*:ReliantUNIX-*:*:*)
     
    12011203        if uname -p 2>/dev/null >/dev/null ; then
    12021204                UNAME_MACHINE=`(uname -p) 2>/dev/null`
    1203                 echo ${UNAME_MACHINE}-sni-sysv4
     1205                echo "$UNAME_MACHINE"-sni-sysv4
    12041206        else
    12051207                echo ns32k-sni-sysv
     
    12211223    i*86:VOS:*:*)
    12221224        # From Paul.Green@stratus.com.
    1223         echo ${UNAME_MACHINE}-stratus-vos
     1225        echo "$UNAME_MACHINE"-stratus-vos
    12241226        exit ;;
    12251227    *:VOS:*:*)
     
    12281230        exit ;;
    12291231    mc68*:A/UX:*:*)
    1230         echo m68k-apple-aux${UNAME_RELEASE}
     1232        echo m68k-apple-aux"$UNAME_RELEASE"
    12311233        exit ;;
    12321234    news*:NEWS-OS:6*:*)
     
    12351237    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    12361238        if [ -d /usr/nec ]; then
    1237                 echo mips-nec-sysv${UNAME_RELEASE}
     1239                echo mips-nec-sysv"$UNAME_RELEASE"
    12381240        else
    1239                 echo mips-unknown-sysv${UNAME_RELEASE}
     1241                echo mips-unknown-sysv"$UNAME_RELEASE"
    12401242        fi
    12411243        exit ;;
     
    12561258        exit ;;
    12571259    SX-4:SUPER-UX:*:*)
    1258         echo sx4-nec-superux${UNAME_RELEASE}
     1260        echo sx4-nec-superux"$UNAME_RELEASE"
    12591261        exit ;;
    12601262    SX-5:SUPER-UX:*:*)
    1261         echo sx5-nec-superux${UNAME_RELEASE}
     1263        echo sx5-nec-superux"$UNAME_RELEASE"
    12621264        exit ;;
    12631265    SX-6:SUPER-UX:*:*)
    1264         echo sx6-nec-superux${UNAME_RELEASE}
     1266        echo sx6-nec-superux"$UNAME_RELEASE"
    12651267        exit ;;
    12661268    SX-7:SUPER-UX:*:*)
    1267         echo sx7-nec-superux${UNAME_RELEASE}
     1269        echo sx7-nec-superux"$UNAME_RELEASE"
    12681270        exit ;;
    12691271    SX-8:SUPER-UX:*:*)
    1270         echo sx8-nec-superux${UNAME_RELEASE}
     1272        echo sx8-nec-superux"$UNAME_RELEASE"
    12711273        exit ;;
    12721274    SX-8R:SUPER-UX:*:*)
    1273         echo sx8r-nec-superux${UNAME_RELEASE}
     1275        echo sx8r-nec-superux"$UNAME_RELEASE"
     1276        exit ;;
     1277    SX-ACE:SUPER-UX:*:*)
     1278        echo sxace-nec-superux"$UNAME_RELEASE"
    12741279        exit ;;
    12751280    Power*:Rhapsody:*:*)
    1276         echo powerpc-apple-rhapsody${UNAME_RELEASE}
     1281        echo powerpc-apple-rhapsody"$UNAME_RELEASE"
    12771282        exit ;;
    12781283    *:Rhapsody:*:*)
    1279         echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
     1284        echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
    12801285        exit ;;
    12811286    *:Darwin:*:*)
    12821287        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
    1283         eval $set_cc_for_build
     1288        eval "$set_cc_for_build"
    12841289        if test "$UNAME_PROCESSOR" = unknown ; then
    12851290            UNAME_PROCESSOR=powerpc
    12861291        fi
    1287         if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
    1288             if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     1292        if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
     1293            if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
    12891294                if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
    1290                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
    1291                     grep IS_64BIT_ARCH >/dev/null
     1295                       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
     1296                       grep IS_64BIT_ARCH >/dev/null
    12921297                then
    12931298                    case $UNAME_PROCESSOR in
     
    12951300                        powerpc) UNAME_PROCESSOR=powerpc64 ;;
    12961301                    esac
     1302                fi
     1303                # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
     1304                if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
     1305                       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
     1306                       grep IS_PPC >/dev/null
     1307                then
     1308                    UNAME_PROCESSOR=powerpc
    12971309                fi
    12981310            fi
     
    13061318            UNAME_PROCESSOR=x86_64
    13071319        fi
    1308         echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
     1320        echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
    13091321        exit ;;
    13101322    *:procnto*:*:* | *:QNX:[0123456789]*:*)
    13111323        UNAME_PROCESSOR=`uname -p`
    1312         if test "$UNAME_PROCESSOR" = "x86"; then
     1324        if test "$UNAME_PROCESSOR" = x86; then
    13131325                UNAME_PROCESSOR=i386
    13141326                UNAME_MACHINE=pc
    13151327        fi
    1316         echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
     1328        echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
    13171329        exit ;;
    13181330    *:QNX:*:4*)
    13191331        echo i386-pc-qnx
    13201332        exit ;;
    1321     NEO-?:NONSTOP_KERNEL:*:*)
    1322         echo neo-tandem-nsk${UNAME_RELEASE}
     1333    NEO-*:NONSTOP_KERNEL:*:*)
     1334        echo neo-tandem-nsk"$UNAME_RELEASE"
    13231335        exit ;;
    13241336    NSE-*:NONSTOP_KERNEL:*:*)
    1325         echo nse-tandem-nsk${UNAME_RELEASE}
    1326         exit ;;
    1327     NSR-?:NONSTOP_KERNEL:*:*)
    1328         echo nsr-tandem-nsk${UNAME_RELEASE}
     1337        echo nse-tandem-nsk"$UNAME_RELEASE"
     1338        exit ;;
     1339    NSR-*:NONSTOP_KERNEL:*:*)
     1340        echo nsr-tandem-nsk"$UNAME_RELEASE"
     1341        exit ;;
     1342    NSV-*:NONSTOP_KERNEL:*:*)
     1343        echo nsv-tandem-nsk"$UNAME_RELEASE"
     1344        exit ;;
     1345    NSX-*:NONSTOP_KERNEL:*:*)
     1346        echo nsx-tandem-nsk"$UNAME_RELEASE"
    13291347        exit ;;
    13301348    *:NonStop-UX:*:*)
     
    13351353        exit ;;
    13361354    DS/*:UNIX_System_V:*:*)
    1337         echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
     1355        echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
    13381356        exit ;;
    13391357    *:Plan9:*:*)
     
    13411359        # is converted to i386 for consistency with other x86
    13421360        # operating systems.
    1343         if test "$cputype" = "386"; then
     1361        if test "$cputype" = 386; then
    13441362            UNAME_MACHINE=i386
    13451363        else
    13461364            UNAME_MACHINE="$cputype"
    13471365        fi
    1348         echo ${UNAME_MACHINE}-unknown-plan9
     1366        echo "$UNAME_MACHINE"-unknown-plan9
    13491367        exit ;;
    13501368    *:TOPS-10:*:*)
     
    13671385        exit ;;
    13681386    SEI:*:*:SEIUX)
    1369         echo mips-sei-seiux${UNAME_RELEASE}
     1387        echo mips-sei-seiux"$UNAME_RELEASE"
    13701388        exit ;;
    13711389    *:DragonFly:*:*)
    1372         echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
     1390        echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
    13731391        exit ;;
    13741392    *:*VMS:*:*)
    13751393        UNAME_MACHINE=`(uname -p) 2>/dev/null`
    1376         case "${UNAME_MACHINE}" in
     1394        case "$UNAME_MACHINE" in
    13771395            A*) echo alpha-dec-vms ; exit ;;
    13781396            I*) echo ia64-dec-vms ; exit ;;
     
    13831401        exit ;;
    13841402    i*86:skyos:*:*)
    1385         echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
     1403        echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
    13861404        exit ;;
    13871405    i*86:rdos:*:*)
    1388         echo ${UNAME_MACHINE}-pc-rdos
     1406        echo "$UNAME_MACHINE"-pc-rdos
    13891407        exit ;;
    13901408    i*86:AROS:*:*)
    1391         echo ${UNAME_MACHINE}-pc-aros
     1409        echo "$UNAME_MACHINE"-pc-aros
    13921410        exit ;;
    13931411    x86_64:VMkernel:*:*)
    1394         echo ${UNAME_MACHINE}-unknown-esx
     1412        echo "$UNAME_MACHINE"-unknown-esx
     1413        exit ;;
     1414    amd64:Isilon\ OneFS:*:*)
     1415        echo x86_64-unknown-onefs
    13951416        exit ;;
    13961417esac
    13971418
     1419echo "$0: unable to guess system type" >&2
     1420
     1421case "$UNAME_MACHINE:$UNAME_SYSTEM" in
     1422    mips:Linux | mips64:Linux)
     1423        # If we got here on MIPS GNU/Linux, output extra information.
     1424        cat >&2 <<EOF
     1425
     1426NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
     1427the system type. Please install a C compiler and try again.
     1428EOF
     1429        ;;
     1430esac
     1431
    13981432cat >&2 <<EOF
    1399 $0: unable to guess system type
    1400 
    1401 This script, last modified $timestamp, has failed to recognize
    1402 the operating system you are using. It is advised that you
    1403 download the most up to date version of the config scripts from
    1404 
    1405   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
     1433
     1434This script (version $timestamp), has failed to recognize the
     1435operating system you are using. If your script is old, overwrite *all*
     1436copies of config.guess and config.sub with the latest versions from:
     1437
     1438  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
    14061439and
    1407   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    1408 
    1409 If the version you run ($0) is already up to date, please
    1410 send the following data and any information you think might be
    1411 pertinent to <config-patches@gnu.org> in order to provide the needed
    1412 information to handle your system.
     1440  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
     1441
     1442If $0 has already been updated, send the following data and any
     1443information you think might be pertinent to config-patches@gnu.org to
     1444provide the necessary information to handle your system.
    14131445
    14141446config.guess timestamp = $timestamp
     
    14291461/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
    14301462
    1431 UNAME_MACHINE = ${UNAME_MACHINE}
    1432 UNAME_RELEASE = ${UNAME_RELEASE}
    1433 UNAME_SYSTEM  = ${UNAME_SYSTEM}
    1434 UNAME_VERSION = ${UNAME_VERSION}
     1463UNAME_MACHINE = "$UNAME_MACHINE"
     1464UNAME_RELEASE = "$UNAME_RELEASE"
     1465UNAME_SYSTEM  = "$UNAME_SYSTEM"
     1466UNAME_VERSION = "$UNAME_VERSION"
    14351467EOF
    14361468
     
    14381470
    14391471# Local variables:
    1440 # eval: (add-hook 'write-file-hooks 'time-stamp)
     1472# eval: (add-hook 'before-save-hook 'time-stamp)
    14411473# time-stamp-start: "timestamp='"
    14421474# time-stamp-format: "%:y-%02m-%02d"
  • config.sub

    rfc5cc9a r6418c91d  
    11#! /bin/sh
    22# Configuration validation subroutine script.
    3 #   Copyright 1992-2015 Free Software Foundation, Inc.
    4 
    5 timestamp='2015-08-20'
     3#   Copyright 1992-2018 Free Software Foundation, Inc.
     4
     5timestamp='2018-07-03'
    66
    77# This file is free software; you can redistribute it and/or modify it
     
    1616#
    1717# You should have received a copy of the GNU General Public License
    18 # along with this program; if not, see <http://www.gnu.org/licenses/>.
     18# along with this program; if not, see <https://www.gnu.org/licenses/>.
    1919#
    2020# As a special exception to the GNU General Public License, if you
     
    3434
    3535# You can get the latest version of this script from:
    36 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
     36# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
    3737
    3838# This file is supposed to be the same for all GNU packages
     
    5454
    5555usage="\
    56 Usage: $0 [OPTION] CPU-MFR-OPSYS
    57        $0 [OPTION] ALIAS
     56Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
    5857
    5958Canonicalize a configuration name.
    6059
    61 Operation modes:
     60Options:
    6261  -h, --help         print this help, then exit
    6362  -t, --time-stamp   print date of last modification, then exit
     
    6968GNU config.sub ($timestamp)
    7069
    71 Copyright 1992-2015 Free Software Foundation, Inc.
     70Copyright 1992-2018 Free Software Foundation, Inc.
    7271
    7372This is free software; see the source for copying conditions.  There is NO
     
    9695    *local*)
    9796       # First pass through any local machine types.
    98        echo $1
     97       echo "$1"
    9998       exit ;;
    10099
     
    112111esac
    113112
    114 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
    115 # Here we must recognize all the valid KERNEL-OS combinations.
    116 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    117 case $maybe_os in
    118   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
    119   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
    120   knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
    121   kopensolaris*-gnu* | \
    122   storm-chaos* | os2-emx* | rtmk-nova*)
    123     os=-$maybe_os
    124     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    125     ;;
    126   android-linux)
    127     os=-linux-android
    128     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
    129     ;;
    130   *)
    131     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
    132     if [ $basic_machine != $1 ]
    133     then os=`echo $1 | sed 's/.*-/-/'`
    134     else os=; fi
    135     ;;
    136 esac
    137 
    138 ### Let's recognize common machines as not being operating systems so
    139 ### that things like config.sub decstation-3100 work.  We also
    140 ### recognize some manufacturers as not being operating systems, so we
    141 ### can provide default operating systems below.
    142 case $os in
    143         -sun*os*)
    144                 # Prevent following clause from handling this invalid input.
    145                 ;;
    146         -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
    147         -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
    148         -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
    149         -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
    150         -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    151         -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    152         -apple | -axis | -knuth | -cray | -microblaze*)
    153                 os=
    154                 basic_machine=$1
    155                 ;;
    156         -bluegene*)
    157                 os=-cnk
    158                 ;;
    159         -sim | -cisco | -oki | -wec | -winbond)
    160                 os=
    161                 basic_machine=$1
    162                 ;;
    163         -scout)
    164                 ;;
    165         -wrs)
    166                 os=-vxworks
    167                 basic_machine=$1
    168                 ;;
    169         -chorusos*)
    170                 os=-chorusos
    171                 basic_machine=$1
    172                 ;;
    173         -chorusrdb)
    174                 os=-chorusrdb
    175                 basic_machine=$1
    176                 ;;
    177         -hiux*)
    178                 os=-hiuxwe2
    179                 ;;
    180         -sco6)
    181                 os=-sco5v6
    182                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    183                 ;;
    184         -sco5)
    185                 os=-sco3.2v5
    186                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    187                 ;;
    188         -sco4)
    189                 os=-sco3.2v4
    190                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    191                 ;;
    192         -sco3.2.[4-9]*)
    193                 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
    194                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    195                 ;;
    196         -sco3.2v[4-9]*)
    197                 # Don't forget version if it is 3.2v4 or newer.
    198                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    199                 ;;
    200         -sco5v6*)
    201                 # Don't forget version if it is 3.2v4 or newer.
    202                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    203                 ;;
    204         -sco*)
    205                 os=-sco3.2v2
    206                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    207                 ;;
    208         -udk*)
    209                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    210                 ;;
    211         -isc)
    212                 os=-isc2.2
    213                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    214                 ;;
    215         -clix*)
    216                 basic_machine=clipper-intergraph
    217                 ;;
    218         -isc*)
    219                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    220                 ;;
    221         -lynx*178)
    222                 os=-lynxos178
    223                 ;;
    224         -lynx*5)
    225                 os=-lynxos5
    226                 ;;
    227         -lynx*)
    228                 os=-lynxos
    229                 ;;
    230         -ptx*)
    231                 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
    232                 ;;
    233         -windowsnt*)
    234                 os=`echo $os | sed -e 's/windowsnt/winnt/'`
    235                 ;;
    236         -psos*)
    237                 os=-psos
    238                 ;;
    239         -mint | -mint[0-9]*)
    240                 basic_machine=m68k-atari
    241                 os=-mint
     113# Split fields of configuration type
     114IFS="-" read -r field1 field2 field3 field4 <<EOF
     115$1
     116EOF
     117
     118# Separate into logical components for further validation
     119case $1 in
     120        *-*-*-*-*)
     121                echo Invalid configuration \`"$1"\': more than four components >&2
     122                exit 1
     123                ;;
     124        *-*-*-*)
     125                basic_machine=$field1-$field2
     126                os=$field3-$field4
     127                ;;
     128        *-*-*)
     129                # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
     130                # parts
     131                maybe_os=$field2-$field3
     132                case $maybe_os in
     133                        nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
     134                        | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
     135                        | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
     136                        | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
     137                        | storm-chaos* | os2-emx* | rtmk-nova*)
     138                                basic_machine=$field1
     139                                os=$maybe_os
     140                                ;;
     141                        android-linux)
     142                                basic_machine=$field1-unknown
     143                                os=linux-android
     144                                ;;
     145                        *)
     146                                basic_machine=$field1-$field2
     147                                os=$field3
     148                                ;;
     149                esac
     150                ;;
     151        *-*)
     152                # Second component is usually, but not always the OS
     153                case $field2 in
     154                        # Prevent following clause from handling this valid os
     155                        sun*os*)
     156                                basic_machine=$field1
     157                                os=$field2
     158                                ;;
     159                        # Manufacturers
     160                        dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \
     161                        | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
     162                        | unicom* | ibm* | next | hp | isi* | apollo | altos* \
     163                        | convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \
     164                        | c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \
     165                        | harris | dolphin | highlevel | gould | cbm | ns | masscomp \
     166                        | apple | axis | knuth | cray | microblaze* \
     167                        | sim | cisco | oki | wec | wrs | winbond)
     168                                basic_machine=$field1-$field2
     169                                os=
     170                                ;;
     171                        *)
     172                                basic_machine=$field1
     173                                os=$field2
     174                                ;;
     175                esac
     176                ;;
     177        *)
     178                # Convert single-component short-hands not valid as part of
     179                # multi-component configurations.
     180                case $field1 in
     181                        386bsd)
     182                                basic_machine=i386-pc
     183                                os=bsd
     184                                ;;
     185                        a29khif)
     186                                basic_machine=a29k-amd
     187                                os=udi
     188                                ;;
     189                        adobe68k)
     190                                basic_machine=m68010-adobe
     191                                os=scout
     192                                ;;
     193                        am29k)
     194                                basic_machine=a29k-none
     195                                os=bsd
     196                                ;;
     197                        amdahl)
     198                                basic_machine=580-amdahl
     199                                os=sysv
     200                                ;;
     201                        amigaos | amigados)
     202                                basic_machine=m68k-unknown
     203                                os=amigaos
     204                                ;;
     205                        amigaunix | amix)
     206                                basic_machine=m68k-unknown
     207                                os=sysv4
     208                                ;;
     209                        apollo68)
     210                                basic_machine=m68k-apollo
     211                                os=sysv
     212                                ;;
     213                        apollo68bsd)
     214                                basic_machine=m68k-apollo
     215                                os=bsd
     216                                ;;
     217                        aros)
     218                                basic_machine=i386-pc
     219                                os=aros
     220                                ;;
     221                        aux)
     222                                basic_machine=m68k-apple
     223                                os=aux
     224                                ;;
     225                        balance)
     226                                basic_machine=ns32k-sequent
     227                                os=dynix
     228                                ;;
     229                        blackfin)
     230                                basic_machine=bfin-unknown
     231                                os=linux
     232                                ;;
     233                        cegcc)
     234                                basic_machine=arm-unknown
     235                                os=cegcc
     236                                ;;
     237                        cray)
     238                                basic_machine=j90-cray
     239                                os=unicos
     240                                ;;
     241                        craynv)
     242                                basic_machine=craynv-cray
     243                                os=unicosmp
     244                                ;;
     245                        delta88)
     246                                basic_machine=m88k-motorola
     247                                os=sysv3
     248                                ;;
     249                        dicos)
     250                                basic_machine=i686-pc
     251                                os=dicos
     252                                ;;
     253                        djgpp)
     254                                basic_machine=i586-pc
     255                                os=msdosdjgpp
     256                                ;;
     257                        ebmon29k)
     258                                basic_machine=a29k-amd
     259                                os=ebmon
     260                                ;;
     261                        es1800 | OSE68k | ose68k | ose | OSE)
     262                                basic_machine=m68k-ericsson
     263                                os=ose
     264                                ;;
     265                        gmicro)
     266                                basic_machine=tron-gmicro
     267                                os=sysv
     268                                ;;
     269                        go32)
     270                                basic_machine=i386-pc
     271                                os=go32
     272                                ;;
     273                        h8300hms)
     274                                basic_machine=h8300-hitachi
     275                                os=hms
     276                                ;;
     277                        h8300xray)
     278                                basic_machine=h8300-hitachi
     279                                os=xray
     280                                ;;
     281                        h8500hms)
     282                                basic_machine=h8500-hitachi
     283                                os=hms
     284                                ;;
     285                        harris)
     286                                basic_machine=m88k-harris
     287                                os=sysv3
     288                                ;;
     289                        hp300bsd)
     290                                basic_machine=m68k-hp
     291                                os=bsd
     292                                ;;
     293                        hp300hpux)
     294                                basic_machine=m68k-hp
     295                                os=hpux
     296                                ;;
     297                        hppaosf)
     298                                basic_machine=hppa1.1-hp
     299                                os=osf
     300                                ;;
     301                        hppro)
     302                                basic_machine=hppa1.1-hp
     303                                os=proelf
     304                                ;;
     305                        i386mach)
     306                                basic_machine=i386-mach
     307                                os=mach
     308                                ;;
     309                        vsta)
     310                                basic_machine=i386-unknown
     311                                os=vsta
     312                                ;;
     313                        isi68 | isi)
     314                                basic_machine=m68k-isi
     315                                os=sysv
     316                                ;;
     317                        m68knommu)
     318                                basic_machine=m68k-unknown
     319                                os=linux
     320                                ;;
     321                        magnum | m3230)
     322                                basic_machine=mips-mips
     323                                os=sysv
     324                                ;;
     325                        merlin)
     326                                basic_machine=ns32k-utek
     327                                os=sysv
     328                                ;;
     329                        mingw64)
     330                                basic_machine=x86_64-pc
     331                                os=mingw64
     332                                ;;
     333                        mingw32)
     334                                basic_machine=i686-pc
     335                                os=mingw32
     336                                ;;
     337                        mingw32ce)
     338                                basic_machine=arm-unknown
     339                                os=mingw32ce
     340                                ;;
     341                        monitor)
     342                                basic_machine=m68k-rom68k
     343                                os=coff
     344                                ;;
     345                        morphos)
     346                                basic_machine=powerpc-unknown
     347                                os=morphos
     348                                ;;
     349                        moxiebox)
     350                                basic_machine=moxie-unknown
     351                                os=moxiebox
     352                                ;;
     353                        msdos)
     354                                basic_machine=i386-pc
     355                                os=msdos
     356                                ;;
     357                        msys)
     358                                basic_machine=i686-pc
     359                                os=msys
     360                                ;;
     361                        mvs)
     362                                basic_machine=i370-ibm
     363                                os=mvs
     364                                ;;
     365                        nacl)
     366                                basic_machine=le32-unknown
     367                                os=nacl
     368                                ;;
     369                        ncr3000)
     370                                basic_machine=i486-ncr
     371                                os=sysv4
     372                                ;;
     373                        netbsd386)
     374                                basic_machine=i386-unknown
     375                                os=netbsd
     376                                ;;
     377                        netwinder)
     378                                basic_machine=armv4l-rebel
     379                                os=linux
     380                                ;;
     381                        news | news700 | news800 | news900)
     382                                basic_machine=m68k-sony
     383                                os=newsos
     384                                ;;
     385                        news1000)
     386                                basic_machine=m68030-sony
     387                                os=newsos
     388                                ;;
     389                        necv70)
     390                                basic_machine=v70-nec
     391                                os=sysv
     392                                ;;
     393                        nh3000)
     394                                basic_machine=m68k-harris
     395                                os=cxux
     396                                ;;
     397                        nh[45]000)
     398                                basic_machine=m88k-harris
     399                                os=cxux
     400                                ;;
     401                        nindy960)
     402                                basic_machine=i960-intel
     403                                os=nindy
     404                                ;;
     405                        mon960)
     406                                basic_machine=i960-intel
     407                                os=mon960
     408                                ;;
     409                        nonstopux)
     410                                basic_machine=mips-compaq
     411                                os=nonstopux
     412                                ;;
     413                        os400)
     414                                basic_machine=powerpc-ibm
     415                                os=os400
     416                                ;;
     417                        OSE68000 | ose68000)
     418                                basic_machine=m68000-ericsson
     419                                os=ose
     420                                ;;
     421                        os68k)
     422                                basic_machine=m68k-none
     423                                os=os68k
     424                                ;;
     425                        paragon)
     426                                basic_machine=i860-intel
     427                                os=osf
     428                                ;;
     429                        parisc)
     430                                basic_machine=hppa-unknown
     431                                os=linux
     432                                ;;
     433                        pw32)
     434                                basic_machine=i586-unknown
     435                                os=pw32
     436                                ;;
     437                        rdos | rdos64)
     438                                basic_machine=x86_64-pc
     439                                os=rdos
     440                                ;;
     441                        rdos32)
     442                                basic_machine=i386-pc
     443                                os=rdos
     444                                ;;
     445                        rom68k)
     446                                basic_machine=m68k-rom68k
     447                                os=coff
     448                                ;;
     449                        sa29200)
     450                                basic_machine=a29k-amd
     451                                os=udi
     452                                ;;
     453                        sei)
     454                                basic_machine=mips-sei
     455                                os=seiux
     456                                ;;
     457                        sps7)
     458                                basic_machine=m68k-bull
     459                                os=sysv2
     460                                ;;
     461                        stratus)
     462                                basic_machine=i860-stratus
     463                                os=sysv4
     464                                ;;
     465                        sun2os3)
     466                                basic_machine=m68000-sun
     467                                os=sunos3
     468                                ;;
     469                        sun2os4)
     470                                basic_machine=m68000-sun
     471                                os=sunos4
     472                                ;;
     473                        sun3os3)
     474                                basic_machine=m68k-sun
     475                                os=sunos3
     476                                ;;
     477                        sun3os4)
     478                                basic_machine=m68k-sun
     479                                os=sunos4
     480                                ;;
     481                        sun4os3)
     482                                basic_machine=sparc-sun
     483                                os=sunos3
     484                                ;;
     485                        sun4os4)
     486                                basic_machine=sparc-sun
     487                                os=sunos4
     488                                ;;
     489                        sun4sol2)
     490                                basic_machine=sparc-sun
     491                                os=solaris2
     492                                ;;
     493                        sv1)
     494                                basic_machine=sv1-cray
     495                                os=unicos
     496                                ;;
     497                        symmetry)
     498                                basic_machine=i386-sequent
     499                                os=dynix
     500                                ;;
     501                        t3e)
     502                                basic_machine=alphaev5-cray
     503                                os=unicos
     504                                ;;
     505                        t90)
     506                                basic_machine=t90-cray
     507                                os=unicos
     508                                ;;
     509                        toad1)
     510                                basic_machine=pdp10-xkl
     511                                os=tops20
     512                                ;;
     513                        tpf)
     514                                basic_machine=s390x-ibm
     515                                os=tpf
     516                                ;;
     517                        udi29k)
     518                                basic_machine=a29k-amd
     519                                os=udi
     520                                ;;
     521                        ultra3)
     522                                basic_machine=a29k-nyu
     523                                os=sym1
     524                                ;;
     525                        v810 | necv810)
     526                                basic_machine=v810-nec
     527                                os=none
     528                                ;;
     529                        vaxv)
     530                                basic_machine=vax-dec
     531                                os=sysv
     532                                ;;
     533                        vms)
     534                                basic_machine=vax-dec
     535                                os=vms
     536                                ;;
     537                        vxworks960)
     538                                basic_machine=i960-wrs
     539                                os=vxworks
     540                                ;;
     541                        vxworks68)
     542                                basic_machine=m68k-wrs
     543                                os=vxworks
     544                                ;;
     545                        vxworks29k)
     546                                basic_machine=a29k-wrs
     547                                os=vxworks
     548                                ;;
     549                        xbox)
     550                                basic_machine=i686-pc
     551                                os=mingw32
     552                                ;;
     553                        ymp)
     554                                basic_machine=ymp-cray
     555                                os=unicos
     556                                ;;
     557                        *)
     558                                basic_machine=$1
     559                                os=
     560                                ;;
     561                esac
    242562                ;;
    243563esac
     
    254574        | am33_2.0 \
    255575        | arc | arceb \
    256         | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
     576        | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
    257577        | avr | avr32 \
    258578        | ba \
    259579        | be32 | be64 \
    260580        | bfin \
    261         | c4x | c8051 | clipper \
     581        | c4x | c8051 | clipper | csky \
    262582        | d10v | d30v | dlx | dsp16xx \
    263583        | e2k | epiphany \
     
    265585        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    266586        | hexagon \
    267         | i370 | i860 | i960 | ia64 \
     587        | i370 | i860 | i960 | ia16 | ia64 \
    268588        | ip2k | iq2000 \
    269589        | k1om \
     
    298618        | msp430 \
    299619        | nds32 | nds32le | nds32be \
     620        | nfp \
    300621        | nios | nios2 | nios2eb | nios2el \
    301622        | ns16k | ns32k \
    302623        | open8 | or1k | or1knd | or32 \
    303         | pdp10 | pdp11 | pj | pjl \
     624        | pdp10 | pj | pjl \
    304625        | powerpc | powerpc64 | powerpc64le | powerpcle \
     626        | pru \
    305627        | pyramid \
    306         | riscv32 | riscv64 \
     628        | riscv | riscv32 | riscv64 \
    307629        | rl78 | rx \
    308630        | score \
     
    316638        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
    317639        | visium \
    318         | we32k \
     640        | wasm32 \
    319641        | x86 | xc16x | xstormy16 | xtensa \
    320642        | z8k | z80)
     
    335657        m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
    336658                basic_machine=$basic_machine-unknown
    337                 os=-none
    338                 ;;
    339         m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
     659                os=${os:-none}
     660                ;;
     661        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
     662                ;;
     663        m9s12z | m68hcs12z | hcs12z | s12z)
     664                basic_machine=s12z-unknown
     665                os=${os:-none}
    340666                ;;
    341667        ms1)
    342668                basic_machine=mt-unknown
    343669                ;;
    344 
    345670        strongarm | thumb | xscale)
    346671                basic_machine=arm-unknown
     
    348673        xgate)
    349674                basic_machine=$basic_machine-unknown
    350                 os=-none
     675                os=${os:-none}
    351676                ;;
    352677        xscaleeb)
     
    364689          basic_machine=$basic_machine-pc
    365690          ;;
    366         # Object if more than one company name word.
    367         *-*-*)
    368                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
    369                 exit 1
    370                 ;;
    371691        # Recognize the basic CPU types with company name.
    372692        580-* \
     
    382702        | bfin-* | bs2000-* \
    383703        | c[123]* | c30-* | [cjt]90-* | c4x-* \
    384         | c8051-* | clipper-* | craynv-* | cydra-* \
     704        | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
    385705        | d10v-* | d30v-* | dlx-* \
    386706        | e2k-* | elxsi-* \
     
    389709        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    390710        | hexagon-* \
    391         | i*86-* | i860-* | i960-* | ia64-* \
     711        | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
    392712        | ip2k-* | iq2000-* \
    393713        | k1om-* \
     
    423743        | msp430-* \
    424744        | nds32-* | nds32le-* | nds32be-* \
     745        | nfp-* \
    425746        | nios-* | nios2-* | nios2eb-* | nios2el-* \
    426747        | none-* | np1-* | ns16k-* | ns32k-* \
     
    430751        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
    431752        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
     753        | pru-* \
    432754        | pyramid-* \
    433         | riscv32-* | riscv64-* \
     755        | riscv-* | riscv32-* | riscv64-* \
    434756        | rl78-* | romp-* | rs6000-* | rx-* \
    435757        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
     
    446768        | vax-* \
    447769        | visium-* \
     770        | wasm32-* \
    448771        | we32k-* \
    449772        | x86-* | x86_64-* | xc16x-* | xps100-* \
     
    458781        # Recognize the various machine names and aliases which stand
    459782        # for a CPU type and a company and sometimes even an OS.
    460         386bsd)
    461                 basic_machine=i386-unknown
    462                 os=-bsd
    463                 ;;
    464783        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
    465784                basic_machine=m68000-att
     
    468787                basic_machine=we32k-att
    469788                ;;
    470         a29khif)
    471                 basic_machine=a29k-amd
    472                 os=-udi
    473                 ;;
    474789        abacus)
    475790                basic_machine=abacus-unknown
    476791                ;;
    477         adobe68k)
    478                 basic_machine=m68010-adobe
    479                 os=-scout
    480                 ;;
    481792        alliant | fx80)
    482793                basic_machine=fx80-alliant
     
    485796                basic_machine=m68k-altos
    486797                ;;
    487         am29k)
    488                 basic_machine=a29k-none
    489                 os=-bsd
    490                 ;;
    491798        amd64)
    492799                basic_machine=x86_64-pc
    493800                ;;
    494801        amd64-*)
    495                 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
    496                 ;;
    497         amdahl)
    498                 basic_machine=580-amdahl
    499                 os=-sysv
     802                basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    500803                ;;
    501804        amiga | amiga-*)
    502805                basic_machine=m68k-unknown
    503806                ;;
    504         amigaos | amigados)
    505                 basic_machine=m68k-unknown
    506                 os=-amigaos
    507                 ;;
    508         amigaunix | amix)
    509                 basic_machine=m68k-unknown
    510                 os=-sysv4
    511                 ;;
    512         apollo68)
    513                 basic_machine=m68k-apollo
    514                 os=-sysv
    515                 ;;
    516         apollo68bsd)
    517                 basic_machine=m68k-apollo
    518                 os=-bsd
    519                 ;;
    520         aros)
    521                 basic_machine=i386-pc
    522                 os=-aros
    523                 ;;
    524         asmjs)
     807        asmjs)
    525808                basic_machine=asmjs-unknown
    526809                ;;
    527         aux)
    528                 basic_machine=m68k-apple
    529                 os=-aux
    530                 ;;
    531         balance)
    532                 basic_machine=ns32k-sequent
    533                 os=-dynix
    534                 ;;
    535         blackfin)
    536                 basic_machine=bfin-unknown
    537                 os=-linux
    538                 ;;
    539810        blackfin-*)
    540                 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
    541                 os=-linux
     811                basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
     812                os=linux
    542813                ;;
    543814        bluegene*)
    544815                basic_machine=powerpc-ibm
    545                 os=-cnk
     816                os=cnk
    546817                ;;
    547818        c54x-*)
    548                 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
     819                basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    549820                ;;
    550821        c55x-*)
    551                 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
     822                basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    552823                ;;
    553824        c6x-*)
    554                 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
     825                basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    555826                ;;
    556827        c90)
    557828                basic_machine=c90-cray
    558                 os=-unicos
    559                 ;;
    560         cegcc)
    561                 basic_machine=arm-unknown
    562                 os=-cegcc
     829                os=${os:-unicos}
    563830                ;;
    564831        convex-c1)
    565832                basic_machine=c1-convex
    566                 os=-bsd
     833                os=bsd
    567834                ;;
    568835        convex-c2)
    569836                basic_machine=c2-convex
    570                 os=-bsd
     837                os=bsd
    571838                ;;
    572839        convex-c32)
    573840                basic_machine=c32-convex
    574                 os=-bsd
     841                os=bsd
    575842                ;;
    576843        convex-c34)
    577844                basic_machine=c34-convex
    578                 os=-bsd
     845                os=bsd
    579846                ;;
    580847        convex-c38)
    581848                basic_machine=c38-convex
    582                 os=-bsd
    583                 ;;
    584         cray | j90)
    585                 basic_machine=j90-cray
    586                 os=-unicos
    587                 ;;
    588         craynv)
    589                 basic_machine=craynv-cray
    590                 os=-unicosmp
     849                os=bsd
    591850                ;;
    592851        cr16 | cr16-*)
    593852                basic_machine=cr16-unknown
    594                 os=-elf
     853                os=${os:-elf}
    595854                ;;
    596855        crds | unos)
     
    605864        crx)
    606865                basic_machine=crx-unknown
    607                 os=-elf
     866                os=${os:-elf}
    608867                ;;
    609868        da30 | da30-*)
     
    615874        decsystem10* | dec10*)
    616875                basic_machine=pdp10-dec
    617                 os=-tops10
     876                os=tops10
    618877                ;;
    619878        decsystem20* | dec20*)
    620879                basic_machine=pdp10-dec
    621                 os=-tops20
     880                os=tops20
    622881                ;;
    623882        delta | 3300 | motorola-3300 | motorola-delta \
     
    625884                basic_machine=m68k-motorola
    626885                ;;
    627         delta88)
    628                 basic_machine=m88k-motorola
    629                 os=-sysv3
    630                 ;;
    631         dicos)
    632                 basic_machine=i686-pc
    633                 os=-dicos
    634                 ;;
    635         djgpp)
    636                 basic_machine=i586-pc
    637                 os=-msdosdjgpp
    638                 ;;
    639886        dpx20 | dpx20-*)
    640887                basic_machine=rs6000-bull
    641                 os=-bosx
    642                 ;;
    643         dpx2* | dpx2*-bull)
     888                os=${os:-bosx}
     889                ;;
     890        dpx2*)
    644891                basic_machine=m68k-bull
    645                 os=-sysv3
    646                 ;;
    647         ebmon29k)
    648                 basic_machine=a29k-amd
    649                 os=-ebmon
     892                os=sysv3
     893                ;;
     894        e500v[12])
     895                basic_machine=powerpc-unknown
     896                os=$os"spe"
     897                ;;
     898        e500v[12]-*)
     899                basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
     900                os=$os"spe"
     901                ;;
     902        encore | umax | mmax)
     903                basic_machine=ns32k-encore
    650904                ;;
    651905        elxsi)
    652906                basic_machine=elxsi-elxsi
    653                 os=-bsd
    654                 ;;
    655         encore | umax | mmax)
    656                 basic_machine=ns32k-encore
    657                 ;;
    658         es1800 | OSE68k | ose68k | ose | OSE)
    659                 basic_machine=m68k-ericsson
    660                 os=-ose
     907                os=${os:-bsd}
    661908                ;;
    662909        fx2800)
     
    666913                basic_machine=ns32k-ns
    667914                ;;
    668         gmicro)
    669                 basic_machine=tron-gmicro
    670                 os=-sysv
    671                 ;;
    672         go32)
    673                 basic_machine=i386-pc
    674                 os=-go32
    675                 ;;
    676915        h3050r* | hiux*)
    677916                basic_machine=hppa1.1-hitachi
    678                 os=-hiuxwe2
    679                 ;;
    680         h8300hms)
    681                 basic_machine=h8300-hitachi
    682                 os=-hms
    683                 ;;
    684         h8300xray)
    685                 basic_machine=h8300-hitachi
    686                 os=-xray
    687                 ;;
    688         h8500hms)
    689                 basic_machine=h8500-hitachi
    690                 os=-hms
    691                 ;;
    692         harris)
    693                 basic_machine=m88k-harris
    694                 os=-sysv3
     917                os=hiuxwe2
    695918                ;;
    696919        hp300-*)
    697920                basic_machine=m68k-hp
    698                 ;;
    699         hp300bsd)
    700                 basic_machine=m68k-hp
    701                 os=-bsd
    702                 ;;
    703         hp300hpux)
    704                 basic_machine=m68k-hp
    705                 os=-hpux
    706921                ;;
    707922        hp3k9[0-9][0-9] | hp9[0-9][0-9])
     
    734949                basic_machine=hppa1.0-hp
    735950                ;;
    736         hppa-next)
    737                 os=-nextstep3
    738                 ;;
    739         hppaosf)
    740                 basic_machine=hppa1.1-hp
    741                 os=-osf
    742                 ;;
    743         hppro)
    744                 basic_machine=hppa1.1-hp
    745                 os=-proelf
    746                 ;;
    747951        i370-ibm* | ibm*)
    748952                basic_machine=i370-ibm
    749953                ;;
    750954        i*86v32)
    751                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    752                 os=-sysv32
     955                basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
     956                os=sysv32
    753957                ;;
    754958        i*86v4*)
    755                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    756                 os=-sysv4
     959                basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
     960                os=sysv4
    757961                ;;
    758962        i*86v)
    759                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    760                 os=-sysv
     963                basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
     964                os=sysv
    761965                ;;
    762966        i*86sol2)
    763                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    764                 os=-solaris2
    765                 ;;
    766         i386mach)
    767                 basic_machine=i386-mach
    768                 os=-mach
    769                 ;;
    770         i386-vsta | vsta)
    771                 basic_machine=i386-unknown
    772                 os=-vsta
     967                basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
     968                os=solaris2
     969                ;;
     970        j90 | j90-cray)
     971                basic_machine=j90-cray
     972                os=${os:-unicos}
    773973                ;;
    774974        iris | iris4d)
    775975                basic_machine=mips-sgi
    776976                case $os in
    777                     -irix*)
     977                    irix*)
    778978                        ;;
    779979                    *)
    780                         os=-irix4
     980                        os=irix4
    781981                        ;;
    782982                esac
    783983                ;;
    784         isi68 | isi)
    785                 basic_machine=m68k-isi
    786                 os=-sysv
    787                 ;;
    788984        leon-*|leon[3-9]-*)
    789                 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
    790                 ;;
    791         m68knommu)
    792                 basic_machine=m68k-unknown
    793                 os=-linux
     985                basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
    794986                ;;
    795987        m68knommu-*)
    796                 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
    797                 os=-linux
    798                 ;;
    799         m88k-omron*)
    800                 basic_machine=m88k-omron
    801                 ;;
    802         magnum | m3230)
    803                 basic_machine=mips-mips
    804                 os=-sysv
    805                 ;;
    806         merlin)
    807                 basic_machine=ns32k-utek
    808                 os=-sysv
     988                basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
     989                os=linux
    809990                ;;
    810991        microblaze*)
    811992                basic_machine=microblaze-xilinx
    812993                ;;
    813         mingw64)
    814                 basic_machine=x86_64-pc
    815                 os=-mingw64
    816                 ;;
    817         mingw32)
    818                 basic_machine=i686-pc
    819                 os=-mingw32
    820                 ;;
    821         mingw32ce)
    822                 basic_machine=arm-unknown
    823                 os=-mingw32ce
    824                 ;;
    825994        miniframe)
    826995                basic_machine=m68000-convergent
    827996                ;;
    828         *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
     997        *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
    829998                basic_machine=m68k-atari
    830                 os=-mint
     999                os=mint
    8311000                ;;
    8321001        mips3*-*)
    833                 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
     1002                basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
    8341003                ;;
    8351004        mips3*)
    836                 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    837                 ;;
    838         monitor)
    839                 basic_machine=m68k-rom68k
    840                 os=-coff
    841                 ;;
    842         morphos)
    843                 basic_machine=powerpc-unknown
    844                 os=-morphos
    845                 ;;
    846         moxiebox)
    847                 basic_machine=moxie-unknown
    848                 os=-moxiebox
    849                 ;;
    850         msdos)
    851                 basic_machine=i386-pc
    852                 os=-msdos
     1005                basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
    8531006                ;;
    8541007        ms1-*)
    855                 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
    856                 ;;
    857         msys)
    858                 basic_machine=i686-pc
    859                 os=-msys
    860                 ;;
    861         mvs)
    862                 basic_machine=i370-ibm
    863                 os=-mvs
    864                 ;;
    865         nacl)
    866                 basic_machine=le32-unknown
    867                 os=-nacl
    868                 ;;
    869         ncr3000)
    870                 basic_machine=i486-ncr
    871                 os=-sysv4
    872                 ;;
    873         netbsd386)
    874                 basic_machine=i386-unknown
    875                 os=-netbsd
    876                 ;;
    877         netwinder)
    878                 basic_machine=armv4l-rebel
    879                 os=-linux
    880                 ;;
    881         news | news700 | news800 | news900)
    882                 basic_machine=m68k-sony
    883                 os=-newsos
    884                 ;;
    885         news1000)
    886                 basic_machine=m68030-sony
    887                 os=-newsos
     1008                basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
    8881009                ;;
    8891010        news-3600 | risc-news)
    8901011                basic_machine=mips-sony
    891                 os=-newsos
    892                 ;;
    893         necv70)
    894                 basic_machine=v70-nec
    895                 os=-sysv
    896                 ;;
    897         next | m*-next )
     1012                os=newsos
     1013                ;;
     1014        next | m*-next)
    8981015                basic_machine=m68k-next
    8991016                case $os in
    900                     -nextstep* )
     1017                    nextstep* )
    9011018                        ;;
    902                     -ns2*)
    903                       os=-nextstep2
     1019                    ns2*)
     1020                      os=nextstep2
    9041021                        ;;
    9051022                    *)
    906                       os=-nextstep3
     1023                      os=nextstep3
    9071024                        ;;
    9081025                esac
    9091026                ;;
    910         nh3000)
    911                 basic_machine=m68k-harris
    912                 os=-cxux
    913                 ;;
    914         nh[45]000)
    915                 basic_machine=m88k-harris
    916                 os=-cxux
    917                 ;;
    918         nindy960)
    919                 basic_machine=i960-intel
    920                 os=-nindy
    921                 ;;
    922         mon960)
    923                 basic_machine=i960-intel
    924                 os=-mon960
    925                 ;;
    926         nonstopux)
    927                 basic_machine=mips-compaq
    928                 os=-nonstopux
    929                 ;;
    9301027        np1)
    9311028                basic_machine=np1-gould
     
    9401037                basic_machine=nsr-tandem
    9411038                ;;
     1039        nsv-tandem)
     1040                basic_machine=nsv-tandem
     1041                ;;
     1042        nsx-tandem)
     1043                basic_machine=nsx-tandem
     1044                ;;
    9421045        op50n-* | op60c-*)
    9431046                basic_machine=hppa1.1-oki
    944                 os=-proelf
     1047                os=proelf
    9451048                ;;
    9461049        openrisc | openrisc-*)
    9471050                basic_machine=or32-unknown
    9481051                ;;
    949         os400)
    950                 basic_machine=powerpc-ibm
    951                 os=-os400
    952                 ;;
    953         OSE68000 | ose68000)
    954                 basic_machine=m68000-ericsson
    955                 os=-ose
    956                 ;;
    957         os68k)
    958                 basic_machine=m68k-none
    959                 os=-os68k
    960                 ;;
    9611052        pa-hitachi)
    9621053                basic_machine=hppa1.1-hitachi
    963                 os=-hiuxwe2
    964                 ;;
    965         paragon)
    966                 basic_machine=i860-intel
    967                 os=-osf
    968                 ;;
    969         parisc)
    970                 basic_machine=hppa-unknown
    971                 os=-linux
     1054                os=hiuxwe2
    9721055                ;;
    9731056        parisc-*)
    974                 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
    975                 os=-linux
     1057                basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
     1058                os=linux
    9761059                ;;
    9771060        pbd)
     
    9881071                ;;
    9891072        pc98-*)
    990                 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
     1073                basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    9911074                ;;
    9921075        pentium | p5 | k5 | k6 | nexgen | viac3)
     
    10031086                ;;
    10041087        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
    1005                 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
     1088                basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    10061089                ;;
    10071090        pentiumpro-* | p6-* | 6x86-* | athlon-*)
    1008                 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
     1091                basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    10091092                ;;
    10101093        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
    1011                 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
     1094                basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    10121095                ;;
    10131096        pentium4-*)
    1014                 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
     1097                basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    10151098                ;;
    10161099        pn)
     
    10221105                ;;
    10231106        ppc-* | ppcbe-*)
    1024                 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
    1025                 ;;
    1026         ppcle | powerpclittle | ppc-le | powerpc-little)
     1107                basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
     1108                ;;
     1109        ppcle | powerpclittle)
    10271110                basic_machine=powerpcle-unknown
    10281111                ;;
    10291112        ppcle-* | powerpclittle-*)
    1030                 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
     1113                basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    10311114                ;;
    10321115        ppc64)  basic_machine=powerpc64-unknown
    10331116                ;;
    1034         ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
    1035                 ;;
    1036         ppc64le | powerpc64little | ppc64-le | powerpc64-little)
     1117        ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
     1118                ;;
     1119        ppc64le | powerpc64little)
    10371120                basic_machine=powerpc64le-unknown
    10381121                ;;
    10391122        ppc64le-* | powerpc64little-*)
    1040                 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
     1123                basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    10411124                ;;
    10421125        ps2)
    10431126                basic_machine=i386-ibm
    10441127                ;;
    1045         pw32)
    1046                 basic_machine=i586-unknown
    1047                 os=-pw32
    1048                 ;;
    1049         rdos | rdos64)
    1050                 basic_machine=x86_64-pc
    1051                 os=-rdos
    1052                 ;;
    1053         rdos32)
    1054                 basic_machine=i386-pc
    1055                 os=-rdos
    1056                 ;;
    1057         rom68k)
    1058                 basic_machine=m68k-rom68k
    1059                 os=-coff
    1060                 ;;
    10611128        rm[46]00)
    10621129                basic_machine=mips-siemens
     
    10711138                basic_machine=s390x-ibm
    10721139                ;;
    1073         sa29200)
    1074                 basic_machine=a29k-amd
    1075                 os=-udi
    1076                 ;;
    10771140        sb1)
    10781141                basic_machine=mipsisa64sb1-unknown
     
    10831146        sde)
    10841147                basic_machine=mipsisa32-sde
    1085                 os=-elf
    1086                 ;;
    1087         sei)
    1088                 basic_machine=mips-sei
    1089                 os=-seiux
     1148                os=${os:-elf}
    10901149                ;;
    10911150        sequent)
    10921151                basic_machine=i386-sequent
    10931152                ;;
    1094         sh)
    1095                 basic_machine=sh-hitachi
    1096                 os=-hms
    1097                 ;;
    10981153        sh5el)
    10991154                basic_machine=sh5le-unknown
    11001155                ;;
    1101         sh64)
    1102                 basic_machine=sh64-unknown
    1103                 ;;
    1104         sparclite-wrs | simso-wrs)
     1156        simso-wrs)
    11051157                basic_machine=sparclite-wrs
    1106                 os=-vxworks
    1107                 ;;
    1108         sps7)
    1109                 basic_machine=m68k-bull
    1110                 os=-sysv2
     1158                os=vxworks
    11111159                ;;
    11121160        spur)
     
    11161164                basic_machine=m68k-tandem
    11171165                ;;
    1118         stratus)
    1119                 basic_machine=i860-stratus
    1120                 os=-sysv4
    1121                 ;;
    11221166        strongarm-* | thumb-*)
    1123                 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
     1167                basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    11241168                ;;
    11251169        sun2)
    11261170                basic_machine=m68000-sun
    11271171                ;;
    1128         sun2os3)
    1129                 basic_machine=m68000-sun
    1130                 os=-sunos3
    1131                 ;;
    1132         sun2os4)
    1133                 basic_machine=m68000-sun
    1134                 os=-sunos4
    1135                 ;;
    1136         sun3os3)
    1137                 basic_machine=m68k-sun
    1138                 os=-sunos3
    1139                 ;;
    1140         sun3os4)
    1141                 basic_machine=m68k-sun
    1142                 os=-sunos4
    1143                 ;;
    1144         sun4os3)
    1145                 basic_machine=sparc-sun
    1146                 os=-sunos3
    1147                 ;;
    1148         sun4os4)
    1149                 basic_machine=sparc-sun
    1150                 os=-sunos4
    1151                 ;;
    1152         sun4sol2)
    1153                 basic_machine=sparc-sun
    1154                 os=-solaris2
    1155                 ;;
    11561172        sun3 | sun3-*)
    11571173                basic_machine=m68k-sun
     
    11631179                basic_machine=i386-sun
    11641180                ;;
    1165         sv1)
    1166                 basic_machine=sv1-cray
    1167                 os=-unicos
    1168                 ;;
    1169         symmetry)
    1170                 basic_machine=i386-sequent
    1171                 os=-dynix
    1172                 ;;
    1173         t3e)
    1174                 basic_machine=alphaev5-cray
    1175                 os=-unicos
    1176                 ;;
    1177         t90)
    1178                 basic_machine=t90-cray
    1179                 os=-unicos
    1180                 ;;
    11811181        tile*)
    11821182                basic_machine=$basic_machine-unknown
    1183                 os=-linux-gnu
     1183                os=linux-gnu
    11841184                ;;
    11851185        tx39)
     
    11891189                basic_machine=mipstx39el-unknown
    11901190                ;;
    1191         toad1)
    1192                 basic_machine=pdp10-xkl
    1193                 os=-tops20
    1194                 ;;
    11951191        tower | tower-32)
    11961192                basic_machine=m68k-ncr
    11971193                ;;
    1198         tpf)
    1199                 basic_machine=s390x-ibm
    1200                 os=-tpf
    1201                 ;;
    1202         udi29k)
    1203                 basic_machine=a29k-amd
    1204                 os=-udi
    1205                 ;;
    1206         ultra3)
    1207                 basic_machine=a29k-nyu
    1208                 os=-sym1
    1209                 ;;
    1210         v810 | necv810)
    1211                 basic_machine=v810-nec
    1212                 os=-none
    1213                 ;;
    1214         vaxv)
    1215                 basic_machine=vax-dec
    1216                 os=-sysv
    1217                 ;;
    1218         vms)
    1219                 basic_machine=vax-dec
    1220                 os=-vms
    1221                 ;;
    12221194        vpp*|vx|vx-*)
    12231195                basic_machine=f301-fujitsu
    12241196                ;;
    1225         vxworks960)
    1226                 basic_machine=i960-wrs
    1227                 os=-vxworks
    1228                 ;;
    1229         vxworks68)
    1230                 basic_machine=m68k-wrs
    1231                 os=-vxworks
    1232                 ;;
    1233         vxworks29k)
    1234                 basic_machine=a29k-wrs
    1235                 os=-vxworks
    1236                 ;;
    12371197        w65*)
    12381198                basic_machine=w65-wdc
    1239                 os=-none
     1199                os=none
    12401200                ;;
    12411201        w89k-*)
    12421202                basic_machine=hppa1.1-winbond
    1243                 os=-proelf
    1244                 ;;
    1245         xbox)
    1246                 basic_machine=i686-pc
    1247                 os=-mingw32
     1203                os=proelf
     1204                ;;
     1205        x64)
     1206                basic_machine=x86_64-pc
    12481207                ;;
    12491208        xps | xps100)
     
    12511210                ;;
    12521211        xscale-* | xscalee[bl]-*)
    1253                 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
    1254                 ;;
    1255         ymp)
    1256                 basic_machine=ymp-cray
    1257                 os=-unicos
    1258                 ;;
    1259         z8k-*-coff)
    1260                 basic_machine=z8k-unknown
    1261                 os=-sim
    1262                 ;;
    1263         z80-*-coff)
    1264                 basic_machine=z80-unknown
    1265                 os=-sim
     1212                basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
    12661213                ;;
    12671214        none)
    12681215                basic_machine=none-none
    1269                 os=-none
     1216                os=${os:-none}
    12701217                ;;
    12711218
     
    12931240                basic_machine=vax-dec
    12941241                ;;
    1295         pdp10)
    1296                 # there are many clones, so DEC is not a safe bet
    1297                 basic_machine=pdp10-unknown
    1298                 ;;
    12991242        pdp11)
    13001243                basic_machine=pdp11-dec
     
    13061249                basic_machine=sh-unknown
    13071250                ;;
    1308         sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
    1309                 basic_machine=sparc-sun
    1310                 ;;
    13111251        cydra)
    13121252                basic_machine=cydra-cydrome
     
    13281268                ;;
    13291269        *)
    1330                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
     1270                echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
    13311271                exit 1
    13321272                ;;
     
    13361276case $basic_machine in
    13371277        *-digital*)
    1338                 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
     1278                basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
    13391279                ;;
    13401280        *-commodore*)
    1341                 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
     1281                basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
    13421282                ;;
    13431283        *)
     
    13471287# Decode manufacturer-specific aliases for certain operating systems.
    13481288
    1349 if [ x"$os" != x"" ]
     1289if [ x$os != x ]
    13501290then
    13511291case $os in
    1352         # First match some system type aliases
    1353         # that might get confused with valid system types.
    1354         # -solaris* is a basic system type, with this one exception.
    1355         -auroraux)
    1356                 os=-auroraux
    1357                 ;;
    1358         -solaris1 | -solaris1.*)
     1292        # First match some system type aliases that might get confused
     1293        # with valid system types.
     1294        # solaris* is a basic system type, with this one exception.
     1295        auroraux)
     1296                os=auroraux
     1297                ;;
     1298        bluegene*)
     1299                os=cnk
     1300                ;;
     1301        solaris1 | solaris1.*)
    13591302                os=`echo $os | sed -e 's|solaris1|sunos4|'`
    13601303                ;;
    1361         -solaris)
    1362                 os=-solaris2
    1363                 ;;
    1364         -svr4*)
    1365                 os=-sysv4
    1366                 ;;
    1367         -unixware*)
    1368                 os=-sysv4.2uw
    1369                 ;;
    1370         -gnu/linux*)
     1304        solaris)
     1305                os=solaris2
     1306                ;;
     1307        unixware*)
     1308                os=sysv4.2uw
     1309                ;;
     1310        gnu/linux*)
    13711311                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
    13721312                ;;
    1373         # First accept the basic system types.
     1313        # es1800 is here to avoid being matched by es* (a different OS)
     1314        es1800*)
     1315                os=ose
     1316                ;;
     1317        # Some version numbers need modification
     1318        chorusos*)
     1319                os=chorusos
     1320                ;;
     1321        isc)
     1322                os=isc2.2
     1323                ;;
     1324        sco6)
     1325                os=sco5v6
     1326                ;;
     1327        sco5)
     1328                os=sco3.2v5
     1329                ;;
     1330        sco4)
     1331                os=sco3.2v4
     1332                ;;
     1333        sco3.2.[4-9]*)
     1334                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
     1335                ;;
     1336        sco3.2v[4-9]* | sco5v6*)
     1337                # Don't forget version if it is 3.2v4 or newer.
     1338                ;;
     1339        scout)
     1340                # Don't match below
     1341                ;;
     1342        sco*)
     1343                os=sco3.2v2
     1344                ;;
     1345        psos*)
     1346                os=psos
     1347                ;;
     1348        # Now accept the basic system types.
    13741349        # The portable systems comes first.
    1375         # Each alternative MUST END IN A *, to match a version number.
    1376         # -sysv* is not here because it comes later, after sysvr4.
    1377         -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
    1378               | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
    1379               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
    1380               | -sym* | -kopensolaris* | -plan9* \
    1381               | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
    1382               | -aos* | -aros* | -cloudabi* | -sortix* \
    1383               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    1384               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1385               | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
    1386               | -bitrig* | -openbsd* | -solidbsd* \
    1387               | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
    1388               | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    1389               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    1390               | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    1391               | -chorusos* | -chorusrdb* | -cegcc* \
    1392               | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1393               | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
    1394               | -linux-newlib* | -linux-musl* | -linux-uclibc* \
    1395               | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
    1396               | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    1397               | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    1398               | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
    1399               | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    1400               | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
    1401               | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
    1402               | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
     1350        # Each alternative MUST end in a * to match a version number.
     1351        # sysv* is not here because it comes later, after sysvr4.
     1352        gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
     1353             | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
     1354             | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
     1355             | sym* | kopensolaris* | plan9* \
     1356             | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
     1357             | aos* | aros* | cloudabi* | sortix* \
     1358             | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
     1359             | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
     1360             | knetbsd* | mirbsd* | netbsd* \
     1361             | bitrig* | openbsd* | solidbsd* | libertybsd* \
     1362             | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
     1363             | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
     1364             | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
     1365             | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
     1366             | chorusrdb* | cegcc* | glidix* \
     1367             | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
     1368             | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
     1369             | linux-newlib* | linux-musl* | linux-uclibc* \
     1370             | uxpv* | beos* | mpeix* | udk* | moxiebox* \
     1371             | interix* | uwin* | mks* | rhapsody* | darwin* \
     1372             | openstep* | oskit* | conix* | pw32* | nonstopux* \
     1373             | storm-chaos* | tops10* | tenex* | tops20* | its* \
     1374             | os2* | vos* | palmos* | uclinux* | nucleus* \
     1375             | morphos* | superux* | rtmk* | windiss* \
     1376             | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
     1377             | skyos* | haiku* | rdos* | toppers* | drops* | es* \
     1378             | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
     1379             | midnightbsd*)
    14031380        # Remember, each alternative MUST END IN *, to match a version number.
    14041381                ;;
    1405         -qnx*)
     1382        qnx*)
    14061383                case $basic_machine in
    14071384                    x86-* | i*86-*)
    14081385                        ;;
    14091386                    *)
    1410                         os=-nto$os
     1387                        os=nto-$os
    14111388                        ;;
    14121389                esac
    14131390                ;;
    1414         -nto-qnx*)
    1415                 ;;
    1416         -nto*)
     1391        hiux*)
     1392                os=hiuxwe2
     1393                ;;
     1394        nto-qnx*)
     1395                ;;
     1396        nto*)
    14171397                os=`echo $os | sed -e 's|nto|nto-qnx|'`
    14181398                ;;
    1419         -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    1420               | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
    1421               | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    1422                 ;;
    1423         -mac*)
    1424                 os=`echo $os | sed -e 's|mac|macos|'`
    1425                 ;;
    1426         -linux-dietlibc)
    1427                 os=-linux-dietlibc
    1428                 ;;
    1429         -linux*)
     1399        sim | xray | os68k* | v88r* \
     1400            | windows* | osx | abug | netware* | os9* \
     1401            | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
     1402                ;;
     1403        linux-dietlibc)
     1404                os=linux-dietlibc
     1405                ;;
     1406        linux*)
    14301407                os=`echo $os | sed -e 's|linux|linux-gnu|'`
    14311408                ;;
    1432         -sunos5*)
    1433                 os=`echo $os | sed -e 's|sunos5|solaris2|'`
    1434                 ;;
    1435         -sunos6*)
    1436                 os=`echo $os | sed -e 's|sunos6|solaris3|'`
    1437                 ;;
    1438         -opened*)
    1439                 os=-openedition
    1440                 ;;
    1441         -os400*)
    1442                 os=-os400
    1443                 ;;
    1444         -wince*)
    1445                 os=-wince
    1446                 ;;
    1447         -osfrose*)
    1448                 os=-osfrose
    1449                 ;;
    1450         -osf*)
    1451                 os=-osf
    1452                 ;;
    1453         -utek*)
    1454                 os=-bsd
    1455                 ;;
    1456         -dynix*)
    1457                 os=-bsd
    1458                 ;;
    1459         -acis*)
    1460                 os=-aos
    1461                 ;;
    1462         -atheos*)
    1463                 os=-atheos
    1464                 ;;
    1465         -syllable*)
    1466                 os=-syllable
    1467                 ;;
    1468         -386bsd)
    1469                 os=-bsd
    1470                 ;;
    1471         -ctix* | -uts*)
    1472                 os=-sysv
    1473                 ;;
    1474         -nova*)
    1475                 os=-rtmk-nova
    1476                 ;;
    1477         -ns2 )
    1478                 os=-nextstep2
    1479                 ;;
    1480         -nsk*)
    1481                 os=-nsk
     1409        lynx*178)
     1410                os=lynxos178
     1411                ;;
     1412        lynx*5)
     1413                os=lynxos5
     1414                ;;
     1415        lynx*)
     1416                os=lynxos
     1417                ;;
     1418        mac*)
     1419                os=`echo "$os" | sed -e 's|mac|macos|'`
     1420                ;;
     1421        opened*)
     1422                os=openedition
     1423                ;;
     1424        os400*)
     1425                os=os400
     1426                ;;
     1427        sunos5*)
     1428                os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
     1429                ;;
     1430        sunos6*)
     1431                os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
     1432                ;;
     1433        wince*)
     1434                os=wince
     1435                ;;
     1436        utek*)
     1437                os=bsd
     1438                ;;
     1439        dynix*)
     1440                os=bsd
     1441                ;;
     1442        acis*)
     1443                os=aos
     1444                ;;
     1445        atheos*)
     1446                os=atheos
     1447                ;;
     1448        syllable*)
     1449                os=syllable
     1450                ;;
     1451        386bsd)
     1452                os=bsd
     1453                ;;
     1454        ctix* | uts*)
     1455                os=sysv
     1456                ;;
     1457        nova*)
     1458                os=rtmk-nova
     1459                ;;
     1460        ns2)
     1461                os=nextstep2
     1462                ;;
     1463        nsk*)
     1464                os=nsk
    14821465                ;;
    14831466        # Preserve the version number of sinix5.
    1484         -sinix5.*)
     1467        sinix5.*)
    14851468                os=`echo $os | sed -e 's|sinix|sysv|'`
    14861469                ;;
    1487         -sinix*)
    1488                 os=-sysv4
    1489                 ;;
    1490         -tpf*)
    1491                 os=-tpf
    1492                 ;;
    1493         -triton*)
    1494                 os=-sysv3
    1495                 ;;
    1496         -oss*)
    1497                 os=-sysv3
    1498                 ;;
    1499         -svr4)
    1500                 os=-sysv4
    1501                 ;;
    1502         -svr3)
    1503                 os=-sysv3
    1504                 ;;
    1505         -sysvr4)
    1506                 os=-sysv4
    1507                 ;;
    1508         # This must come after -sysvr4.
    1509         -sysv*)
    1510                 ;;
    1511         -ose*)
    1512                 os=-ose
    1513                 ;;
    1514         -es1800*)
    1515                 os=-ose
    1516                 ;;
    1517         -xenix)
    1518                 os=-xenix
    1519                 ;;
    1520         -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    1521                 os=-mint
    1522                 ;;
    1523         -aros*)
    1524                 os=-aros
    1525                 ;;
    1526         -zvmoe)
    1527                 os=-zvmoe
    1528                 ;;
    1529         -dicos*)
    1530                 os=-dicos
    1531                 ;;
    1532         -nacl*)
    1533                 ;;
    1534         -none)
     1470        sinix*)
     1471                os=sysv4
     1472                ;;
     1473        tpf*)
     1474                os=tpf
     1475                ;;
     1476        triton*)
     1477                os=sysv3
     1478                ;;
     1479        oss*)
     1480                os=sysv3
     1481                ;;
     1482        svr4*)
     1483                os=sysv4
     1484                ;;
     1485        svr3)
     1486                os=sysv3
     1487                ;;
     1488        sysvr4)
     1489                os=sysv4
     1490                ;;
     1491        # This must come after sysvr4.
     1492        sysv*)
     1493                ;;
     1494        ose*)
     1495                os=ose
     1496                ;;
     1497        *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
     1498                os=mint
     1499                ;;
     1500        zvmoe)
     1501                os=zvmoe
     1502                ;;
     1503        dicos*)
     1504                os=dicos
     1505                ;;
     1506        pikeos*)
     1507                # Until real need of OS specific support for
     1508                # particular features comes up, bare metal
     1509                # configurations are quite functional.
     1510                case $basic_machine in
     1511                    arm*)
     1512                        os=eabi
     1513                        ;;
     1514                    *)
     1515                        os=elf
     1516                        ;;
     1517                esac
     1518                ;;
     1519        nacl*)
     1520                ;;
     1521        ios)
     1522                ;;
     1523        none)
     1524                ;;
     1525        *-eabi)
    15351526                ;;
    15361527        *)
    1537                 # Get rid of the `-' at the beginning of $os.
    1538                 os=`echo $os | sed 's/[^-]*-//'`
    1539                 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
     1528                echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
    15401529                exit 1
    15411530                ;;
     
    15551544case $basic_machine in
    15561545        score-*)
    1557                 os=-elf
     1546                os=elf
    15581547                ;;
    15591548        spu-*)
    1560                 os=-elf
     1549                os=elf
    15611550                ;;
    15621551        *-acorn)
    1563                 os=-riscix1.2
     1552                os=riscix1.2
    15641553                ;;
    15651554        arm*-rebel)
    1566                 os=-linux
     1555                os=linux
    15671556                ;;
    15681557        arm*-semi)
    1569                 os=-aout
     1558                os=aout
    15701559                ;;
    15711560        c4x-* | tic4x-*)
    1572                 os=-coff
     1561                os=coff
    15731562                ;;
    15741563        c8051-*)
    1575                 os=-elf
     1564                os=elf
     1565                ;;
     1566        clipper-intergraph)
     1567                os=clix
    15761568                ;;
    15771569        hexagon-*)
    1578                 os=-elf
     1570                os=elf
    15791571                ;;
    15801572        tic54x-*)
    1581                 os=-coff
     1573                os=coff
    15821574                ;;
    15831575        tic55x-*)
    1584                 os=-coff
     1576                os=coff
    15851577                ;;
    15861578        tic6x-*)
    1587                 os=-coff
     1579                os=coff
    15881580                ;;
    15891581        # This must come before the *-dec entry.
    15901582        pdp10-*)
    1591                 os=-tops20
     1583                os=tops20
    15921584                ;;
    15931585        pdp11-*)
    1594                 os=-none
     1586                os=none
    15951587                ;;
    15961588        *-dec | vax-*)
    1597                 os=-ultrix4.2
     1589                os=ultrix4.2
    15981590                ;;
    15991591        m68*-apollo)
    1600                 os=-domain
     1592                os=domain
    16011593                ;;
    16021594        i386-sun)
    1603                 os=-sunos4.0.2
     1595                os=sunos4.0.2
    16041596                ;;
    16051597        m68000-sun)
    1606                 os=-sunos3
     1598                os=sunos3
    16071599                ;;
    16081600        m68*-cisco)
    1609                 os=-aout
     1601                os=aout
    16101602                ;;
    16111603        mep-*)
    1612                 os=-elf
     1604                os=elf
    16131605                ;;
    16141606        mips*-cisco)
    1615                 os=-elf
     1607                os=elf
    16161608                ;;
    16171609        mips*-*)
    1618                 os=-elf
     1610                os=elf
    16191611                ;;
    16201612        or32-*)
    1621                 os=-coff
     1613                os=coff
    16221614                ;;
    16231615        *-tti)  # must be before sparc entry or we get the wrong os.
    1624                 os=-sysv3
     1616                os=sysv3
    16251617                ;;
    16261618        sparc-* | *-sun)
    1627                 os=-sunos4.1.1
     1619                os=sunos4.1.1
     1620                ;;
     1621        pru-*)
     1622                os=elf
    16281623                ;;
    16291624        *-be)
    1630                 os=-beos
    1631                 ;;
    1632         *-haiku)
    1633                 os=-haiku
     1625                os=beos
    16341626                ;;
    16351627        *-ibm)
    1636                 os=-aix
     1628                os=aix
    16371629                ;;
    16381630        *-knuth)
    1639                 os=-mmixware
     1631                os=mmixware
    16401632                ;;
    16411633        *-wec)
    1642                 os=-proelf
     1634                os=proelf
    16431635                ;;
    16441636        *-winbond)
    1645                 os=-proelf
     1637                os=proelf
    16461638                ;;
    16471639        *-oki)
    1648                 os=-proelf
     1640                os=proelf
    16491641                ;;
    16501642        *-hp)
    1651                 os=-hpux
     1643                os=hpux
    16521644                ;;
    16531645        *-hitachi)
    1654                 os=-hiux
     1646                os=hiux
    16551647                ;;
    16561648        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
    1657                 os=-sysv
     1649                os=sysv
    16581650                ;;
    16591651        *-cbm)
    1660                 os=-amigaos
     1652                os=amigaos
    16611653                ;;
    16621654        *-dg)
    1663                 os=-dgux
     1655                os=dgux
    16641656                ;;
    16651657        *-dolphin)
    1666                 os=-sysv3
     1658                os=sysv3
    16671659                ;;
    16681660        m68k-ccur)
    1669                 os=-rtu
     1661                os=rtu
    16701662                ;;
    16711663        m88k-omron*)
    1672                 os=-luna
    1673                 ;;
    1674         *-next )
    1675                 os=-nextstep
     1664                os=luna
     1665                ;;
     1666        *-next)
     1667                os=nextstep
    16761668                ;;
    16771669        *-sequent)
    1678                 os=-ptx
     1670                os=ptx
    16791671                ;;
    16801672        *-crds)
    1681                 os=-unos
     1673                os=unos
    16821674                ;;
    16831675        *-ns)
    1684                 os=-genix
     1676                os=genix
    16851677                ;;
    16861678        i370-*)
    1687                 os=-mvs
    1688                 ;;
    1689         *-next)
    1690                 os=-nextstep3
     1679                os=mvs
    16911680                ;;
    16921681        *-gould)
    1693                 os=-sysv
     1682                os=sysv
    16941683                ;;
    16951684        *-highlevel)
    1696                 os=-bsd
     1685                os=bsd
    16971686                ;;
    16981687        *-encore)
    1699                 os=-bsd
     1688                os=bsd
    17001689                ;;
    17011690        *-sgi)
    1702                 os=-irix
     1691                os=irix
    17031692                ;;
    17041693        *-siemens)
    1705                 os=-sysv4
     1694                os=sysv4
    17061695                ;;
    17071696        *-masscomp)
    1708                 os=-rtu
     1697                os=rtu
    17091698                ;;
    17101699        f30[01]-fujitsu | f700-fujitsu)
    1711                 os=-uxpv
     1700                os=uxpv
    17121701                ;;
    17131702        *-rom68k)
    1714                 os=-coff
     1703                os=coff
    17151704                ;;
    17161705        *-*bug)
    1717                 os=-coff
     1706                os=coff
    17181707                ;;
    17191708        *-apple)
    1720                 os=-macos
     1709                os=macos
    17211710                ;;
    17221711        *-atari*)
    1723                 os=-mint
     1712                os=mint
     1713                ;;
     1714        *-wrs)
     1715                os=vxworks
    17241716                ;;
    17251717        *)
    1726                 os=-none
     1718                os=none
    17271719                ;;
    17281720esac
     
    17351727        *-unknown)
    17361728                case $os in
    1737                         -riscix*)
     1729                        riscix*)
    17381730                                vendor=acorn
    17391731                                ;;
    1740                         -sunos*)
     1732                        sunos*)
    17411733                                vendor=sun
    17421734                                ;;
    1743                         -cnk*|-aix*)
     1735                        cnk*|-aix*)
    17441736                                vendor=ibm
    17451737                                ;;
    1746                         -beos*)
     1738                        beos*)
    17471739                                vendor=be
    17481740                                ;;
    1749                         -hpux*)
     1741                        hpux*)
    17501742                                vendor=hp
    17511743                                ;;
    1752                         -mpeix*)
     1744                        mpeix*)
    17531745                                vendor=hp
    17541746                                ;;
    1755                         -hiux*)
     1747                        hiux*)
    17561748                                vendor=hitachi
    17571749                                ;;
    1758                         -unos*)
     1750                        unos*)
    17591751                                vendor=crds
    17601752                                ;;
    1761                         -dgux*)
     1753                        dgux*)
    17621754                                vendor=dg
    17631755                                ;;
    1764                         -luna*)
     1756                        luna*)
    17651757                                vendor=omron
    17661758                                ;;
    1767                         -genix*)
     1759                        genix*)
    17681760                                vendor=ns
    17691761                                ;;
    1770                         -mvs* | -opened*)
     1762                        clix*)
     1763                                vendor=intergraph
     1764                                ;;
     1765                        mvs* | opened*)
    17711766                                vendor=ibm
    17721767                                ;;
    1773                         -os400*)
     1768                        os400*)
    17741769                                vendor=ibm
    17751770                                ;;
    1776                         -ptx*)
     1771                        ptx*)
    17771772                                vendor=sequent
    17781773                                ;;
    1779                         -tpf*)
     1774                        tpf*)
    17801775                                vendor=ibm
    17811776                                ;;
    1782                         -vxsim* | -vxworks* | -windiss*)
     1777                        vxsim* | vxworks* | windiss*)
    17831778                                vendor=wrs
    17841779                                ;;
    1785                         -aux*)
     1780                        aux*)
    17861781                                vendor=apple
    17871782                                ;;
    1788                         -hms*)
     1783                        hms*)
    17891784                                vendor=hitachi
    17901785                                ;;
    1791                         -mpw* | -macos*)
     1786                        mpw* | macos*)
    17921787                                vendor=apple
    17931788                                ;;
    1794                         -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
     1789                        *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
    17951790                                vendor=atari
    17961791                                ;;
    1797                         -vos*)
     1792                        vos*)
    17981793                                vendor=stratus
    17991794                                ;;
    18001795                esac
    1801                 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
     1796                basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
    18021797                ;;
    18031798esac
    18041799
    1805 echo $basic_machine$os
     1800echo "$basic_machine-$os"
    18061801exit
    18071802
    18081803# Local variables:
    1809 # eval: (add-hook 'write-file-hooks 'time-stamp)
     1804# eval: (add-hook 'before-save-hook 'time-stamp)
    18101805# time-stamp-start: "timestamp='"
    18111806# time-stamp-format: "%:y-%02m-%02d"
Note: See TracChangeset for help on using the changeset viewer.