Changeset 48ad47cc in rtems for config.guess


Ignore:
Timestamp:
Mar 1, 2001, 8:46:21 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d5fb958
Parents:
b50b3c8
Message:

2001-02-22 Ralf Corsepius <corsepiu@…>

  • configure.in: Reworked for Canadian Cross support.
  • Makefile.am: Reflect changes to configure.in.
  • config.guess, config.sub: Update from subversions.gnu.org.
  • README.cdn-X: New file.
  • tools/Makefile.am: Remove build, tools from SUBDIRS.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • config.guess

    rb50b3c8 r48ad47cc  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    44#   Free Software Foundation, Inc.
    55
    6 version='2000-10-03'
     6timestamp='2001-02-13'
    77
    88# This file is free software; you can redistribute it and/or modify it
     
    3333#
    3434# The plan is that this can be called by configure scripts if you
    35 # don't specify an explicit system type (host/target name).
    36 #
    37 # Only a few systems have been added to this list; please add others
    38 # (but try to keep the structure clean).
    39 #
     35# don't specify an explicit build system type.
    4036
    4137me=`echo "$0" | sed -e 's,.*/,,'`
     
    4440Usage: $0 [OPTION]
    4541
    46 Output the configuration name of this system.
     42Output the configuration name of the system \`$me' is run on.
    4743
    4844Operation modes:
    49   -h, --help               print this help, then exit
    50   -V, --version            print version number, then exit"
     45  -h, --help         print this help, then exit
     46  -t, --time-stamp   print date of last modification, then exit
     47  -v, --version      print version number, then exit
     48
     49Report bugs and patches to <config-patches@gnu.org>."
     50
     51version="\
     52GNU config.guess ($timestamp)
     53
     54Originally written by Per Bothner.
     55Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
     56Free Software Foundation, Inc.
     57
     58This is free software; see the source for copying conditions.  There is NO
     59warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    5160
    5261help="
     
    5564# Parse command line
    5665while test $# -gt 0 ; do
    57   case "$1" in
    58     --version | --vers* | -V )
     66  case $1 in
     67    --time-stamp | --time* | -t )
     68       echo "$timestamp" ; exit 0 ;;
     69    --version | -v )
    5970       echo "$version" ; exit 0 ;;
    6071    --help | --h* | -h )
     
    6576       break ;;
    6677    -* )
    67        exec >&2
    68        echo "$me: invalid option $1"
    69        echo "$help"
     78       echo "$me: invalid option $1$help" >&2
    7079       exit 1 ;;
    7180    * )
     
    7988fi
    8089
    81 # Use $HOST_CC if defined. $CC may point to a cross-compiler
    82 if test x"$CC_FOR_BUILD" = x; then
    83   if test x"$HOST_CC" != x; then
    84     CC_FOR_BUILD="$HOST_CC"
    85   else
    86     if test x"$CC" != x; then
    87       CC_FOR_BUILD="$CC"
    88     else
    89       CC_FOR_BUILD=cc
    90     fi
    91   fi
    92 fi
    93 
     90
     91dummy=dummy-$$
     92trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
     93
     94# CC_FOR_BUILD -- compiler used by this script.
     95# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
     96# use `HOST_CC' if defined, but it is deprecated.
     97
     98case $CC_FOR_BUILD,$HOST_CC,$CC in
     99 ,,)    echo "int dummy(){}" > $dummy.c
     100        for c in cc gcc c89 ; do
     101          ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
     102          if test $? = 0 ; then
     103             CC_FOR_BUILD="$c"; break
     104          fi
     105        done
     106        rm -f $dummy.c $dummy.o $dummy.rel
     107        if test x"$CC_FOR_BUILD" = x ; then
     108          CC_FOR_BUILD=no_compiler_found
     109        fi
     110        ;;
     111 ,,*)   CC_FOR_BUILD=$CC ;;
     112 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
     113esac
    94114
    95115# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
     
    101121UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
    102122UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
    103 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
     123UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    104124UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    105 
    106 dummy=dummy-$$
    107 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
    108125
    109126# Note: order is significant - the case branches are not exclusive.
     
    130147            *) machine=${UNAME_MACHINE}-unknown ;;
    131148        esac
    132         # The Operating System including object format.
    133         if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
    134                 | grep __ELF__ >/dev/null
    135         then
    136             # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
    137             # Return netbsd for either.  FIX?
    138             os=netbsd
    139         else
    140             os=netbsdelf
    141         fi
     149        # The Operating System including object format, if it has switched
     150        # to ELF recently, or will in the future.
     151        case "${UNAME_MACHINE}" in
     152            i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
     153                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
     154                        | grep __ELF__ >/dev/null
     155                then
     156                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
     157                    # Return netbsd for either.  FIX?
     158                    os=netbsd
     159                else
     160                    os=netbsdelf
     161                fi
     162                ;;
     163            *)
     164                os=netbsd
     165                ;;
     166        esac
    142167        # The OS release
    143168        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     
    248273        echo arm-acorn-riscix${UNAME_RELEASE}
    249274        exit 0;;
    250     SR2?01:HI-UX/MPP:*:*)
     275    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    251276        echo hppa1.1-hitachi-hiuxmpp
    252277        exit 0;;
     
    438463        echo i386-ibm-aix
    439464        exit 0 ;;
     465    ia64:AIX:*:*)
     466        if [ -x /usr/bin/oslevel ] ; then
     467                IBM_REV=`/usr/bin/oslevel`
     468        else
     469                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
     470        fi
     471        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
     472        exit 0 ;;
    440473    *:AIX:2:3)
    441474        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
     
    460493        fi
    461494        exit 0 ;;
    462     *:AIX:*:4)
     495    *:AIX:*:[45])
    463496        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
    464         if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
     497        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
    465498                IBM_ARCH=rs6000
    466499        else
     
    470503                IBM_REV=`/usr/bin/oslevel`
    471504        else
    472                 IBM_REV=4.${UNAME_RELEASE}
     505                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    473506        fi
    474507        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
     
    496529        exit 0 ;;
    497530    9000/[34678]??:HP-UX:*:*)
     531        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    498532        case "${UNAME_MACHINE}" in
    499533            9000/31? )            HP_ARCH=m68000 ;;
    500534            9000/[34]?? )         HP_ARCH=m68k ;;
    501535            9000/[678][0-9][0-9])
     536              case "${HPUX_REV}" in
     537                11.[0-9][0-9])
     538                  if [ -x /usr/bin/getconf ]; then
     539                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
     540                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
     541                    case "${sc_cpu_version}" in
     542                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
     543                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
     544                      532)                      # CPU_PA_RISC2_0
     545                        case "${sc_kernel_bits}" in
     546                          32) HP_ARCH="hppa2.0n" ;;
     547                          64) HP_ARCH="hppa2.0w" ;;
     548                        esac ;;
     549                    esac
     550                  fi ;;
     551              esac
     552              if [ "${HP_ARCH}" = "" ]; then
    502553              sed 's/^              //' << EOF >$dummy.c
    503554
     
    534585EOF
    535586        (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
     587        if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
    536588        rm -f $dummy.c $dummy
     589        fi ;;
    537590        esac
     591        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
     592        exit 0 ;;
     593    ia64:HP-UX:*:*)
    538594        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    539         echo ${HP_ARCH}-hp-hpux${HPUX_REV}
     595        echo ia64-hp-hpux${HPUX_REV}
    540596        exit 0 ;;
    541597    3050*:HI-UX:*:*)
     
    629685        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    630686        exit 0 ;;
     687    CRAY*T3D:*:*:*)
     688        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     689        exit 0 ;;
    631690    CRAY*T3E:*:*:*)
    632         echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     691        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    633692        exit 0 ;;
    634693    CRAY*SV1:*:*:*)
     
    638697        echo cray2-cray-unicos
    639698        exit 0 ;;
    640     F300:UNIX_System_V:*:*)
     699    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
     700        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    641701        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    642702        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    643         echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    644         exit 0 ;;
    645     F301:UNIX_System_V:*:*)
    646        echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
    647        exit 0 ;;
     703        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     704        exit 0 ;;
    648705    hp300:OpenBSD:*:*)
    649706        echo m68k-unknown-openbsd${UNAME_RELEASE}
     
    694751        echo ${UNAME_MACHINE}-pc-minix
    695752        exit 0 ;;
     753    ia64:Linux:*:*)
     754        echo ${UNAME_MACHINE}-unknown-linux
     755        exit 0 ;;
     756    s390:Linux:*:* | s390x:Linux:*:*)
     757        echo ${UNAME_MACHINE}-ibm-linux
     758        exit 0 ;;
     759    mips:Linux:*:*)
     760        cat >$dummy.c <<EOF
     761#ifdef __cplusplus
     762#include <stdio.h>  /* for printf() prototype */
     763int main (int argc, char *argv[]) {
     764#else
     765int main (argc, argv) int argc; char *argv[]; {
     766#endif
     767#ifdef __MIPSEB__
     768  printf ("%s-unknown-linux-gnu\n", argv[1]);
     769#endif
     770#ifdef __MIPSEL__
     771  printf ("%sel-unknown-linux-gnu\n", argv[1]);
     772#endif
     773  return 0;
     774}
     775EOF
     776        $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
     777        rm -f $dummy.c $dummy
     778        ;;
     779    x86_64:Linux:*:*)
     780        echo x86_64-unknown-linux-gnu
     781        exit 0 ;;
     782    parisc:Linux:*:* | hppa:Linux:*:*)
     783        # Look for CPU level
     784        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
     785          PA7*) echo hppa1.1-unknown-linux-gnu ;;
     786          PA8*) echo hppa2.0-unknown-linux-gnu ;;
     787          *)    echo hppa-unknown-linux-gnu ;;
     788        esac
     789        exit 0 ;;
     790    parisc64:Linux:*:* | hppa64:Linux:*:*)
     791        echo hppa64-unknown-linux-gnu
     792        exit 0 ;;
     793    sh*:Linux:*:*)
     794        echo ${UNAME_MACHINE}-unknown-linux-gnu
     795        exit 0 ;;
    696796    *:Linux:*:*)
    697 
    698797        # The BFD linker knows what the default object file format is, so
    699798        # first see if it will tell us. cd to the root directory to prevent
     
    706805                                    p'`
    707806        case "$ld_supported_emulations" in
    708           *ia64)
    709                 echo "${UNAME_MACHINE}-unknown-linux"
    710                 exit 0
    711                 ;;
    712807          i?86linux)
    713808                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
     
    723818          sparclinux)
    724819                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
     820                exit 0
     821                ;;
     822          elf32_sparc)
     823                echo "${UNAME_MACHINE}-unknown-linux-gnu"
    725824                exit 0
    726825                ;;
     
    771870                rm -f $dummy.c $dummy
    772871                echo powerpc-unknown-linux-gnu${LIBC}
    773                 exit 0
    774                 ;;
    775           shelf_linux)
    776                 echo "${UNAME_MACHINE}-unknown-linux-gnu"
    777872                exit 0
    778873                ;;
     
    809904                if test "$?" = 0 ; then
    810905                        case `./$dummy` in
    811                         0-0)
    812                                 UNAME_MACHINE="alpha"
    813                                 ;;
    814                         1-0)
    815                                 UNAME_MACHINE="alphaev5"
    816                                 ;;
    817                         1-1)
    818                                 UNAME_MACHINE="alphaev56"
    819                                 ;;
    820                         1-101)
    821                                 UNAME_MACHINE="alphapca56"
    822                                 ;;
    823                         2-303)
    824                                 UNAME_MACHINE="alphaev6"
    825                                 ;;
    826                         2-307)
    827                                 UNAME_MACHINE="alphaev67"
    828                                 ;;
     906                        0-0)    UNAME_MACHINE="alpha" ;;
     907                        1-0)    UNAME_MACHINE="alphaev5" ;;
     908                        1-1)    UNAME_MACHINE="alphaev56" ;;
     909                        1-101)  UNAME_MACHINE="alphapca56" ;;
     910                        2-303)  UNAME_MACHINE="alphaev6" ;;
     911                        2-307)  UNAME_MACHINE="alphaev67" ;;
    829912                        esac
    830913
     
    837920                rm -f $dummy.s $dummy
    838921                echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
    839         elif test "${UNAME_MACHINE}" = "mips" ; then
    840           cat >$dummy.c <<EOF
    841 #ifdef __cplusplus
    842 #include <stdio.h>  /* for printf() prototype */
    843         int main (int argc, char *argv[]) {
    844 #else
    845         int main (argc, argv) int argc; char *argv[]; {
    846 #endif
    847 #ifdef __MIPSEB__
    848   printf ("%s-unknown-linux-gnu\n", argv[1]);
    849 #endif
    850 #ifdef __MIPSEL__
    851   printf ("%sel-unknown-linux-gnu\n", argv[1]);
    852 #endif
    853   return 0;
    854 }
    855 EOF
    856           $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
    857           rm -f $dummy.c $dummy
    858         elif test "${UNAME_MACHINE}" = "s390"; then
    859           echo s390-ibm-linux && exit 0
    860         elif test "${UNAME_MACHINE}" = "x86_64"; then
    861           echo x86_64-unknown-linux-gnu && exit 0
    862922        else
    863923          # Either a pre-BFD a.out linker (linux-gnuoldld)
     
    9821042    M68*:*:R3V[567]*:*)
    9831043        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    984     3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
     1044    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
    9851045        OS_REL=''
    9861046        test -r /etc/.relid \
     
    10051065        echo sparc-unknown-lynxos${UNAME_RELEASE}
    10061066        exit 0 ;;
    1007     rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
     1067    rs6000:LynxOS:2.*:*)
    10081068        echo rs6000-unknown-lynxos${UNAME_RELEASE}
     1069        exit 0 ;;
     1070    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
     1071        echo powerpc-unknown-lynxos${UNAME_RELEASE}
    10091072        exit 0 ;;
    10101073    SM[BE]S:UNIX_SV:*:*)
     
    10861149    NSR-[KW]:NONSTOP_KERNEL:*:*)
    10871150        echo nsr-tandem-nsk${UNAME_RELEASE}
     1151        exit 0 ;;
     1152    *:NonStop-UX:*:*)
     1153        echo mips-compaq-nonstopux
    10881154        exit 0 ;;
    10891155    BS2000:POSIX*:*:*)
     
    11031169        fi
    11041170        echo ${UNAME_MACHINE}-unknown-plan9
     1171        exit 0 ;;
     1172    i?86:OS/2:*:*)
     1173        # If we were able to find `uname', then EMX Unix compatibility
     1174        # is probably installed.
     1175        echo ${UNAME_MACHINE}-pc-os2-emx
     1176        exit 0 ;;
     1177    *:TOPS-10:*:*)
     1178        echo pdp10-unknown-tops10
     1179        exit 0 ;;
     1180    *:TENEX:*:*)
     1181        echo pdp10-unknown-tenex
     1182        exit 0 ;;
     1183    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
     1184        echo pdp10-dec-tops20
     1185        exit 0 ;;
     1186    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
     1187        echo pdp10-xkl-tops20
     1188        exit 0 ;;
     1189    *:TOPS-20:*:*)
     1190        echo pdp10-unknown-tops20
     1191        exit 0 ;;
     1192    *:ITS:*:*)
     1193        echo pdp10-unknown-its
    11051194        exit 0 ;;
    11061195esac
     
    11951284
    11961285#if defined (vax)
    1197 #if !defined (ultrix)
    1198   printf ("vax-dec-bsd\n"); exit (0);
    1199 #else
    1200   printf ("vax-dec-ultrix\n"); exit (0);
    1201 #endif
     1286# if !defined (ultrix)
     1287#  include <sys/param.h>
     1288#  if defined (BSD)
     1289#   if BSD == 43
     1290      printf ("vax-dec-bsd4.3\n"); exit (0);
     1291#   else
     1292#    if BSD == 199006
     1293      printf ("vax-dec-bsd4.3reno\n"); exit (0);
     1294#    else
     1295      printf ("vax-dec-bsd\n"); exit (0);
     1296#    endif
     1297#   endif
     1298#  else
     1299    printf ("vax-dec-bsd\n"); exit (0);
     1300#  endif
     1301# else
     1302    printf ("vax-dec-ultrix\n"); exit (0);
     1303# endif
    12021304#endif
    12031305
     
    12461348$0: unable to guess system type
    12471349
    1248 The $version version of this script cannot recognize your system type.
    1249 Please download the most up to date version of the config scripts:
     1350This script, last modified $timestamp, has failed to recognize
     1351the operating system you are using. It is advised that you
     1352download the most up to date version of the config scripts from
    12501353
    12511354    ftp://ftp.gnu.org/pub/gnu/config/
     
    12561359information to handle your system.
    12571360
    1258 config.guess version = $version
     1361config.guess timestamp = $timestamp
    12591362
    12601363uname -m = `(uname -m) 2>/dev/null || echo unknown`
     
    12831386# Local variables:
    12841387# eval: (add-hook 'write-file-hooks 'time-stamp)
    1285 # time-stamp-start: "version='"
     1388# time-stamp-start: "timestamp='"
    12861389# time-stamp-format: "%:y-%02m-%02d"
    12871390# time-stamp-end: "'"
Note: See TracChangeset for help on using the changeset viewer.