Changeset 06ef76e3 in rtems for config.guess


Ignore:
Timestamp:
Nov 12, 2015, 10:30:25 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
78cac9b
Parents:
459ebc8
Message:

Update config.guess and config.sub

Update via:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • config.guess

    r459ebc8 r06ef76e3  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright 1992-2013 Free Software Foundation, Inc.
    4 
    5 timestamp='2013-06-10'
     3#   Copyright 1992-2015 Free Software Foundation, Inc.
     4
     5timestamp='2015-10-21'
    66
    77# This file is free software; you can redistribute it and/or modify it
     
    2525# of the GNU General Public License, version 3 ("GPLv3").
    2626#
    27 # Originally written by Per Bothner.
     27# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
    2828#
    2929# You can get the latest version of this script from:
    3030# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
    3131#
    32 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
     32# Please send patches to <config-patches@gnu.org>.
    3333
    3434
     
    5151
    5252Originally written by Per Bothner.
    53 Copyright 1992-2013 Free Software Foundation, Inc.
     53Copyright 1992-2015 Free Software Foundation, Inc.
    5454
    5555This is free software; see the source for copying conditions.  There is NO
     
    150150        #endif
    151151        EOF
    152         eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
     152        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
    153153        ;;
    154154esac
     
    169169        # portion of the name.  We always set it to "unknown".
    170170        sysctl="sysctl -n hw.machine_arch"
    171         UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
    172             /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
     171        UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
     172            /sbin/$sysctl 2>/dev/null || \
     173            /usr/sbin/$sysctl 2>/dev/null || \
     174            echo unknown)`
    173175        case "${UNAME_MACHINE_ARCH}" in
    174176            armeb) machine=armeb-unknown ;;
     
    177179            sh3eb) machine=sh-unknown ;;
    178180            sh5el) machine=sh5le-unknown ;;
     181            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
     185                ;;
    179186            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
    180187        esac
     
    182189        # to ELF recently, or will in the future.
    183190        case "${UNAME_MACHINE_ARCH}" in
    184             arm*|i386|m68k|ns32k|sh3*|sparc|vax)
     191            arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
    185192                eval $set_cc_for_build
    186193                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
     
    198205                ;;
    199206        esac
     207        # Determine ABI tags.
     208        case "${UNAME_MACHINE_ARCH}" in
     209            earm*)
     210                expr='s/^earmv[0-9]/-eabi/;s/eb$//'
     211                abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
     212                ;;
     213        esac
    200214        # The OS release
    201215        # Debian GNU/NetBSD machines have a different userland, and
     
    208222                ;;
    209223            *)
    210                 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     224                release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
    211225                ;;
    212226        esac
     
    214228        # contains redundant information, the shorter form:
    215229        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    216         echo "${machine}-${os}${release}"
     230        echo "${machine}-${os}${release}${abi}"
    217231        exit ;;
    218232    *:Bitrig:*:*)
     
    235249    *:MirBSD:*:*)
    236250        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
     251        exit ;;
     252    *:Sortix:*:*)
     253        echo ${UNAME_MACHINE}-unknown-sortix
    237254        exit ;;
    238255    alpha:OSF1:*:*)
     
    580597                IBM_ARCH=powerpc
    581598        fi
    582         if [ -x /usr/bin/oslevel ] ; then
    583                 IBM_REV=`/usr/bin/oslevel`
     599        if [ -x /usr/bin/lslpp ] ; then
     600                IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
     601                           awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
    584602        else
    585603                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
     
    827845        echo ${UNAME_MACHINE}-pc-mingw32
    828846        exit ;;
    829     i*:MSYS*:*)
     847    *:MSYS*:*)
    830848        echo ${UNAME_MACHINE}-pc-msys
    831849        exit ;;
     
    933951        echo ${UNAME_MACHINE}-axis-linux-${LIBC}
    934952        exit ;;
     953    e2k:Linux:*:*)
     954        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     955        exit ;;
    935956    frv:Linux:*:*)
    936957        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     
    943964        exit ;;
    944965    ia64:Linux:*:*)
     966        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     967        exit ;;
     968    k1om:Linux:*:*)
    945969        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    946970        exit ;;
     
    970994        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
    971995        ;;
    972     or1k:Linux:*:*)
    973         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    974         exit ;;
    975     or32:Linux:*:*)
     996    openrisc*:Linux:*:*)
     997        echo or1k-unknown-linux-${LIBC}
     998        exit ;;
     999    or32:Linux:*:* | or1k*:Linux:*:*)
    9761000        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    9771001        exit ;;
     
    10211045        exit ;;
    10221046    x86_64:Linux:*:*)
    1023         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     1047        echo ${UNAME_MACHINE}-pc-linux-${LIBC}
    10241048        exit ;;
    10251049    xtensa*:Linux:*:*)
     
    11001124        # the processor, so we play safe by assuming i586.
    11011125        # Note: whatever this is, it MUST be the same as what config.sub
    1102         # prints for the "djgpp" host, or else GDB configury will decide that
     1126        # prints for the "djgpp" host, or else GDB configure will decide that
    11031127        # this is a cross-build.
    11041128        echo i586-pc-msdosdjgpp
     
    12611285            UNAME_PROCESSOR=powerpc
    12621286        fi
    1263         if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
    1264             if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
    1265                 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
    1266                 grep IS_64BIT_ARCH >/dev/null
    1267             then
    1268                 case $UNAME_PROCESSOR in
    1269                     i386) UNAME_PROCESSOR=x86_64 ;;
    1270                     powerpc) UNAME_PROCESSOR=powerpc64 ;;
    1271                 esac
     1287        if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
     1288            if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     1289                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
     1292                then
     1293                    case $UNAME_PROCESSOR in
     1294                        i386) UNAME_PROCESSOR=x86_64 ;;
     1295                        powerpc) UNAME_PROCESSOR=powerpc64 ;;
     1296                    esac
     1297                fi
    12721298            fi
     1299        elif test "$UNAME_PROCESSOR" = i386 ; then
     1300            # Avoid executing cc on OS X 10.9, as it ships with a stub
     1301            # that puts up a graphical alert prompting to install
     1302            # developer tools.  Any system running Mac OS X 10.7 or
     1303            # later (Darwin 11 and later) is required to have a 64-bit
     1304            # processor. This is not true of the ARM version of Darwin
     1305            # that Apple uses in portable devices.
     1306            UNAME_PROCESSOR=x86_64
    12731307        fi
    12741308        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
     
    13621396esac
    13631397
    1364 eval $set_cc_for_build
    1365 cat >$dummy.c <<EOF
    1366 #ifdef _SEQUENT_
    1367 # include <sys/types.h>
    1368 # include <sys/utsname.h>
    1369 #endif
    1370 main ()
    1371 {
    1372 #if defined (sony)
    1373 #if defined (MIPSEB)
    1374   /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
    1375      I don't know....  */
    1376   printf ("mips-sony-bsd\n"); exit (0);
    1377 #else
    1378 #include <sys/param.h>
    1379   printf ("m68k-sony-newsos%s\n",
    1380 #ifdef NEWSOS4
    1381         "4"
    1382 #else
    1383         ""
    1384 #endif
    1385         ); exit (0);
    1386 #endif
    1387 #endif
    1388 
    1389 #if defined (__arm) && defined (__acorn) && defined (__unix)
    1390   printf ("arm-acorn-riscix\n"); exit (0);
    1391 #endif
    1392 
    1393 #if defined (hp300) && !defined (hpux)
    1394   printf ("m68k-hp-bsd\n"); exit (0);
    1395 #endif
    1396 
    1397 #if defined (NeXT)
    1398 #if !defined (__ARCHITECTURE__)
    1399 #define __ARCHITECTURE__ "m68k"
    1400 #endif
    1401   int version;
    1402   version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
    1403   if (version < 4)
    1404     printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
    1405   else
    1406     printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
    1407   exit (0);
    1408 #endif
    1409 
    1410 #if defined (MULTIMAX) || defined (n16)
    1411 #if defined (UMAXV)
    1412   printf ("ns32k-encore-sysv\n"); exit (0);
    1413 #else
    1414 #if defined (CMU)
    1415   printf ("ns32k-encore-mach\n"); exit (0);
    1416 #else
    1417   printf ("ns32k-encore-bsd\n"); exit (0);
    1418 #endif
    1419 #endif
    1420 #endif
    1421 
    1422 #if defined (__386BSD__)
    1423   printf ("i386-pc-bsd\n"); exit (0);
    1424 #endif
    1425 
    1426 #if defined (sequent)
    1427 #if defined (i386)
    1428   printf ("i386-sequent-dynix\n"); exit (0);
    1429 #endif
    1430 #if defined (ns32000)
    1431   printf ("ns32k-sequent-dynix\n"); exit (0);
    1432 #endif
    1433 #endif
    1434 
    1435 #if defined (_SEQUENT_)
    1436     struct utsname un;
    1437 
    1438     uname(&un);
    1439 
    1440     if (strncmp(un.version, "V2", 2) == 0) {
    1441         printf ("i386-sequent-ptx2\n"); exit (0);
    1442     }
    1443     if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
    1444         printf ("i386-sequent-ptx1\n"); exit (0);
    1445     }
    1446     printf ("i386-sequent-ptx\n"); exit (0);
    1447 
    1448 #endif
    1449 
    1450 #if defined (vax)
    1451 # if !defined (ultrix)
    1452 #  include <sys/param.h>
    1453 #  if defined (BSD)
    1454 #   if BSD == 43
    1455       printf ("vax-dec-bsd4.3\n"); exit (0);
    1456 #   else
    1457 #    if BSD == 199006
    1458       printf ("vax-dec-bsd4.3reno\n"); exit (0);
    1459 #    else
    1460       printf ("vax-dec-bsd\n"); exit (0);
    1461 #    endif
    1462 #   endif
    1463 #  else
    1464     printf ("vax-dec-bsd\n"); exit (0);
    1465 #  endif
    1466 # else
    1467     printf ("vax-dec-ultrix\n"); exit (0);
    1468 # endif
    1469 #endif
    1470 
    1471 #if defined (alliant) && defined (i860)
    1472   printf ("i860-alliant-bsd\n"); exit (0);
    1473 #endif
    1474 
    1475   exit (1);
    1476 }
    1477 EOF
    1478 
    1479 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
    1480         { echo "$SYSTEM_NAME"; exit; }
    1481 
    1482 # Apollos put the system type in the environment.
    1483 
    1484 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
    1485 
    1486 # Convex versions that predate uname can use getsysinfo(1)
    1487 
    1488 if [ -x /usr/convex/getsysinfo ]
    1489 then
    1490     case `getsysinfo -f cpu_type` in
    1491     c1*)
    1492         echo c1-convex-bsd
    1493         exit ;;
    1494     c2*)
    1495         if getsysinfo -f scalar_acc
    1496         then echo c32-convex-bsd
    1497         else echo c2-convex-bsd
    1498         fi
    1499         exit ;;
    1500     c34*)
    1501         echo c34-convex-bsd
    1502         exit ;;
    1503     c38*)
    1504         echo c38-convex-bsd
    1505         exit ;;
    1506     c4*)
    1507         echo c4-convex-bsd
    1508         exit ;;
    1509     esac
    1510 fi
    1511 
    15121398cat >&2 <<EOF
    15131399$0: unable to guess system type
Note: See TracChangeset for help on using the changeset viewer.