Commit 8b1c4828b731046a08b6a1073474f36499f5f546
1 parent
7b6ed928
Update autoconf/libtool files
Showing
7 changed files
with
2030 additions
and
1768 deletions
README-maintainer
| ... | ... | @@ -135,7 +135,9 @@ RELEASE PREPARATION |
| 135 | 135 | |
| 136 | 136 | * `config.guess`, `config.sub`, `ltmain.sh`, and the `m4` directory: |
| 137 | 137 | these were created by running `libtoolize -c`. To update, run |
| 138 | - `libtoolize -f -c` or remove the files and rerun `libtoolize`. | |
| 138 | + `libtoolize -f -c` or remove the files and rerun `libtoolize`. For | |
| 139 | + `config.guess` and `config.sub`, search for "latest" in the files, | |
| 140 | + and follow directions for updating them. | |
| 139 | 141 | |
| 140 | 142 | * Other files copied as indicated: |
| 141 | 143 | ``` | ... | ... |
autofiles.sums
| ... | ... | @@ -3,7 +3,7 @@ d3f9ee6f6f0846888d9a10fd3dad2e4b1258be84205426cf04d7cef02d61dad7 aclocal.m4 |
| 3 | 3 | 2e4cd495837be1b8454a4d8aef541b000988634be89d9c05a9cf5de67dffef5e libqpdf/qpdf/qpdf-config.h.in |
| 4 | 4 | 5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4 |
| 5 | 5 | 35bc5c645dc42d47f2daeea06f8f3e767c8a1aee6a35eb2b4854fd2ce66c3413 m4/ax_random_device.m4 |
| 6 | -37f8897d5f68d7d484e5457832a8f190ddb7507fa2a467cb7ee2be40a4364643 m4/libtool.m4 | |
| 6 | +6a1e4f8aa2902d7993300660c43e6ee479b4b6781ed7d5ef9c9f9f1cc46623b7 m4/libtool.m4 | |
| 7 | 7 | e77ebba8361b36f14b4d0927173a034b98c5d05049697a9ded84d85eb99a7990 m4/ltoptions.m4 |
| 8 | 8 | 5a6735cda60e0ba0d1b706c0ef648f5d096298da46daefd9cdecdb6a0f4584d3 m4/ltsugar.m4 |
| 9 | 9 | a27b754709de61575197bf5a980696c98ae49da3f92f0de8ee7f42dd543b7465 m4/ltversion.m4 | ... | ... |
config.guess
100755 → 100644
| 1 | 1 | #! /bin/sh |
| 2 | 2 | # Attempt to guess a canonical system name. |
| 3 | -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
| 4 | -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | |
| 5 | -# 2011, 2012 Free Software Foundation, Inc. | |
| 3 | +# Copyright 1992-2020 Free Software Foundation, Inc. | |
| 6 | 4 | |
| 7 | -timestamp='2012-02-10' | |
| 5 | +timestamp='2020-01-01' | |
| 8 | 6 | |
| 9 | 7 | # This file is free software; you can redistribute it and/or modify it |
| 10 | 8 | # under the terms of the GNU General Public License as published by |
| 11 | -# the Free Software Foundation; either version 2 of the License, or | |
| 9 | +# the Free Software Foundation; either version 3 of the License, or | |
| 12 | 10 | # (at your option) any later version. |
| 13 | 11 | # |
| 14 | 12 | # This program is distributed in the hope that it will be useful, but |
| ... | ... | @@ -17,24 +15,22 @@ timestamp='2012-02-10' |
| 17 | 15 | # General Public License for more details. |
| 18 | 16 | # |
| 19 | 17 | # You should have received a copy of the GNU General Public License |
| 20 | -# 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/>. | |
| 21 | 19 | # |
| 22 | 20 | # As a special exception to the GNU General Public License, if you |
| 23 | 21 | # distribute this file as part of a program that contains a |
| 24 | 22 | # configuration script generated by Autoconf, you may include it under |
| 25 | -# the same distribution terms that you use for the rest of that program. | |
| 26 | - | |
| 27 | - | |
| 28 | -# Originally written by Per Bothner. Please send patches (context | |
| 29 | -# diff format) to <config-patches@gnu.org> and include a ChangeLog | |
| 30 | -# entry. | |
| 23 | +# the same distribution terms that you use for the rest of that | |
| 24 | +# program. This Exception is an additional permission under section 7 | |
| 25 | +# of the GNU General Public License, version 3 ("GPLv3"). | |
| 31 | 26 | # |
| 32 | -# This script attempts to guess a canonical system name similar to | |
| 33 | -# config.sub. If it succeeds, it prints the system name on stdout, and | |
| 34 | -# exits with 0. Otherwise, it exits with 1. | |
| 27 | +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. | |
| 35 | 28 | # |
| 36 | 29 | # You can get the latest version of this script from: |
| 37 | -# 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 | |
| 31 | +# | |
| 32 | +# Please send patches to <config-patches@gnu.org>. | |
| 33 | + | |
| 38 | 34 | |
| 39 | 35 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 40 | 36 | |
| ... | ... | @@ -43,7 +39,7 @@ Usage: $0 [OPTION] |
| 43 | 39 | |
| 44 | 40 | Output the configuration name of the system \`$me' is run on. |
| 45 | 41 | |
| 46 | -Operation modes: | |
| 42 | +Options: | |
| 47 | 43 | -h, --help print this help, then exit |
| 48 | 44 | -t, --time-stamp print date of last modification, then exit |
| 49 | 45 | -v, --version print version number, then exit |
| ... | ... | @@ -54,9 +50,7 @@ version="\ |
| 54 | 50 | GNU config.guess ($timestamp) |
| 55 | 51 | |
| 56 | 52 | Originally written by Per Bothner. |
| 57 | -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | |
| 58 | -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | |
| 59 | -Free Software Foundation, Inc. | |
| 53 | +Copyright 1992-2020 Free Software Foundation, Inc. | |
| 60 | 54 | |
| 61 | 55 | This is free software; see the source for copying conditions. There is NO |
| 62 | 56 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| ... | ... | @@ -90,8 +84,6 @@ if test $# != 0; then |
| 90 | 84 | exit 1 |
| 91 | 85 | fi |
| 92 | 86 | |
| 93 | -trap 'exit 1' 1 2 15 | |
| 94 | - | |
| 95 | 87 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
| 96 | 88 | # compiler to aid in system detection is discouraged as it requires |
| 97 | 89 | # temporary files to be created and, as you can see below, it is a |
| ... | ... | @@ -102,34 +94,40 @@ trap 'exit 1' 1 2 15 |
| 102 | 94 | |
| 103 | 95 | # Portable tmp directory creation inspired by the Autoconf team. |
| 104 | 96 | |
| 105 | -set_cc_for_build=' | |
| 106 | -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; | |
| 107 | -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; | |
| 108 | -: ${TMPDIR=/tmp} ; | |
| 109 | - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
| 110 | - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || | |
| 111 | - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
| 112 | - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | |
| 113 | -dummy=$tmp/dummy ; | |
| 114 | -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | |
| 115 | -case $CC_FOR_BUILD,$HOST_CC,$CC in | |
| 116 | - ,,) echo "int x;" > $dummy.c ; | |
| 117 | - for c in cc gcc c89 c99 ; do | |
| 118 | - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | |
| 119 | - CC_FOR_BUILD="$c"; break ; | |
| 120 | - fi ; | |
| 121 | - done ; | |
| 122 | - if test x"$CC_FOR_BUILD" = x ; then | |
| 123 | - CC_FOR_BUILD=no_compiler_found ; | |
| 124 | - fi | |
| 125 | - ;; | |
| 126 | - ,,*) CC_FOR_BUILD=$CC ;; | |
| 127 | - ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
| 128 | -esac ; set_cc_for_build= ;' | |
| 97 | +tmp= | |
| 98 | +# shellcheck disable=SC2172 | |
| 99 | +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 | |
| 100 | + | |
| 101 | +set_cc_for_build() { | |
| 102 | + # prevent multiple calls if $tmp is already set | |
| 103 | + test "$tmp" && return 0 | |
| 104 | + : "${TMPDIR=/tmp}" | |
| 105 | + # shellcheck disable=SC2039 | |
| 106 | + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
| 107 | + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || | |
| 108 | + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
| 109 | + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } | |
| 110 | + dummy=$tmp/dummy | |
| 111 | + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in | |
| 112 | + ,,) echo "int x;" > "$dummy.c" | |
| 113 | + for driver in cc gcc c89 c99 ; do | |
| 114 | + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then | |
| 115 | + CC_FOR_BUILD="$driver" | |
| 116 | + break | |
| 117 | + fi | |
| 118 | + done | |
| 119 | + if test x"$CC_FOR_BUILD" = x ; then | |
| 120 | + CC_FOR_BUILD=no_compiler_found | |
| 121 | + fi | |
| 122 | + ;; | |
| 123 | + ,,*) CC_FOR_BUILD=$CC ;; | |
| 124 | + ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
| 125 | + esac | |
| 126 | +} | |
| 129 | 127 | |
| 130 | 128 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
| 131 | 129 | # (ghazi@noc.rutgers.edu 1994-08-24) |
| 132 | -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | |
| 130 | +if test -f /.attbin/uname ; then | |
| 133 | 131 | PATH=$PATH:/.attbin ; export PATH |
| 134 | 132 | fi |
| 135 | 133 | |
| ... | ... | @@ -138,9 +136,37 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
| 138 | 136 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
| 139 | 137 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
| 140 | 138 | |
| 139 | +case "$UNAME_SYSTEM" in | |
| 140 | +Linux|GNU|GNU/*) | |
| 141 | + # If the system lacks a compiler, then just pick glibc. | |
| 142 | + # We could probably try harder. | |
| 143 | + LIBC=gnu | |
| 144 | + | |
| 145 | + set_cc_for_build | |
| 146 | + cat <<-EOF > "$dummy.c" | |
| 147 | + #include <features.h> | |
| 148 | + #if defined(__UCLIBC__) | |
| 149 | + LIBC=uclibc | |
| 150 | + #elif defined(__dietlibc__) | |
| 151 | + LIBC=dietlibc | |
| 152 | + #else | |
| 153 | + LIBC=gnu | |
| 154 | + #endif | |
| 155 | + EOF | |
| 156 | + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" | |
| 157 | + | |
| 158 | + # If ldd exists, use it to detect musl libc. | |
| 159 | + if command -v ldd >/dev/null && \ | |
| 160 | + ldd --version 2>&1 | grep -q ^musl | |
| 161 | + then | |
| 162 | + LIBC=musl | |
| 163 | + fi | |
| 164 | + ;; | |
| 165 | +esac | |
| 166 | + | |
| 141 | 167 | # Note: order is significant - the case branches are not exclusive. |
| 142 | 168 | |
| 143 | -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |
| 169 | +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in | |
| 144 | 170 | *:NetBSD:*:*) |
| 145 | 171 | # NetBSD (nbsd) targets should (where applicable) match one or |
| 146 | 172 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
| ... | ... | @@ -153,21 +179,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 153 | 179 | # Note: NetBSD doesn't particularly care about the vendor |
| 154 | 180 | # portion of the name. We always set it to "unknown". |
| 155 | 181 | sysctl="sysctl -n hw.machine_arch" |
| 156 | - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | |
| 157 | - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | |
| 158 | - case "${UNAME_MACHINE_ARCH}" in | |
| 182 | + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ | |
| 183 | + "/sbin/$sysctl" 2>/dev/null || \ | |
| 184 | + "/usr/sbin/$sysctl" 2>/dev/null || \ | |
| 185 | + echo unknown)` | |
| 186 | + case "$UNAME_MACHINE_ARCH" in | |
| 159 | 187 | armeb) machine=armeb-unknown ;; |
| 160 | 188 | arm*) machine=arm-unknown ;; |
| 161 | 189 | sh3el) machine=shl-unknown ;; |
| 162 | 190 | sh3eb) machine=sh-unknown ;; |
| 163 | 191 | sh5el) machine=sh5le-unknown ;; |
| 164 | - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | |
| 192 | + earmv*) | |
| 193 | + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` | |
| 194 | + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` | |
| 195 | + machine="${arch}${endian}"-unknown | |
| 196 | + ;; | |
| 197 | + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | |
| 165 | 198 | esac |
| 166 | 199 | # The Operating System including object format, if it has switched |
| 167 | - # to ELF recently, or will in the future. | |
| 168 | - case "${UNAME_MACHINE_ARCH}" in | |
| 200 | + # to ELF recently (or will in the future) and ABI. | |
| 201 | + case "$UNAME_MACHINE_ARCH" in | |
| 202 | + earm*) | |
| 203 | + os=netbsdelf | |
| 204 | + ;; | |
| 169 | 205 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
| 170 | - eval $set_cc_for_build | |
| 206 | + set_cc_for_build | |
| 171 | 207 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 172 | 208 | | grep -q __ELF__ |
| 173 | 209 | then |
| ... | ... | @@ -182,39 +218,72 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 182 | 218 | os=netbsd |
| 183 | 219 | ;; |
| 184 | 220 | esac |
| 221 | + # Determine ABI tags. | |
| 222 | + case "$UNAME_MACHINE_ARCH" in | |
| 223 | + earm*) | |
| 224 | + expr='s/^earmv[0-9]/-eabi/;s/eb$//' | |
| 225 | + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` | |
| 226 | + ;; | |
| 227 | + esac | |
| 185 | 228 | # The OS release |
| 186 | 229 | # Debian GNU/NetBSD machines have a different userland, and |
| 187 | 230 | # thus, need a distinct triplet. However, they do not need |
| 188 | 231 | # kernel version information, so it can be replaced with a |
| 189 | 232 | # suitable tag, in the style of linux-gnu. |
| 190 | - case "${UNAME_VERSION}" in | |
| 233 | + case "$UNAME_VERSION" in | |
| 191 | 234 | Debian*) |
| 192 | 235 | release='-gnu' |
| 193 | 236 | ;; |
| 194 | 237 | *) |
| 195 | - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | |
| 238 | + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` | |
| 196 | 239 | ;; |
| 197 | 240 | esac |
| 198 | 241 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
| 199 | 242 | # contains redundant information, the shorter form: |
| 200 | 243 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
| 201 | - echo "${machine}-${os}${release}" | |
| 244 | + echo "$machine-${os}${release}${abi-}" | |
| 245 | + exit ;; | |
| 246 | + *:Bitrig:*:*) | |
| 247 | + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` | |
| 248 | + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | |
| 202 | 249 | exit ;; |
| 203 | 250 | *:OpenBSD:*:*) |
| 204 | 251 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
| 205 | - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | |
| 252 | + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | |
| 253 | + exit ;; | |
| 254 | + *:LibertyBSD:*:*) | |
| 255 | + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` | |
| 256 | + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | |
| 257 | + exit ;; | |
| 258 | + *:MidnightBSD:*:*) | |
| 259 | + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | |
| 206 | 260 | exit ;; |
| 207 | 261 | *:ekkoBSD:*:*) |
| 208 | - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | |
| 262 | + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | |
| 209 | 263 | exit ;; |
| 210 | 264 | *:SolidBSD:*:*) |
| 211 | - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | |
| 265 | + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | |
| 266 | + exit ;; | |
| 267 | + *:OS108:*:*) | |
| 268 | + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" | |
| 212 | 269 | exit ;; |
| 213 | 270 | macppc:MirBSD:*:*) |
| 214 | - echo powerpc-unknown-mirbsd${UNAME_RELEASE} | |
| 271 | + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | |
| 215 | 272 | exit ;; |
| 216 | 273 | *:MirBSD:*:*) |
| 217 | - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | |
| 274 | + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | |
| 275 | + exit ;; | |
| 276 | + *:Sortix:*:*) | |
| 277 | + echo "$UNAME_MACHINE"-unknown-sortix | |
| 278 | + exit ;; | |
| 279 | + *:Twizzler:*:*) | |
| 280 | + echo "$UNAME_MACHINE"-unknown-twizzler | |
| 281 | + exit ;; | |
| 282 | + *:Redox:*:*) | |
| 283 | + echo "$UNAME_MACHINE"-unknown-redox | |
| 284 | + exit ;; | |
| 285 | + mips:OSF1:*.*) | |
| 286 | + echo mips-dec-osf1 | |
| 218 | 287 | exit ;; |
| 219 | 288 | alpha:OSF1:*:*) |
| 220 | 289 | case $UNAME_RELEASE in |
| ... | ... | @@ -232,63 +301,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 232 | 301 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
| 233 | 302 | case "$ALPHA_CPU_TYPE" in |
| 234 | 303 | "EV4 (21064)") |
| 235 | - UNAME_MACHINE="alpha" ;; | |
| 304 | + UNAME_MACHINE=alpha ;; | |
| 236 | 305 | "EV4.5 (21064)") |
| 237 | - UNAME_MACHINE="alpha" ;; | |
| 306 | + UNAME_MACHINE=alpha ;; | |
| 238 | 307 | "LCA4 (21066/21068)") |
| 239 | - UNAME_MACHINE="alpha" ;; | |
| 308 | + UNAME_MACHINE=alpha ;; | |
| 240 | 309 | "EV5 (21164)") |
| 241 | - UNAME_MACHINE="alphaev5" ;; | |
| 310 | + UNAME_MACHINE=alphaev5 ;; | |
| 242 | 311 | "EV5.6 (21164A)") |
| 243 | - UNAME_MACHINE="alphaev56" ;; | |
| 312 | + UNAME_MACHINE=alphaev56 ;; | |
| 244 | 313 | "EV5.6 (21164PC)") |
| 245 | - UNAME_MACHINE="alphapca56" ;; | |
| 314 | + UNAME_MACHINE=alphapca56 ;; | |
| 246 | 315 | "EV5.7 (21164PC)") |
| 247 | - UNAME_MACHINE="alphapca57" ;; | |
| 316 | + UNAME_MACHINE=alphapca57 ;; | |
| 248 | 317 | "EV6 (21264)") |
| 249 | - UNAME_MACHINE="alphaev6" ;; | |
| 318 | + UNAME_MACHINE=alphaev6 ;; | |
| 250 | 319 | "EV6.7 (21264A)") |
| 251 | - UNAME_MACHINE="alphaev67" ;; | |
| 320 | + UNAME_MACHINE=alphaev67 ;; | |
| 252 | 321 | "EV6.8CB (21264C)") |
| 253 | - UNAME_MACHINE="alphaev68" ;; | |
| 322 | + UNAME_MACHINE=alphaev68 ;; | |
| 254 | 323 | "EV6.8AL (21264B)") |
| 255 | - UNAME_MACHINE="alphaev68" ;; | |
| 324 | + UNAME_MACHINE=alphaev68 ;; | |
| 256 | 325 | "EV6.8CX (21264D)") |
| 257 | - UNAME_MACHINE="alphaev68" ;; | |
| 326 | + UNAME_MACHINE=alphaev68 ;; | |
| 258 | 327 | "EV6.9A (21264/EV69A)") |
| 259 | - UNAME_MACHINE="alphaev69" ;; | |
| 328 | + UNAME_MACHINE=alphaev69 ;; | |
| 260 | 329 | "EV7 (21364)") |
| 261 | - UNAME_MACHINE="alphaev7" ;; | |
| 330 | + UNAME_MACHINE=alphaev7 ;; | |
| 262 | 331 | "EV7.9 (21364A)") |
| 263 | - UNAME_MACHINE="alphaev79" ;; | |
| 332 | + UNAME_MACHINE=alphaev79 ;; | |
| 264 | 333 | esac |
| 265 | 334 | # A Pn.n version is a patched version. |
| 266 | 335 | # A Vn.n version is a released version. |
| 267 | 336 | # A Tn.n version is a released field test version. |
| 268 | 337 | # A Xn.n version is an unreleased experimental baselevel. |
| 269 | 338 | # 1.2 uses "1.2" for uname -r. |
| 270 | - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
| 339 | + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" | |
| 271 | 340 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
| 272 | 341 | exitcode=$? |
| 273 | 342 | trap '' 0 |
| 274 | 343 | exit $exitcode ;; |
| 275 | - Alpha\ *:Windows_NT*:*) | |
| 276 | - # How do we know it's Interix rather than the generic POSIX subsystem? | |
| 277 | - # Should we change UNAME_MACHINE based on the output of uname instead | |
| 278 | - # of the specific Alpha model? | |
| 279 | - echo alpha-pc-interix | |
| 280 | - exit ;; | |
| 281 | - 21064:Windows_NT:50:3) | |
| 282 | - echo alpha-dec-winnt3.5 | |
| 283 | - exit ;; | |
| 284 | 344 | Amiga*:UNIX_System_V:4.0:*) |
| 285 | 345 | echo m68k-unknown-sysv4 |
| 286 | 346 | exit ;; |
| 287 | 347 | *:[Aa]miga[Oo][Ss]:*:*) |
| 288 | - echo ${UNAME_MACHINE}-unknown-amigaos | |
| 348 | + echo "$UNAME_MACHINE"-unknown-amigaos | |
| 289 | 349 | exit ;; |
| 290 | 350 | *:[Mm]orph[Oo][Ss]:*:*) |
| 291 | - echo ${UNAME_MACHINE}-unknown-morphos | |
| 351 | + echo "$UNAME_MACHINE"-unknown-morphos | |
| 292 | 352 | exit ;; |
| 293 | 353 | *:OS/390:*:*) |
| 294 | 354 | echo i370-ibm-openedition |
| ... | ... | @@ -300,9 +360,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 300 | 360 | echo powerpc-ibm-os400 |
| 301 | 361 | exit ;; |
| 302 | 362 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
| 303 | - echo arm-acorn-riscix${UNAME_RELEASE} | |
| 363 | + echo arm-acorn-riscix"$UNAME_RELEASE" | |
| 304 | 364 | exit ;; |
| 305 | - arm:riscos:*:*|arm:RISCOS:*:*) | |
| 365 | + arm*:riscos:*:*|arm*:RISCOS:*:*) | |
| 306 | 366 | echo arm-unknown-riscos |
| 307 | 367 | exit ;; |
| 308 | 368 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
| ... | ... | @@ -327,38 +387,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 327 | 387 | sparc) echo sparc-icl-nx7; exit ;; |
| 328 | 388 | esac ;; |
| 329 | 389 | s390x:SunOS:*:*) |
| 330 | - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
| 390 | + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
| 331 | 391 | exit ;; |
| 332 | 392 | sun4H:SunOS:5.*:*) |
| 333 | - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
| 393 | + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
| 334 | 394 | exit ;; |
| 335 | 395 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
| 336 | - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
| 396 | + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
| 337 | 397 | exit ;; |
| 338 | 398 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
| 339 | - echo i386-pc-auroraux${UNAME_RELEASE} | |
| 399 | + echo i386-pc-auroraux"$UNAME_RELEASE" | |
| 340 | 400 | exit ;; |
| 341 | 401 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
| 342 | - eval $set_cc_for_build | |
| 343 | - SUN_ARCH="i386" | |
| 402 | + set_cc_for_build | |
| 403 | + SUN_ARCH=i386 | |
| 344 | 404 | # If there is a compiler, see if it is configured for 64-bit objects. |
| 345 | 405 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
| 346 | 406 | # This test works for both compilers. |
| 347 | - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
| 407 | + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
| 348 | 408 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
| 349 | - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
| 409 | + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
| 350 | 410 | grep IS_64BIT_ARCH >/dev/null |
| 351 | 411 | then |
| 352 | - SUN_ARCH="x86_64" | |
| 412 | + SUN_ARCH=x86_64 | |
| 353 | 413 | fi |
| 354 | 414 | fi |
| 355 | - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
| 415 | + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
| 356 | 416 | exit ;; |
| 357 | 417 | sun4*:SunOS:6*:*) |
| 358 | 418 | # According to config.sub, this is the proper way to canonicalize |
| 359 | 419 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
| 360 | 420 | # it's likely to be more like Solaris than SunOS4. |
| 361 | - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
| 421 | + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
| 362 | 422 | exit ;; |
| 363 | 423 | sun4*:SunOS:*:*) |
| 364 | 424 | case "`/usr/bin/arch -k`" in |
| ... | ... | @@ -367,25 +427,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 367 | 427 | ;; |
| 368 | 428 | esac |
| 369 | 429 | # Japanese Language versions have a version number like `4.1.3-JL'. |
| 370 | - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | |
| 430 | + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" | |
| 371 | 431 | exit ;; |
| 372 | 432 | sun3*:SunOS:*:*) |
| 373 | - echo m68k-sun-sunos${UNAME_RELEASE} | |
| 433 | + echo m68k-sun-sunos"$UNAME_RELEASE" | |
| 374 | 434 | exit ;; |
| 375 | 435 | sun*:*:4.2BSD:*) |
| 376 | 436 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
| 377 | - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | |
| 437 | + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 | |
| 378 | 438 | case "`/bin/arch`" in |
| 379 | 439 | sun3) |
| 380 | - echo m68k-sun-sunos${UNAME_RELEASE} | |
| 440 | + echo m68k-sun-sunos"$UNAME_RELEASE" | |
| 381 | 441 | ;; |
| 382 | 442 | sun4) |
| 383 | - echo sparc-sun-sunos${UNAME_RELEASE} | |
| 443 | + echo sparc-sun-sunos"$UNAME_RELEASE" | |
| 384 | 444 | ;; |
| 385 | 445 | esac |
| 386 | 446 | exit ;; |
| 387 | 447 | aushp:SunOS:*:*) |
| 388 | - echo sparc-auspex-sunos${UNAME_RELEASE} | |
| 448 | + echo sparc-auspex-sunos"$UNAME_RELEASE" | |
| 389 | 449 | exit ;; |
| 390 | 450 | # The situation for MiNT is a little confusing. The machine name |
| 391 | 451 | # can be virtually everything (everything which is not |
| ... | ... | @@ -396,44 +456,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 396 | 456 | # MiNT. But MiNT is downward compatible to TOS, so this should |
| 397 | 457 | # be no problem. |
| 398 | 458 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
| 399 | - echo m68k-atari-mint${UNAME_RELEASE} | |
| 459 | + echo m68k-atari-mint"$UNAME_RELEASE" | |
| 400 | 460 | exit ;; |
| 401 | 461 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
| 402 | - echo m68k-atari-mint${UNAME_RELEASE} | |
| 462 | + echo m68k-atari-mint"$UNAME_RELEASE" | |
| 403 | 463 | exit ;; |
| 404 | 464 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
| 405 | - echo m68k-atari-mint${UNAME_RELEASE} | |
| 465 | + echo m68k-atari-mint"$UNAME_RELEASE" | |
| 406 | 466 | exit ;; |
| 407 | 467 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
| 408 | - echo m68k-milan-mint${UNAME_RELEASE} | |
| 468 | + echo m68k-milan-mint"$UNAME_RELEASE" | |
| 409 | 469 | exit ;; |
| 410 | 470 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
| 411 | - echo m68k-hades-mint${UNAME_RELEASE} | |
| 471 | + echo m68k-hades-mint"$UNAME_RELEASE" | |
| 412 | 472 | exit ;; |
| 413 | 473 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
| 414 | - echo m68k-unknown-mint${UNAME_RELEASE} | |
| 474 | + echo m68k-unknown-mint"$UNAME_RELEASE" | |
| 415 | 475 | exit ;; |
| 416 | 476 | m68k:machten:*:*) |
| 417 | - echo m68k-apple-machten${UNAME_RELEASE} | |
| 477 | + echo m68k-apple-machten"$UNAME_RELEASE" | |
| 418 | 478 | exit ;; |
| 419 | 479 | powerpc:machten:*:*) |
| 420 | - echo powerpc-apple-machten${UNAME_RELEASE} | |
| 480 | + echo powerpc-apple-machten"$UNAME_RELEASE" | |
| 421 | 481 | exit ;; |
| 422 | 482 | RISC*:Mach:*:*) |
| 423 | 483 | echo mips-dec-mach_bsd4.3 |
| 424 | 484 | exit ;; |
| 425 | 485 | RISC*:ULTRIX:*:*) |
| 426 | - echo mips-dec-ultrix${UNAME_RELEASE} | |
| 486 | + echo mips-dec-ultrix"$UNAME_RELEASE" | |
| 427 | 487 | exit ;; |
| 428 | 488 | VAX*:ULTRIX*:*:*) |
| 429 | - echo vax-dec-ultrix${UNAME_RELEASE} | |
| 489 | + echo vax-dec-ultrix"$UNAME_RELEASE" | |
| 430 | 490 | exit ;; |
| 431 | 491 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
| 432 | - echo clipper-intergraph-clix${UNAME_RELEASE} | |
| 492 | + echo clipper-intergraph-clix"$UNAME_RELEASE" | |
| 433 | 493 | exit ;; |
| 434 | 494 | mips:*:*:UMIPS | mips:*:*:RISCos) |
| 435 | - eval $set_cc_for_build | |
| 436 | - sed 's/^ //' << EOF >$dummy.c | |
| 495 | + set_cc_for_build | |
| 496 | + sed 's/^ //' << EOF > "$dummy.c" | |
| 437 | 497 | #ifdef __cplusplus |
| 438 | 498 | #include <stdio.h> /* for printf() prototype */ |
| 439 | 499 | int main (int argc, char *argv[]) { |
| ... | ... | @@ -442,23 +502,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
| 442 | 502 | #endif |
| 443 | 503 | #if defined (host_mips) && defined (MIPSEB) |
| 444 | 504 | #if defined (SYSTYPE_SYSV) |
| 445 | - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); | |
| 505 | + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); | |
| 446 | 506 | #endif |
| 447 | 507 | #if defined (SYSTYPE_SVR4) |
| 448 | - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); | |
| 508 | + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); | |
| 449 | 509 | #endif |
| 450 | 510 | #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) |
| 451 | - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); | |
| 511 | + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); | |
| 452 | 512 | #endif |
| 453 | 513 | #endif |
| 454 | 514 | exit (-1); |
| 455 | 515 | } |
| 456 | 516 | EOF |
| 457 | - $CC_FOR_BUILD -o $dummy $dummy.c && | |
| 458 | - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
| 459 | - SYSTEM_NAME=`$dummy $dummyarg` && | |
| 517 | + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && | |
| 518 | + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
| 519 | + SYSTEM_NAME=`"$dummy" "$dummyarg"` && | |
| 460 | 520 | { echo "$SYSTEM_NAME"; exit; } |
| 461 | - echo mips-mips-riscos${UNAME_RELEASE} | |
| 521 | + echo mips-mips-riscos"$UNAME_RELEASE" | |
| 462 | 522 | exit ;; |
| 463 | 523 | Motorola:PowerMAX_OS:*:*) |
| 464 | 524 | echo powerpc-motorola-powermax |
| ... | ... | @@ -484,17 +544,17 @@ EOF |
| 484 | 544 | AViiON:dgux:*:*) |
| 485 | 545 | # DG/UX returns AViiON for all architectures |
| 486 | 546 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
| 487 | - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | |
| 547 | + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] | |
| 488 | 548 | then |
| 489 | - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | |
| 490 | - [ ${TARGET_BINARY_INTERFACE}x = x ] | |
| 549 | + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ | |
| 550 | + [ "$TARGET_BINARY_INTERFACE"x = x ] | |
| 491 | 551 | then |
| 492 | - echo m88k-dg-dgux${UNAME_RELEASE} | |
| 552 | + echo m88k-dg-dgux"$UNAME_RELEASE" | |
| 493 | 553 | else |
| 494 | - echo m88k-dg-dguxbcs${UNAME_RELEASE} | |
| 554 | + echo m88k-dg-dguxbcs"$UNAME_RELEASE" | |
| 495 | 555 | fi |
| 496 | 556 | else |
| 497 | - echo i586-dg-dgux${UNAME_RELEASE} | |
| 557 | + echo i586-dg-dgux"$UNAME_RELEASE" | |
| 498 | 558 | fi |
| 499 | 559 | exit ;; |
| 500 | 560 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
| ... | ... | @@ -511,7 +571,7 @@ EOF |
| 511 | 571 | echo m68k-tektronix-bsd |
| 512 | 572 | exit ;; |
| 513 | 573 | *:IRIX*:*:*) |
| 514 | - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | |
| 574 | + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" | |
| 515 | 575 | exit ;; |
| 516 | 576 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
| 517 | 577 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
| ... | ... | @@ -523,14 +583,14 @@ EOF |
| 523 | 583 | if [ -x /usr/bin/oslevel ] ; then |
| 524 | 584 | IBM_REV=`/usr/bin/oslevel` |
| 525 | 585 | else |
| 526 | - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
| 586 | + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
| 527 | 587 | fi |
| 528 | - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | |
| 588 | + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | |
| 529 | 589 | exit ;; |
| 530 | 590 | *:AIX:2:3) |
| 531 | 591 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
| 532 | - eval $set_cc_for_build | |
| 533 | - sed 's/^ //' << EOF >$dummy.c | |
| 592 | + set_cc_for_build | |
| 593 | + sed 's/^ //' << EOF > "$dummy.c" | |
| 534 | 594 | #include <sys/systemcfg.h> |
| 535 | 595 | |
| 536 | 596 | main() |
| ... | ... | @@ -541,7 +601,7 @@ EOF |
| 541 | 601 | exit(0); |
| 542 | 602 | } |
| 543 | 603 | EOF |
| 544 | - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` | |
| 604 | + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` | |
| 545 | 605 | then |
| 546 | 606 | echo "$SYSTEM_NAME" |
| 547 | 607 | else |
| ... | ... | @@ -555,26 +615,27 @@ EOF |
| 555 | 615 | exit ;; |
| 556 | 616 | *:AIX:*:[4567]) |
| 557 | 617 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
| 558 | - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | |
| 618 | + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then | |
| 559 | 619 | IBM_ARCH=rs6000 |
| 560 | 620 | else |
| 561 | 621 | IBM_ARCH=powerpc |
| 562 | 622 | fi |
| 563 | - if [ -x /usr/bin/oslevel ] ; then | |
| 564 | - IBM_REV=`/usr/bin/oslevel` | |
| 623 | + if [ -x /usr/bin/lslpp ] ; then | |
| 624 | + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | | |
| 625 | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` | |
| 565 | 626 | else |
| 566 | - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
| 627 | + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
| 567 | 628 | fi |
| 568 | - echo ${IBM_ARCH}-ibm-aix${IBM_REV} | |
| 629 | + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | |
| 569 | 630 | exit ;; |
| 570 | 631 | *:AIX:*:*) |
| 571 | 632 | echo rs6000-ibm-aix |
| 572 | 633 | exit ;; |
| 573 | - ibmrt:4.4BSD:*|romp-ibm:BSD:*) | |
| 634 | + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) | |
| 574 | 635 | echo romp-ibm-bsd4.4 |
| 575 | 636 | exit ;; |
| 576 | 637 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
| 577 | - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | |
| 638 | + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to | |
| 578 | 639 | exit ;; # report: romp-ibm BSD 4.3 |
| 579 | 640 | *:BOSX:*:*) |
| 580 | 641 | echo rs6000-bull-bosx |
| ... | ... | @@ -589,28 +650,28 @@ EOF |
| 589 | 650 | echo m68k-hp-bsd4.4 |
| 590 | 651 | exit ;; |
| 591 | 652 | 9000/[34678]??:HP-UX:*:*) |
| 592 | - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
| 593 | - case "${UNAME_MACHINE}" in | |
| 594 | - 9000/31? ) HP_ARCH=m68000 ;; | |
| 595 | - 9000/[34]?? ) HP_ARCH=m68k ;; | |
| 653 | + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
| 654 | + case "$UNAME_MACHINE" in | |
| 655 | + 9000/31?) HP_ARCH=m68000 ;; | |
| 656 | + 9000/[34]??) HP_ARCH=m68k ;; | |
| 596 | 657 | 9000/[678][0-9][0-9]) |
| 597 | 658 | if [ -x /usr/bin/getconf ]; then |
| 598 | 659 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
| 599 | 660 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
| 600 | - case "${sc_cpu_version}" in | |
| 601 | - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | |
| 602 | - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | |
| 661 | + case "$sc_cpu_version" in | |
| 662 | + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 | |
| 663 | + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 | |
| 603 | 664 | 532) # CPU_PA_RISC2_0 |
| 604 | - case "${sc_kernel_bits}" in | |
| 605 | - 32) HP_ARCH="hppa2.0n" ;; | |
| 606 | - 64) HP_ARCH="hppa2.0w" ;; | |
| 607 | - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | |
| 665 | + case "$sc_kernel_bits" in | |
| 666 | + 32) HP_ARCH=hppa2.0n ;; | |
| 667 | + 64) HP_ARCH=hppa2.0w ;; | |
| 668 | + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 | |
| 608 | 669 | esac ;; |
| 609 | 670 | esac |
| 610 | 671 | fi |
| 611 | - if [ "${HP_ARCH}" = "" ]; then | |
| 612 | - eval $set_cc_for_build | |
| 613 | - sed 's/^ //' << EOF >$dummy.c | |
| 672 | + if [ "$HP_ARCH" = "" ]; then | |
| 673 | + set_cc_for_build | |
| 674 | + sed 's/^ //' << EOF > "$dummy.c" | |
| 614 | 675 | |
| 615 | 676 | #define _HPUX_SOURCE |
| 616 | 677 | #include <stdlib.h> |
| ... | ... | @@ -643,13 +704,13 @@ EOF |
| 643 | 704 | exit (0); |
| 644 | 705 | } |
| 645 | 706 | EOF |
| 646 | - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | |
| 707 | + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` | |
| 647 | 708 | test -z "$HP_ARCH" && HP_ARCH=hppa |
| 648 | 709 | fi ;; |
| 649 | 710 | esac |
| 650 | - if [ ${HP_ARCH} = "hppa2.0w" ] | |
| 711 | + if [ "$HP_ARCH" = hppa2.0w ] | |
| 651 | 712 | then |
| 652 | - eval $set_cc_for_build | |
| 713 | + set_cc_for_build | |
| 653 | 714 | |
| 654 | 715 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
| 655 | 716 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
| ... | ... | @@ -660,23 +721,23 @@ EOF |
| 660 | 721 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
| 661 | 722 | # => hppa64-hp-hpux11.23 |
| 662 | 723 | |
| 663 | - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | |
| 724 | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | | |
| 664 | 725 | grep -q __LP64__ |
| 665 | 726 | then |
| 666 | - HP_ARCH="hppa2.0w" | |
| 727 | + HP_ARCH=hppa2.0w | |
| 667 | 728 | else |
| 668 | - HP_ARCH="hppa64" | |
| 729 | + HP_ARCH=hppa64 | |
| 669 | 730 | fi |
| 670 | 731 | fi |
| 671 | - echo ${HP_ARCH}-hp-hpux${HPUX_REV} | |
| 732 | + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | |
| 672 | 733 | exit ;; |
| 673 | 734 | ia64:HP-UX:*:*) |
| 674 | - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
| 675 | - echo ia64-hp-hpux${HPUX_REV} | |
| 735 | + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
| 736 | + echo ia64-hp-hpux"$HPUX_REV" | |
| 676 | 737 | exit ;; |
| 677 | 738 | 3050*:HI-UX:*:*) |
| 678 | - eval $set_cc_for_build | |
| 679 | - sed 's/^ //' << EOF >$dummy.c | |
| 739 | + set_cc_for_build | |
| 740 | + sed 's/^ //' << EOF > "$dummy.c" | |
| 680 | 741 | #include <unistd.h> |
| 681 | 742 | int |
| 682 | 743 | main () |
| ... | ... | @@ -701,11 +762,11 @@ EOF |
| 701 | 762 | exit (0); |
| 702 | 763 | } |
| 703 | 764 | EOF |
| 704 | - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | |
| 765 | + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && | |
| 705 | 766 | { echo "$SYSTEM_NAME"; exit; } |
| 706 | 767 | echo unknown-hitachi-hiuxwe2 |
| 707 | 768 | exit ;; |
| 708 | - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | |
| 769 | + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) | |
| 709 | 770 | echo hppa1.1-hp-bsd |
| 710 | 771 | exit ;; |
| 711 | 772 | 9000/8??:4.3bsd:*:*) |
| ... | ... | @@ -714,7 +775,7 @@ EOF |
| 714 | 775 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
| 715 | 776 | echo hppa1.0-hp-mpeix |
| 716 | 777 | exit ;; |
| 717 | - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | |
| 778 | + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) | |
| 718 | 779 | echo hppa1.1-hp-osf |
| 719 | 780 | exit ;; |
| 720 | 781 | hp8??:OSF1:*:*) |
| ... | ... | @@ -722,9 +783,9 @@ EOF |
| 722 | 783 | exit ;; |
| 723 | 784 | i*86:OSF1:*:*) |
| 724 | 785 | if [ -x /usr/sbin/sysversion ] ; then |
| 725 | - echo ${UNAME_MACHINE}-unknown-osf1mk | |
| 786 | + echo "$UNAME_MACHINE"-unknown-osf1mk | |
| 726 | 787 | else |
| 727 | - echo ${UNAME_MACHINE}-unknown-osf1 | |
| 788 | + echo "$UNAME_MACHINE"-unknown-osf1 | |
| 728 | 789 | fi |
| 729 | 790 | exit ;; |
| 730 | 791 | parisc*:Lites*:*:*) |
| ... | ... | @@ -749,127 +810,123 @@ EOF |
| 749 | 810 | echo c4-convex-bsd |
| 750 | 811 | exit ;; |
| 751 | 812 | CRAY*Y-MP:*:*:*) |
| 752 | - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
| 813 | + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 753 | 814 | exit ;; |
| 754 | 815 | CRAY*[A-Z]90:*:*:*) |
| 755 | - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | |
| 816 | + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | |
| 756 | 817 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
| 757 | 818 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
| 758 | 819 | -e 's/\.[^.]*$/.X/' |
| 759 | 820 | exit ;; |
| 760 | 821 | CRAY*TS:*:*:*) |
| 761 | - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
| 822 | + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 762 | 823 | exit ;; |
| 763 | 824 | CRAY*T3E:*:*:*) |
| 764 | - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
| 825 | + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 765 | 826 | exit ;; |
| 766 | 827 | CRAY*SV1:*:*:*) |
| 767 | - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
| 828 | + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 768 | 829 | exit ;; |
| 769 | 830 | *:UNICOS/mp:*:*) |
| 770 | - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
| 831 | + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 771 | 832 | exit ;; |
| 772 | 833 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
| 773 | - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
| 774 | - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
| 775 | - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | |
| 834 | + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` | |
| 835 | + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` | |
| 836 | + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` | |
| 776 | 837 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
| 777 | 838 | exit ;; |
| 778 | 839 | 5000:UNIX_System_V:4.*:*) |
| 779 | - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
| 780 | - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | |
| 840 | + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` | |
| 841 | + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` | |
| 781 | 842 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
| 782 | 843 | exit ;; |
| 783 | 844 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
| 784 | - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | |
| 845 | + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | |
| 785 | 846 | exit ;; |
| 786 | 847 | sparc*:BSD/OS:*:*) |
| 787 | - echo sparc-unknown-bsdi${UNAME_RELEASE} | |
| 848 | + echo sparc-unknown-bsdi"$UNAME_RELEASE" | |
| 788 | 849 | exit ;; |
| 789 | 850 | *:BSD/OS:*:*) |
| 790 | - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | |
| 851 | + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | |
| 852 | + exit ;; | |
| 853 | + arm:FreeBSD:*:*) | |
| 854 | + UNAME_PROCESSOR=`uname -p` | |
| 855 | + set_cc_for_build | |
| 856 | + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
| 857 | + | grep -q __ARM_PCS_VFP | |
| 858 | + then | |
| 859 | + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi | |
| 860 | + else | |
| 861 | + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf | |
| 862 | + fi | |
| 791 | 863 | exit ;; |
| 792 | 864 | *:FreeBSD:*:*) |
| 793 | 865 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
| 794 | - case ${UNAME_PROCESSOR} in | |
| 866 | + case "$UNAME_PROCESSOR" in | |
| 795 | 867 | amd64) |
| 796 | - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
| 797 | - *) | |
| 798 | - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
| 868 | + UNAME_PROCESSOR=x86_64 ;; | |
| 869 | + i386) | |
| 870 | + UNAME_PROCESSOR=i586 ;; | |
| 799 | 871 | esac |
| 872 | + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
| 800 | 873 | exit ;; |
| 801 | 874 | i*:CYGWIN*:*) |
| 802 | - echo ${UNAME_MACHINE}-pc-cygwin | |
| 875 | + echo "$UNAME_MACHINE"-pc-cygwin | |
| 803 | 876 | exit ;; |
| 804 | - *:MINGW*:*) | |
| 805 | - echo ${UNAME_MACHINE}-pc-mingw32 | |
| 877 | + *:MINGW64*:*) | |
| 878 | + echo "$UNAME_MACHINE"-pc-mingw64 | |
| 806 | 879 | exit ;; |
| 807 | - i*:MSYS*:*) | |
| 808 | - echo ${UNAME_MACHINE}-pc-msys | |
| 880 | + *:MINGW*:*) | |
| 881 | + echo "$UNAME_MACHINE"-pc-mingw32 | |
| 809 | 882 | exit ;; |
| 810 | - i*:windows32*:*) | |
| 811 | - # uname -m includes "-pc" on this system. | |
| 812 | - echo ${UNAME_MACHINE}-mingw32 | |
| 883 | + *:MSYS*:*) | |
| 884 | + echo "$UNAME_MACHINE"-pc-msys | |
| 813 | 885 | exit ;; |
| 814 | 886 | i*:PW*:*) |
| 815 | - echo ${UNAME_MACHINE}-pc-pw32 | |
| 887 | + echo "$UNAME_MACHINE"-pc-pw32 | |
| 816 | 888 | exit ;; |
| 817 | 889 | *:Interix*:*) |
| 818 | - case ${UNAME_MACHINE} in | |
| 890 | + case "$UNAME_MACHINE" in | |
| 819 | 891 | x86) |
| 820 | - echo i586-pc-interix${UNAME_RELEASE} | |
| 892 | + echo i586-pc-interix"$UNAME_RELEASE" | |
| 821 | 893 | exit ;; |
| 822 | 894 | authenticamd | genuineintel | EM64T) |
| 823 | - echo x86_64-unknown-interix${UNAME_RELEASE} | |
| 895 | + echo x86_64-unknown-interix"$UNAME_RELEASE" | |
| 824 | 896 | exit ;; |
| 825 | 897 | IA64) |
| 826 | - echo ia64-unknown-interix${UNAME_RELEASE} | |
| 898 | + echo ia64-unknown-interix"$UNAME_RELEASE" | |
| 827 | 899 | exit ;; |
| 828 | 900 | esac ;; |
| 829 | - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | |
| 830 | - echo i${UNAME_MACHINE}-pc-mks | |
| 831 | - exit ;; | |
| 832 | - 8664:Windows_NT:*) | |
| 833 | - echo x86_64-pc-mks | |
| 834 | - exit ;; | |
| 835 | - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | |
| 836 | - # How do we know it's Interix rather than the generic POSIX subsystem? | |
| 837 | - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | |
| 838 | - # UNAME_MACHINE based on the output of uname instead of i386? | |
| 839 | - echo i586-pc-interix | |
| 840 | - exit ;; | |
| 841 | 901 | i*:UWIN*:*) |
| 842 | - echo ${UNAME_MACHINE}-pc-uwin | |
| 902 | + echo "$UNAME_MACHINE"-pc-uwin | |
| 843 | 903 | exit ;; |
| 844 | 904 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
| 845 | - echo x86_64-unknown-cygwin | |
| 846 | - exit ;; | |
| 847 | - p*:CYGWIN*:*) | |
| 848 | - echo powerpcle-unknown-cygwin | |
| 905 | + echo x86_64-pc-cygwin | |
| 849 | 906 | exit ;; |
| 850 | 907 | prep*:SunOS:5.*:*) |
| 851 | - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
| 908 | + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
| 852 | 909 | exit ;; |
| 853 | 910 | *:GNU:*:*) |
| 854 | 911 | # the GNU system |
| 855 | - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | |
| 912 | + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" | |
| 856 | 913 | exit ;; |
| 857 | 914 | *:GNU/*:*:*) |
| 858 | 915 | # other systems with GNU libc and userland |
| 859 | - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu | |
| 916 | + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" | |
| 860 | 917 | exit ;; |
| 861 | - i*86:Minix:*:*) | |
| 862 | - echo ${UNAME_MACHINE}-pc-minix | |
| 918 | + *:Minix:*:*) | |
| 919 | + echo "$UNAME_MACHINE"-unknown-minix | |
| 863 | 920 | exit ;; |
| 864 | 921 | aarch64:Linux:*:*) |
| 865 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 922 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 866 | 923 | exit ;; |
| 867 | 924 | aarch64_be:Linux:*:*) |
| 868 | 925 | UNAME_MACHINE=aarch64_be |
| 869 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 926 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 870 | 927 | exit ;; |
| 871 | 928 | alpha:Linux:*:*) |
| 872 | - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
| 929 | + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in | |
| 873 | 930 | EV5) UNAME_MACHINE=alphaev5 ;; |
| 874 | 931 | EV56) UNAME_MACHINE=alphaev56 ;; |
| 875 | 932 | PCA56) UNAME_MACHINE=alphapca56 ;; |
| ... | ... | @@ -879,125 +936,169 @@ EOF |
| 879 | 936 | EV68*) UNAME_MACHINE=alphaev68 ;; |
| 880 | 937 | esac |
| 881 | 938 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
| 882 | - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | |
| 883 | - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | |
| 939 | + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi | |
| 940 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 941 | + exit ;; | |
| 942 | + arc:Linux:*:* | arceb:Linux:*:*) | |
| 943 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 884 | 944 | exit ;; |
| 885 | 945 | arm*:Linux:*:*) |
| 886 | - eval $set_cc_for_build | |
| 946 | + set_cc_for_build | |
| 887 | 947 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 888 | 948 | | grep -q __ARM_EABI__ |
| 889 | 949 | then |
| 890 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 950 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 891 | 951 | else |
| 892 | 952 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 893 | 953 | | grep -q __ARM_PCS_VFP |
| 894 | 954 | then |
| 895 | - echo ${UNAME_MACHINE}-unknown-linux-gnueabi | |
| 955 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi | |
| 896 | 956 | else |
| 897 | - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf | |
| 957 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf | |
| 898 | 958 | fi |
| 899 | 959 | fi |
| 900 | 960 | exit ;; |
| 901 | 961 | avr32*:Linux:*:*) |
| 902 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 962 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 903 | 963 | exit ;; |
| 904 | 964 | cris:Linux:*:*) |
| 905 | - echo ${UNAME_MACHINE}-axis-linux-gnu | |
| 965 | + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
| 906 | 966 | exit ;; |
| 907 | 967 | crisv32:Linux:*:*) |
| 908 | - echo ${UNAME_MACHINE}-axis-linux-gnu | |
| 968 | + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
| 969 | + exit ;; | |
| 970 | + e2k:Linux:*:*) | |
| 971 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 909 | 972 | exit ;; |
| 910 | 973 | frv:Linux:*:*) |
| 911 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 974 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 912 | 975 | exit ;; |
| 913 | 976 | hexagon:Linux:*:*) |
| 914 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 977 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 915 | 978 | exit ;; |
| 916 | 979 | i*86:Linux:*:*) |
| 917 | - LIBC=gnu | |
| 918 | - eval $set_cc_for_build | |
| 919 | - sed 's/^ //' << EOF >$dummy.c | |
| 920 | - #ifdef __dietlibc__ | |
| 921 | - LIBC=dietlibc | |
| 922 | - #endif | |
| 923 | -EOF | |
| 924 | - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` | |
| 925 | - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | |
| 980 | + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
| 926 | 981 | exit ;; |
| 927 | 982 | ia64:Linux:*:*) |
| 928 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 983 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 984 | + exit ;; | |
| 985 | + k1om:Linux:*:*) | |
| 986 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 929 | 987 | exit ;; |
| 930 | 988 | m32r*:Linux:*:*) |
| 931 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 989 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 932 | 990 | exit ;; |
| 933 | 991 | m68*:Linux:*:*) |
| 934 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 992 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 935 | 993 | exit ;; |
| 936 | 994 | mips:Linux:*:* | mips64:Linux:*:*) |
| 937 | - eval $set_cc_for_build | |
| 938 | - sed 's/^ //' << EOF >$dummy.c | |
| 995 | + set_cc_for_build | |
| 996 | + IS_GLIBC=0 | |
| 997 | + test x"${LIBC}" = xgnu && IS_GLIBC=1 | |
| 998 | + sed 's/^ //' << EOF > "$dummy.c" | |
| 939 | 999 | #undef CPU |
| 940 | - #undef ${UNAME_MACHINE} | |
| 941 | - #undef ${UNAME_MACHINE}el | |
| 1000 | + #undef mips | |
| 1001 | + #undef mipsel | |
| 1002 | + #undef mips64 | |
| 1003 | + #undef mips64el | |
| 1004 | + #if ${IS_GLIBC} && defined(_ABI64) | |
| 1005 | + LIBCABI=gnuabi64 | |
| 1006 | + #else | |
| 1007 | + #if ${IS_GLIBC} && defined(_ABIN32) | |
| 1008 | + LIBCABI=gnuabin32 | |
| 1009 | + #else | |
| 1010 | + LIBCABI=${LIBC} | |
| 1011 | + #endif | |
| 1012 | + #endif | |
| 1013 | + | |
| 1014 | + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
| 1015 | + CPU=mipsisa64r6 | |
| 1016 | + #else | |
| 1017 | + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
| 1018 | + CPU=mipsisa32r6 | |
| 1019 | + #else | |
| 1020 | + #if defined(__mips64) | |
| 1021 | + CPU=mips64 | |
| 1022 | + #else | |
| 1023 | + CPU=mips | |
| 1024 | + #endif | |
| 1025 | + #endif | |
| 1026 | + #endif | |
| 1027 | + | |
| 942 | 1028 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
| 943 | - CPU=${UNAME_MACHINE}el | |
| 1029 | + MIPS_ENDIAN=el | |
| 944 | 1030 | #else |
| 945 | 1031 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
| 946 | - CPU=${UNAME_MACHINE} | |
| 1032 | + MIPS_ENDIAN= | |
| 947 | 1033 | #else |
| 948 | - CPU= | |
| 1034 | + MIPS_ENDIAN= | |
| 949 | 1035 | #endif |
| 950 | 1036 | #endif |
| 951 | 1037 | EOF |
| 952 | - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | |
| 953 | - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | |
| 1038 | + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" | |
| 1039 | + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } | |
| 954 | 1040 | ;; |
| 955 | - or32:Linux:*:*) | |
| 956 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 1041 | + mips64el:Linux:*:*) | |
| 1042 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1043 | + exit ;; | |
| 1044 | + openrisc*:Linux:*:*) | |
| 1045 | + echo or1k-unknown-linux-"$LIBC" | |
| 1046 | + exit ;; | |
| 1047 | + or32:Linux:*:* | or1k*:Linux:*:*) | |
| 1048 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 957 | 1049 | exit ;; |
| 958 | 1050 | padre:Linux:*:*) |
| 959 | - echo sparc-unknown-linux-gnu | |
| 1051 | + echo sparc-unknown-linux-"$LIBC" | |
| 960 | 1052 | exit ;; |
| 961 | 1053 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
| 962 | - echo hppa64-unknown-linux-gnu | |
| 1054 | + echo hppa64-unknown-linux-"$LIBC" | |
| 963 | 1055 | exit ;; |
| 964 | 1056 | parisc:Linux:*:* | hppa:Linux:*:*) |
| 965 | 1057 | # Look for CPU level |
| 966 | 1058 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
| 967 | - PA7*) echo hppa1.1-unknown-linux-gnu ;; | |
| 968 | - PA8*) echo hppa2.0-unknown-linux-gnu ;; | |
| 969 | - *) echo hppa-unknown-linux-gnu ;; | |
| 1059 | + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; | |
| 1060 | + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; | |
| 1061 | + *) echo hppa-unknown-linux-"$LIBC" ;; | |
| 970 | 1062 | esac |
| 971 | 1063 | exit ;; |
| 972 | 1064 | ppc64:Linux:*:*) |
| 973 | - echo powerpc64-unknown-linux-gnu | |
| 1065 | + echo powerpc64-unknown-linux-"$LIBC" | |
| 974 | 1066 | exit ;; |
| 975 | 1067 | ppc:Linux:*:*) |
| 976 | - echo powerpc-unknown-linux-gnu | |
| 1068 | + echo powerpc-unknown-linux-"$LIBC" | |
| 1069 | + exit ;; | |
| 1070 | + ppc64le:Linux:*:*) | |
| 1071 | + echo powerpc64le-unknown-linux-"$LIBC" | |
| 1072 | + exit ;; | |
| 1073 | + ppcle:Linux:*:*) | |
| 1074 | + echo powerpcle-unknown-linux-"$LIBC" | |
| 1075 | + exit ;; | |
| 1076 | + riscv32:Linux:*:* | riscv64:Linux:*:*) | |
| 1077 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 977 | 1078 | exit ;; |
| 978 | 1079 | s390:Linux:*:* | s390x:Linux:*:*) |
| 979 | - echo ${UNAME_MACHINE}-ibm-linux | |
| 1080 | + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | |
| 980 | 1081 | exit ;; |
| 981 | 1082 | sh64*:Linux:*:*) |
| 982 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 1083 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 983 | 1084 | exit ;; |
| 984 | 1085 | sh*:Linux:*:*) |
| 985 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 1086 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 986 | 1087 | exit ;; |
| 987 | 1088 | sparc:Linux:*:* | sparc64:Linux:*:*) |
| 988 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 1089 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 989 | 1090 | exit ;; |
| 990 | 1091 | tile*:Linux:*:*) |
| 991 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 1092 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 992 | 1093 | exit ;; |
| 993 | 1094 | vax:Linux:*:*) |
| 994 | - echo ${UNAME_MACHINE}-dec-linux-gnu | |
| 1095 | + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | |
| 995 | 1096 | exit ;; |
| 996 | 1097 | x86_64:Linux:*:*) |
| 997 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 1098 | + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
| 998 | 1099 | exit ;; |
| 999 | 1100 | xtensa*:Linux:*:*) |
| 1000 | - echo ${UNAME_MACHINE}-unknown-linux-gnu | |
| 1101 | + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1001 | 1102 | exit ;; |
| 1002 | 1103 | i*86:DYNIX/ptx:4*:*) |
| 1003 | 1104 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
| ... | ... | @@ -1011,34 +1112,34 @@ EOF |
| 1011 | 1112 | # I am not positive that other SVR4 systems won't match this, |
| 1012 | 1113 | # I just have to hope. -- rms. |
| 1013 | 1114 | # Use sysv4.2uw... so that sysv4* matches it. |
| 1014 | - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | |
| 1115 | + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" | |
| 1015 | 1116 | exit ;; |
| 1016 | 1117 | i*86:OS/2:*:*) |
| 1017 | 1118 | # If we were able to find `uname', then EMX Unix compatibility |
| 1018 | 1119 | # is probably installed. |
| 1019 | - echo ${UNAME_MACHINE}-pc-os2-emx | |
| 1120 | + echo "$UNAME_MACHINE"-pc-os2-emx | |
| 1020 | 1121 | exit ;; |
| 1021 | 1122 | i*86:XTS-300:*:STOP) |
| 1022 | - echo ${UNAME_MACHINE}-unknown-stop | |
| 1123 | + echo "$UNAME_MACHINE"-unknown-stop | |
| 1023 | 1124 | exit ;; |
| 1024 | 1125 | i*86:atheos:*:*) |
| 1025 | - echo ${UNAME_MACHINE}-unknown-atheos | |
| 1126 | + echo "$UNAME_MACHINE"-unknown-atheos | |
| 1026 | 1127 | exit ;; |
| 1027 | 1128 | i*86:syllable:*:*) |
| 1028 | - echo ${UNAME_MACHINE}-pc-syllable | |
| 1129 | + echo "$UNAME_MACHINE"-pc-syllable | |
| 1029 | 1130 | exit ;; |
| 1030 | 1131 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
| 1031 | - echo i386-unknown-lynxos${UNAME_RELEASE} | |
| 1132 | + echo i386-unknown-lynxos"$UNAME_RELEASE" | |
| 1032 | 1133 | exit ;; |
| 1033 | 1134 | i*86:*DOS:*:*) |
| 1034 | - echo ${UNAME_MACHINE}-pc-msdosdjgpp | |
| 1135 | + echo "$UNAME_MACHINE"-pc-msdosdjgpp | |
| 1035 | 1136 | exit ;; |
| 1036 | - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | |
| 1037 | - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | |
| 1137 | + i*86:*:4.*:*) | |
| 1138 | + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` | |
| 1038 | 1139 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
| 1039 | - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} | |
| 1140 | + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | |
| 1040 | 1141 | else |
| 1041 | - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | |
| 1142 | + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | |
| 1042 | 1143 | fi |
| 1043 | 1144 | exit ;; |
| 1044 | 1145 | i*86:*:5:[678]*) |
| ... | ... | @@ -1048,12 +1149,12 @@ EOF |
| 1048 | 1149 | *Pentium) UNAME_MACHINE=i586 ;; |
| 1049 | 1150 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
| 1050 | 1151 | esac |
| 1051 | - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
| 1152 | + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" | |
| 1052 | 1153 | exit ;; |
| 1053 | 1154 | i*86:*:3.2:*) |
| 1054 | 1155 | if test -f /usr/options/cb.name; then |
| 1055 | 1156 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
| 1056 | - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | |
| 1157 | + echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | |
| 1057 | 1158 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
| 1058 | 1159 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
| 1059 | 1160 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
| ... | ... | @@ -1063,9 +1164,9 @@ EOF |
| 1063 | 1164 | && UNAME_MACHINE=i686 |
| 1064 | 1165 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
| 1065 | 1166 | && UNAME_MACHINE=i686 |
| 1066 | - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | |
| 1167 | + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" | |
| 1067 | 1168 | else |
| 1068 | - echo ${UNAME_MACHINE}-pc-sysv32 | |
| 1169 | + echo "$UNAME_MACHINE"-pc-sysv32 | |
| 1069 | 1170 | fi |
| 1070 | 1171 | exit ;; |
| 1071 | 1172 | pc:*:*:*) |
| ... | ... | @@ -1073,7 +1174,7 @@ EOF |
| 1073 | 1174 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
| 1074 | 1175 | # the processor, so we play safe by assuming i586. |
| 1075 | 1176 | # Note: whatever this is, it MUST be the same as what config.sub |
| 1076 | - # prints for the "djgpp" host, or else GDB configury will decide that | |
| 1177 | + # prints for the "djgpp" host, or else GDB configure will decide that | |
| 1077 | 1178 | # this is a cross-build. |
| 1078 | 1179 | echo i586-pc-msdosdjgpp |
| 1079 | 1180 | exit ;; |
| ... | ... | @@ -1085,9 +1186,9 @@ EOF |
| 1085 | 1186 | exit ;; |
| 1086 | 1187 | i860:*:4.*:*) # i860-SVR4 |
| 1087 | 1188 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
| 1088 | - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | |
| 1189 | + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 | |
| 1089 | 1190 | else # Add other i860-SVR4 vendors below as they are discovered. |
| 1090 | - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | |
| 1191 | + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 | |
| 1091 | 1192 | fi |
| 1092 | 1193 | exit ;; |
| 1093 | 1194 | mini*:CTIX:SYS*5:*) |
| ... | ... | @@ -1107,9 +1208,9 @@ EOF |
| 1107 | 1208 | test -r /etc/.relid \ |
| 1108 | 1209 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
| 1109 | 1210 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
| 1110 | - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
| 1211 | + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | |
| 1111 | 1212 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
| 1112 | - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
| 1213 | + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | |
| 1113 | 1214 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
| 1114 | 1215 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
| 1115 | 1216 | && { echo i486-ncr-sysv4; exit; } ;; |
| ... | ... | @@ -1118,28 +1219,28 @@ EOF |
| 1118 | 1219 | test -r /etc/.relid \ |
| 1119 | 1220 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
| 1120 | 1221 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
| 1121 | - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
| 1222 | + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | |
| 1122 | 1223 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
| 1123 | - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } | |
| 1224 | + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } | |
| 1124 | 1225 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
| 1125 | - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
| 1226 | + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | |
| 1126 | 1227 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
| 1127 | - echo m68k-unknown-lynxos${UNAME_RELEASE} | |
| 1228 | + echo m68k-unknown-lynxos"$UNAME_RELEASE" | |
| 1128 | 1229 | exit ;; |
| 1129 | 1230 | mc68030:UNIX_System_V:4.*:*) |
| 1130 | 1231 | echo m68k-atari-sysv4 |
| 1131 | 1232 | exit ;; |
| 1132 | 1233 | TSUNAMI:LynxOS:2.*:*) |
| 1133 | - echo sparc-unknown-lynxos${UNAME_RELEASE} | |
| 1234 | + echo sparc-unknown-lynxos"$UNAME_RELEASE" | |
| 1134 | 1235 | exit ;; |
| 1135 | 1236 | rs6000:LynxOS:2.*:*) |
| 1136 | - echo rs6000-unknown-lynxos${UNAME_RELEASE} | |
| 1237 | + echo rs6000-unknown-lynxos"$UNAME_RELEASE" | |
| 1137 | 1238 | exit ;; |
| 1138 | 1239 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
| 1139 | - echo powerpc-unknown-lynxos${UNAME_RELEASE} | |
| 1240 | + echo powerpc-unknown-lynxos"$UNAME_RELEASE" | |
| 1140 | 1241 | exit ;; |
| 1141 | 1242 | SM[BE]S:UNIX_SV:*:*) |
| 1142 | - echo mips-dde-sysv${UNAME_RELEASE} | |
| 1243 | + echo mips-dde-sysv"$UNAME_RELEASE" | |
| 1143 | 1244 | exit ;; |
| 1144 | 1245 | RM*:ReliantUNIX-*:*:*) |
| 1145 | 1246 | echo mips-sni-sysv4 |
| ... | ... | @@ -1150,7 +1251,7 @@ EOF |
| 1150 | 1251 | *:SINIX-*:*:*) |
| 1151 | 1252 | if uname -p 2>/dev/null >/dev/null ; then |
| 1152 | 1253 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
| 1153 | - echo ${UNAME_MACHINE}-sni-sysv4 | |
| 1254 | + echo "$UNAME_MACHINE"-sni-sysv4 | |
| 1154 | 1255 | else |
| 1155 | 1256 | echo ns32k-sni-sysv |
| 1156 | 1257 | fi |
| ... | ... | @@ -1170,23 +1271,23 @@ EOF |
| 1170 | 1271 | exit ;; |
| 1171 | 1272 | i*86:VOS:*:*) |
| 1172 | 1273 | # From Paul.Green@stratus.com. |
| 1173 | - echo ${UNAME_MACHINE}-stratus-vos | |
| 1274 | + echo "$UNAME_MACHINE"-stratus-vos | |
| 1174 | 1275 | exit ;; |
| 1175 | 1276 | *:VOS:*:*) |
| 1176 | 1277 | # From Paul.Green@stratus.com. |
| 1177 | 1278 | echo hppa1.1-stratus-vos |
| 1178 | 1279 | exit ;; |
| 1179 | 1280 | mc68*:A/UX:*:*) |
| 1180 | - echo m68k-apple-aux${UNAME_RELEASE} | |
| 1281 | + echo m68k-apple-aux"$UNAME_RELEASE" | |
| 1181 | 1282 | exit ;; |
| 1182 | 1283 | news*:NEWS-OS:6*:*) |
| 1183 | 1284 | echo mips-sony-newsos6 |
| 1184 | 1285 | exit ;; |
| 1185 | 1286 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
| 1186 | 1287 | if [ -d /usr/nec ]; then |
| 1187 | - echo mips-nec-sysv${UNAME_RELEASE} | |
| 1288 | + echo mips-nec-sysv"$UNAME_RELEASE" | |
| 1188 | 1289 | else |
| 1189 | - echo mips-unknown-sysv${UNAME_RELEASE} | |
| 1290 | + echo mips-unknown-sysv"$UNAME_RELEASE" | |
| 1190 | 1291 | fi |
| 1191 | 1292 | exit ;; |
| 1192 | 1293 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
| ... | ... | @@ -1201,66 +1302,98 @@ EOF |
| 1201 | 1302 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
| 1202 | 1303 | echo i586-pc-haiku |
| 1203 | 1304 | exit ;; |
| 1305 | + x86_64:Haiku:*:*) | |
| 1306 | + echo x86_64-unknown-haiku | |
| 1307 | + exit ;; | |
| 1204 | 1308 | SX-4:SUPER-UX:*:*) |
| 1205 | - echo sx4-nec-superux${UNAME_RELEASE} | |
| 1309 | + echo sx4-nec-superux"$UNAME_RELEASE" | |
| 1206 | 1310 | exit ;; |
| 1207 | 1311 | SX-5:SUPER-UX:*:*) |
| 1208 | - echo sx5-nec-superux${UNAME_RELEASE} | |
| 1312 | + echo sx5-nec-superux"$UNAME_RELEASE" | |
| 1209 | 1313 | exit ;; |
| 1210 | 1314 | SX-6:SUPER-UX:*:*) |
| 1211 | - echo sx6-nec-superux${UNAME_RELEASE} | |
| 1315 | + echo sx6-nec-superux"$UNAME_RELEASE" | |
| 1212 | 1316 | exit ;; |
| 1213 | 1317 | SX-7:SUPER-UX:*:*) |
| 1214 | - echo sx7-nec-superux${UNAME_RELEASE} | |
| 1318 | + echo sx7-nec-superux"$UNAME_RELEASE" | |
| 1215 | 1319 | exit ;; |
| 1216 | 1320 | SX-8:SUPER-UX:*:*) |
| 1217 | - echo sx8-nec-superux${UNAME_RELEASE} | |
| 1321 | + echo sx8-nec-superux"$UNAME_RELEASE" | |
| 1218 | 1322 | exit ;; |
| 1219 | 1323 | SX-8R:SUPER-UX:*:*) |
| 1220 | - echo sx8r-nec-superux${UNAME_RELEASE} | |
| 1324 | + echo sx8r-nec-superux"$UNAME_RELEASE" | |
| 1325 | + exit ;; | |
| 1326 | + SX-ACE:SUPER-UX:*:*) | |
| 1327 | + echo sxace-nec-superux"$UNAME_RELEASE" | |
| 1221 | 1328 | exit ;; |
| 1222 | 1329 | Power*:Rhapsody:*:*) |
| 1223 | - echo powerpc-apple-rhapsody${UNAME_RELEASE} | |
| 1330 | + echo powerpc-apple-rhapsody"$UNAME_RELEASE" | |
| 1224 | 1331 | exit ;; |
| 1225 | 1332 | *:Rhapsody:*:*) |
| 1226 | - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | |
| 1333 | + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | |
| 1227 | 1334 | exit ;; |
| 1228 | 1335 | *:Darwin:*:*) |
| 1229 | - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | |
| 1336 | + UNAME_PROCESSOR=`uname -p` | |
| 1230 | 1337 | case $UNAME_PROCESSOR in |
| 1231 | - i386) | |
| 1232 | - eval $set_cc_for_build | |
| 1233 | - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
| 1234 | - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
| 1235 | - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
| 1236 | - grep IS_64BIT_ARCH >/dev/null | |
| 1237 | - then | |
| 1238 | - UNAME_PROCESSOR="x86_64" | |
| 1239 | - fi | |
| 1240 | - fi ;; | |
| 1241 | 1338 | unknown) UNAME_PROCESSOR=powerpc ;; |
| 1242 | 1339 | esac |
| 1243 | - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | |
| 1340 | + if command -v xcode-select > /dev/null 2> /dev/null && \ | |
| 1341 | + ! xcode-select --print-path > /dev/null 2> /dev/null ; then | |
| 1342 | + # Avoid executing cc if there is no toolchain installed as | |
| 1343 | + # cc will be a stub that puts up a graphical alert | |
| 1344 | + # prompting the user to install developer tools. | |
| 1345 | + CC_FOR_BUILD=no_compiler_found | |
| 1346 | + else | |
| 1347 | + set_cc_for_build | |
| 1348 | + fi | |
| 1349 | + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
| 1350 | + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
| 1351 | + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
| 1352 | + grep IS_64BIT_ARCH >/dev/null | |
| 1353 | + then | |
| 1354 | + case $UNAME_PROCESSOR in | |
| 1355 | + i386) UNAME_PROCESSOR=x86_64 ;; | |
| 1356 | + powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
| 1357 | + esac | |
| 1358 | + fi | |
| 1359 | + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
| 1360 | + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
| 1361 | + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
| 1362 | + grep IS_PPC >/dev/null | |
| 1363 | + then | |
| 1364 | + UNAME_PROCESSOR=powerpc | |
| 1365 | + fi | |
| 1366 | + elif test "$UNAME_PROCESSOR" = i386 ; then | |
| 1367 | + # uname -m returns i386 or x86_64 | |
| 1368 | + UNAME_PROCESSOR=$UNAME_MACHINE | |
| 1369 | + fi | |
| 1370 | + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" | |
| 1244 | 1371 | exit ;; |
| 1245 | 1372 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
| 1246 | 1373 | UNAME_PROCESSOR=`uname -p` |
| 1247 | - if test "$UNAME_PROCESSOR" = "x86"; then | |
| 1374 | + if test "$UNAME_PROCESSOR" = x86; then | |
| 1248 | 1375 | UNAME_PROCESSOR=i386 |
| 1249 | 1376 | UNAME_MACHINE=pc |
| 1250 | 1377 | fi |
| 1251 | - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | |
| 1378 | + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | |
| 1252 | 1379 | exit ;; |
| 1253 | 1380 | *:QNX:*:4*) |
| 1254 | 1381 | echo i386-pc-qnx |
| 1255 | 1382 | exit ;; |
| 1256 | - NEO-?:NONSTOP_KERNEL:*:*) | |
| 1257 | - echo neo-tandem-nsk${UNAME_RELEASE} | |
| 1383 | + NEO-*:NONSTOP_KERNEL:*:*) | |
| 1384 | + echo neo-tandem-nsk"$UNAME_RELEASE" | |
| 1385 | + exit ;; | |
| 1386 | + NSE-*:NONSTOP_KERNEL:*:*) | |
| 1387 | + echo nse-tandem-nsk"$UNAME_RELEASE" | |
| 1388 | + exit ;; | |
| 1389 | + NSR-*:NONSTOP_KERNEL:*:*) | |
| 1390 | + echo nsr-tandem-nsk"$UNAME_RELEASE" | |
| 1258 | 1391 | exit ;; |
| 1259 | - NSE-?:NONSTOP_KERNEL:*:*) | |
| 1260 | - echo nse-tandem-nsk${UNAME_RELEASE} | |
| 1392 | + NSV-*:NONSTOP_KERNEL:*:*) | |
| 1393 | + echo nsv-tandem-nsk"$UNAME_RELEASE" | |
| 1261 | 1394 | exit ;; |
| 1262 | - NSR-?:NONSTOP_KERNEL:*:*) | |
| 1263 | - echo nsr-tandem-nsk${UNAME_RELEASE} | |
| 1395 | + NSX-*:NONSTOP_KERNEL:*:*) | |
| 1396 | + echo nsx-tandem-nsk"$UNAME_RELEASE" | |
| 1264 | 1397 | exit ;; |
| 1265 | 1398 | *:NonStop-UX:*:*) |
| 1266 | 1399 | echo mips-compaq-nonstopux |
| ... | ... | @@ -1269,18 +1402,19 @@ EOF |
| 1269 | 1402 | echo bs2000-siemens-sysv |
| 1270 | 1403 | exit ;; |
| 1271 | 1404 | DS/*:UNIX_System_V:*:*) |
| 1272 | - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | |
| 1405 | + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" | |
| 1273 | 1406 | exit ;; |
| 1274 | 1407 | *:Plan9:*:*) |
| 1275 | 1408 | # "uname -m" is not consistent, so use $cputype instead. 386 |
| 1276 | 1409 | # is converted to i386 for consistency with other x86 |
| 1277 | 1410 | # operating systems. |
| 1278 | - if test "$cputype" = "386"; then | |
| 1411 | + # shellcheck disable=SC2154 | |
| 1412 | + if test "$cputype" = 386; then | |
| 1279 | 1413 | UNAME_MACHINE=i386 |
| 1280 | 1414 | else |
| 1281 | 1415 | UNAME_MACHINE="$cputype" |
| 1282 | 1416 | fi |
| 1283 | - echo ${UNAME_MACHINE}-unknown-plan9 | |
| 1417 | + echo "$UNAME_MACHINE"-unknown-plan9 | |
| 1284 | 1418 | exit ;; |
| 1285 | 1419 | *:TOPS-10:*:*) |
| 1286 | 1420 | echo pdp10-unknown-tops10 |
| ... | ... | @@ -1301,14 +1435,14 @@ EOF |
| 1301 | 1435 | echo pdp10-unknown-its |
| 1302 | 1436 | exit ;; |
| 1303 | 1437 | SEI:*:*:SEIUX) |
| 1304 | - echo mips-sei-seiux${UNAME_RELEASE} | |
| 1438 | + echo mips-sei-seiux"$UNAME_RELEASE" | |
| 1305 | 1439 | exit ;; |
| 1306 | 1440 | *:DragonFly:*:*) |
| 1307 | - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | |
| 1441 | + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
| 1308 | 1442 | exit ;; |
| 1309 | 1443 | *:*VMS:*:*) |
| 1310 | 1444 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
| 1311 | - case "${UNAME_MACHINE}" in | |
| 1445 | + case "$UNAME_MACHINE" in | |
| 1312 | 1446 | A*) echo alpha-dec-vms ; exit ;; |
| 1313 | 1447 | I*) echo ia64-dec-vms ; exit ;; |
| 1314 | 1448 | V*) echo vax-dec-vms ; exit ;; |
| ... | ... | @@ -1317,27 +1451,39 @@ EOF |
| 1317 | 1451 | echo i386-pc-xenix |
| 1318 | 1452 | exit ;; |
| 1319 | 1453 | i*86:skyos:*:*) |
| 1320 | - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | |
| 1454 | + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" | |
| 1321 | 1455 | exit ;; |
| 1322 | 1456 | i*86:rdos:*:*) |
| 1323 | - echo ${UNAME_MACHINE}-pc-rdos | |
| 1457 | + echo "$UNAME_MACHINE"-pc-rdos | |
| 1324 | 1458 | exit ;; |
| 1325 | 1459 | i*86:AROS:*:*) |
| 1326 | - echo ${UNAME_MACHINE}-pc-aros | |
| 1460 | + echo "$UNAME_MACHINE"-pc-aros | |
| 1327 | 1461 | exit ;; |
| 1328 | 1462 | x86_64:VMkernel:*:*) |
| 1329 | - echo ${UNAME_MACHINE}-unknown-esx | |
| 1463 | + echo "$UNAME_MACHINE"-unknown-esx | |
| 1464 | + exit ;; | |
| 1465 | + amd64:Isilon\ OneFS:*:*) | |
| 1466 | + echo x86_64-unknown-onefs | |
| 1467 | + exit ;; | |
| 1468 | + *:Unleashed:*:*) | |
| 1469 | + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" | |
| 1330 | 1470 | exit ;; |
| 1331 | 1471 | esac |
| 1332 | 1472 | |
| 1333 | -#echo '(No uname command or uname output not recognized.)' 1>&2 | |
| 1334 | -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 | |
| 1335 | - | |
| 1336 | -eval $set_cc_for_build | |
| 1337 | -cat >$dummy.c <<EOF | |
| 1473 | +# No uname command or uname output not recognized. | |
| 1474 | +set_cc_for_build | |
| 1475 | +cat > "$dummy.c" <<EOF | |
| 1338 | 1476 | #ifdef _SEQUENT_ |
| 1339 | -# include <sys/types.h> | |
| 1340 | -# include <sys/utsname.h> | |
| 1477 | +#include <sys/types.h> | |
| 1478 | +#include <sys/utsname.h> | |
| 1479 | +#endif | |
| 1480 | +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
| 1481 | +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
| 1482 | +#include <signal.h> | |
| 1483 | +#if defined(_SIZE_T_) || defined(SIGLOST) | |
| 1484 | +#include <sys/utsname.h> | |
| 1485 | +#endif | |
| 1486 | +#endif | |
| 1341 | 1487 | #endif |
| 1342 | 1488 | main () |
| 1343 | 1489 | { |
| ... | ... | @@ -1350,20 +1496,12 @@ main () |
| 1350 | 1496 | #include <sys/param.h> |
| 1351 | 1497 | printf ("m68k-sony-newsos%s\n", |
| 1352 | 1498 | #ifdef NEWSOS4 |
| 1353 | - "4" | |
| 1499 | + "4" | |
| 1354 | 1500 | #else |
| 1355 | - "" | |
| 1356 | -#endif | |
| 1357 | - ); exit (0); | |
| 1358 | -#endif | |
| 1501 | + "" | |
| 1359 | 1502 | #endif |
| 1360 | - | |
| 1361 | -#if defined (__arm) && defined (__acorn) && defined (__unix) | |
| 1362 | - printf ("arm-acorn-riscix\n"); exit (0); | |
| 1503 | + ); exit (0); | |
| 1363 | 1504 | #endif |
| 1364 | - | |
| 1365 | -#if defined (hp300) && !defined (hpux) | |
| 1366 | - printf ("m68k-hp-bsd\n"); exit (0); | |
| 1367 | 1505 | #endif |
| 1368 | 1506 | |
| 1369 | 1507 | #if defined (NeXT) |
| ... | ... | @@ -1405,39 +1543,54 @@ main () |
| 1405 | 1543 | #endif |
| 1406 | 1544 | |
| 1407 | 1545 | #if defined (_SEQUENT_) |
| 1408 | - struct utsname un; | |
| 1409 | - | |
| 1410 | - uname(&un); | |
| 1411 | - | |
| 1412 | - if (strncmp(un.version, "V2", 2) == 0) { | |
| 1413 | - printf ("i386-sequent-ptx2\n"); exit (0); | |
| 1414 | - } | |
| 1415 | - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
| 1416 | - printf ("i386-sequent-ptx1\n"); exit (0); | |
| 1417 | - } | |
| 1418 | - printf ("i386-sequent-ptx\n"); exit (0); | |
| 1546 | + struct utsname un; | |
| 1419 | 1547 | |
| 1548 | + uname(&un); | |
| 1549 | + if (strncmp(un.version, "V2", 2) == 0) { | |
| 1550 | + printf ("i386-sequent-ptx2\n"); exit (0); | |
| 1551 | + } | |
| 1552 | + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
| 1553 | + printf ("i386-sequent-ptx1\n"); exit (0); | |
| 1554 | + } | |
| 1555 | + printf ("i386-sequent-ptx\n"); exit (0); | |
| 1420 | 1556 | #endif |
| 1421 | 1557 | |
| 1422 | 1558 | #if defined (vax) |
| 1423 | -# if !defined (ultrix) | |
| 1424 | -# include <sys/param.h> | |
| 1425 | -# if defined (BSD) | |
| 1426 | -# if BSD == 43 | |
| 1427 | - printf ("vax-dec-bsd4.3\n"); exit (0); | |
| 1428 | -# else | |
| 1429 | -# if BSD == 199006 | |
| 1430 | - printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
| 1431 | -# else | |
| 1432 | - printf ("vax-dec-bsd\n"); exit (0); | |
| 1433 | -# endif | |
| 1434 | -# endif | |
| 1435 | -# else | |
| 1436 | - printf ("vax-dec-bsd\n"); exit (0); | |
| 1437 | -# endif | |
| 1438 | -# else | |
| 1439 | - printf ("vax-dec-ultrix\n"); exit (0); | |
| 1440 | -# endif | |
| 1559 | +#if !defined (ultrix) | |
| 1560 | +#include <sys/param.h> | |
| 1561 | +#if defined (BSD) | |
| 1562 | +#if BSD == 43 | |
| 1563 | + printf ("vax-dec-bsd4.3\n"); exit (0); | |
| 1564 | +#else | |
| 1565 | +#if BSD == 199006 | |
| 1566 | + printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
| 1567 | +#else | |
| 1568 | + printf ("vax-dec-bsd\n"); exit (0); | |
| 1569 | +#endif | |
| 1570 | +#endif | |
| 1571 | +#else | |
| 1572 | + printf ("vax-dec-bsd\n"); exit (0); | |
| 1573 | +#endif | |
| 1574 | +#else | |
| 1575 | +#if defined(_SIZE_T_) || defined(SIGLOST) | |
| 1576 | + struct utsname un; | |
| 1577 | + uname (&un); | |
| 1578 | + printf ("vax-dec-ultrix%s\n", un.release); exit (0); | |
| 1579 | +#else | |
| 1580 | + printf ("vax-dec-ultrix\n"); exit (0); | |
| 1581 | +#endif | |
| 1582 | +#endif | |
| 1583 | +#endif | |
| 1584 | +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
| 1585 | +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
| 1586 | +#if defined(_SIZE_T_) || defined(SIGLOST) | |
| 1587 | + struct utsname *un; | |
| 1588 | + uname (&un); | |
| 1589 | + printf ("mips-dec-ultrix%s\n", un.release); exit (0); | |
| 1590 | +#else | |
| 1591 | + printf ("mips-dec-ultrix\n"); exit (0); | |
| 1592 | +#endif | |
| 1593 | +#endif | |
| 1441 | 1594 | #endif |
| 1442 | 1595 | |
| 1443 | 1596 | #if defined (alliant) && defined (i860) |
| ... | ... | @@ -1448,54 +1601,38 @@ main () |
| 1448 | 1601 | } |
| 1449 | 1602 | EOF |
| 1450 | 1603 | |
| 1451 | -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
| 1604 | +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
| 1452 | 1605 | { echo "$SYSTEM_NAME"; exit; } |
| 1453 | 1606 | |
| 1454 | 1607 | # Apollos put the system type in the environment. |
| 1608 | +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } | |
| 1455 | 1609 | |
| 1456 | -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } | |
| 1610 | +echo "$0: unable to guess system type" >&2 | |
| 1457 | 1611 | |
| 1458 | -# Convex versions that predate uname can use getsysinfo(1) | |
| 1612 | +case "$UNAME_MACHINE:$UNAME_SYSTEM" in | |
| 1613 | + mips:Linux | mips64:Linux) | |
| 1614 | + # If we got here on MIPS GNU/Linux, output extra information. | |
| 1615 | + cat >&2 <<EOF | |
| 1459 | 1616 | |
| 1460 | -if [ -x /usr/convex/getsysinfo ] | |
| 1461 | -then | |
| 1462 | - case `getsysinfo -f cpu_type` in | |
| 1463 | - c1*) | |
| 1464 | - echo c1-convex-bsd | |
| 1465 | - exit ;; | |
| 1466 | - c2*) | |
| 1467 | - if getsysinfo -f scalar_acc | |
| 1468 | - then echo c32-convex-bsd | |
| 1469 | - else echo c2-convex-bsd | |
| 1470 | - fi | |
| 1471 | - exit ;; | |
| 1472 | - c34*) | |
| 1473 | - echo c34-convex-bsd | |
| 1474 | - exit ;; | |
| 1475 | - c38*) | |
| 1476 | - echo c38-convex-bsd | |
| 1477 | - exit ;; | |
| 1478 | - c4*) | |
| 1479 | - echo c4-convex-bsd | |
| 1480 | - exit ;; | |
| 1481 | - esac | |
| 1482 | -fi | |
| 1617 | +NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize | |
| 1618 | +the system type. Please install a C compiler and try again. | |
| 1619 | +EOF | |
| 1620 | + ;; | |
| 1621 | +esac | |
| 1483 | 1622 | |
| 1484 | 1623 | cat >&2 <<EOF |
| 1485 | -$0: unable to guess system type | |
| 1486 | 1624 | |
| 1487 | -This script, last modified $timestamp, has failed to recognize | |
| 1488 | -the operating system you are using. It is advised that you | |
| 1489 | -download the most up to date version of the config scripts from | |
| 1625 | +This script (version $timestamp), has failed to recognize the | |
| 1626 | +operating system you are using. If your script is old, overwrite *all* | |
| 1627 | +copies of config.guess and config.sub with the latest versions from: | |
| 1490 | 1628 | |
| 1491 | - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | |
| 1629 | + https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
| 1492 | 1630 | and |
| 1493 | - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | |
| 1631 | + https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
| 1494 | 1632 | |
| 1495 | -If the version you run ($0) is already up to date, please | |
| 1496 | -send the following data and any information you think might be | |
| 1497 | -pertinent to <config-patches@gnu.org> in order to provide the needed | |
| 1498 | -information to handle your system. | |
| 1633 | +If $0 has already been updated, send the following data and any | |
| 1634 | +information you think might be pertinent to config-patches@gnu.org to | |
| 1635 | +provide the necessary information to handle your system. | |
| 1499 | 1636 | |
| 1500 | 1637 | config.guess timestamp = $timestamp |
| 1501 | 1638 | |
| ... | ... | @@ -1514,16 +1651,16 @@ hostinfo = `(hostinfo) 2>/dev/null` |
| 1514 | 1651 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
| 1515 | 1652 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
| 1516 | 1653 | |
| 1517 | -UNAME_MACHINE = ${UNAME_MACHINE} | |
| 1518 | -UNAME_RELEASE = ${UNAME_RELEASE} | |
| 1519 | -UNAME_SYSTEM = ${UNAME_SYSTEM} | |
| 1520 | -UNAME_VERSION = ${UNAME_VERSION} | |
| 1654 | +UNAME_MACHINE = "$UNAME_MACHINE" | |
| 1655 | +UNAME_RELEASE = "$UNAME_RELEASE" | |
| 1656 | +UNAME_SYSTEM = "$UNAME_SYSTEM" | |
| 1657 | +UNAME_VERSION = "$UNAME_VERSION" | |
| 1521 | 1658 | EOF |
| 1522 | 1659 | |
| 1523 | 1660 | exit 1 |
| 1524 | 1661 | |
| 1525 | 1662 | # Local variables: |
| 1526 | -# eval: (add-hook 'write-file-hooks 'time-stamp) | |
| 1663 | +# eval: (add-hook 'before-save-hook 'time-stamp) | |
| 1527 | 1664 | # time-stamp-start: "timestamp='" |
| 1528 | 1665 | # time-stamp-format: "%:y-%02m-%02d" |
| 1529 | 1666 | # time-stamp-end: "'" | ... | ... |
config.sub
100755 → 100644
| 1 | 1 | #! /bin/sh |
| 2 | 2 | # Configuration validation subroutine script. |
| 3 | -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
| 4 | -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | |
| 5 | -# 2011, 2012 Free Software Foundation, Inc. | |
| 3 | +# Copyright 1992-2020 Free Software Foundation, Inc. | |
| 6 | 4 | |
| 7 | -timestamp='2012-02-10' | |
| 5 | +timestamp='2020-01-01' | |
| 8 | 6 | |
| 9 | -# This file is (in principle) common to ALL GNU software. | |
| 10 | -# The presence of a machine in this file suggests that SOME GNU software | |
| 11 | -# can handle that machine. It does not imply ALL GNU software can. | |
| 12 | -# | |
| 13 | -# This file is free software; you can redistribute it and/or modify | |
| 14 | -# it under the terms of the GNU General Public License as published by | |
| 15 | -# the Free Software Foundation; either version 2 of the License, or | |
| 7 | +# This file is free software; you can redistribute it and/or modify it | |
| 8 | +# under the terms of the GNU General Public License as published by | |
| 9 | +# the Free Software Foundation; either version 3 of the License, or | |
| 16 | 10 | # (at your option) any later version. |
| 17 | 11 | # |
| 18 | -# This program is distributed in the hope that it will be useful, | |
| 19 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 | -# GNU General Public License for more details. | |
| 12 | +# This program is distributed in the hope that it will be useful, but | |
| 13 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 15 | +# General Public License for more details. | |
| 22 | 16 | # |
| 23 | 17 | # You should have received a copy of the GNU General Public License |
| 24 | -# 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/>. | |
| 25 | 19 | # |
| 26 | 20 | # As a special exception to the GNU General Public License, if you |
| 27 | 21 | # distribute this file as part of a program that contains a |
| 28 | 22 | # configuration script generated by Autoconf, you may include it under |
| 29 | -# the same distribution terms that you use for the rest of that program. | |
| 23 | +# the same distribution terms that you use for the rest of that | |
| 24 | +# program. This Exception is an additional permission under section 7 | |
| 25 | +# of the GNU General Public License, version 3 ("GPLv3"). | |
| 30 | 26 | |
| 31 | 27 | |
| 32 | -# Please send patches to <config-patches@gnu.org>. Submit a context | |
| 33 | -# diff and a properly formatted GNU ChangeLog entry. | |
| 28 | +# Please send patches to <config-patches@gnu.org>. | |
| 34 | 29 | # |
| 35 | 30 | # Configuration subroutine to validate and canonicalize a configuration type. |
| 36 | 31 | # Supply the specified configuration type as an argument. |
| ... | ... | @@ -38,7 +33,7 @@ timestamp='2012-02-10' |
| 38 | 33 | # Otherwise, we print the canonical config type on stdout and succeed. |
| 39 | 34 | |
| 40 | 35 | # You can get the latest version of this script from: |
| 41 | -# 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 | |
| 42 | 37 | |
| 43 | 38 | # This file is supposed to be the same for all GNU packages |
| 44 | 39 | # and recognize all the CPU types, system types and aliases |
| ... | ... | @@ -58,12 +53,11 @@ timestamp='2012-02-10' |
| 58 | 53 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 59 | 54 | |
| 60 | 55 | usage="\ |
| 61 | -Usage: $0 [OPTION] CPU-MFR-OPSYS | |
| 62 | - $0 [OPTION] ALIAS | |
| 56 | +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS | |
| 63 | 57 | |
| 64 | 58 | Canonicalize a configuration name. |
| 65 | 59 | |
| 66 | -Operation modes: | |
| 60 | +Options: | |
| 67 | 61 | -h, --help print this help, then exit |
| 68 | 62 | -t, --time-stamp print date of last modification, then exit |
| 69 | 63 | -v, --version print version number, then exit |
| ... | ... | @@ -73,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>." |
| 73 | 67 | version="\ |
| 74 | 68 | GNU config.sub ($timestamp) |
| 75 | 69 | |
| 76 | -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | |
| 77 | -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | |
| 78 | -Free Software Foundation, Inc. | |
| 70 | +Copyright 1992-2020 Free Software Foundation, Inc. | |
| 79 | 71 | |
| 80 | 72 | This is free software; see the source for copying conditions. There is NO |
| 81 | 73 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| ... | ... | @@ -97,12 +89,12 @@ while test $# -gt 0 ; do |
| 97 | 89 | - ) # Use stdin as input. |
| 98 | 90 | break ;; |
| 99 | 91 | -* ) |
| 100 | - echo "$me: invalid option $1$help" | |
| 92 | + echo "$me: invalid option $1$help" >&2 | |
| 101 | 93 | exit 1 ;; |
| 102 | 94 | |
| 103 | 95 | *local*) |
| 104 | 96 | # First pass through any local machine types. |
| 105 | - echo $1 | |
| 97 | + echo "$1" | |
| 106 | 98 | exit ;; |
| 107 | 99 | |
| 108 | 100 | * ) |
| ... | ... | @@ -118,1190 +110,1164 @@ case $# in |
| 118 | 110 | exit 1;; |
| 119 | 111 | esac |
| 120 | 112 | |
| 121 | -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | |
| 122 | -# Here we must recognize all the valid KERNEL-OS combinations. | |
| 123 | -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
| 124 | -case $maybe_os in | |
| 125 | - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ | |
| 126 | - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ | |
| 127 | - knetbsd*-gnu* | netbsd*-gnu* | \ | |
| 128 | - kopensolaris*-gnu* | \ | |
| 129 | - storm-chaos* | os2-emx* | rtmk-nova*) | |
| 130 | - os=-$maybe_os | |
| 131 | - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
| 132 | - ;; | |
| 133 | - android-linux) | |
| 134 | - os=-linux-android | |
| 135 | - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown | |
| 136 | - ;; | |
| 137 | - *) | |
| 138 | - basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
| 139 | - if [ $basic_machine != $1 ] | |
| 140 | - then os=`echo $1 | sed 's/.*-/-/'` | |
| 141 | - else os=; fi | |
| 142 | - ;; | |
| 143 | -esac | |
| 113 | +# Split fields of configuration type | |
| 114 | +# shellcheck disable=SC2162 | |
| 115 | +IFS="-" read field1 field2 field3 field4 <<EOF | |
| 116 | +$1 | |
| 117 | +EOF | |
| 144 | 118 | |
| 145 | -### Let's recognize common machines as not being operating systems so | |
| 146 | -### that things like config.sub decstation-3100 work. We also | |
| 147 | -### recognize some manufacturers as not being operating systems, so we | |
| 148 | -### can provide default operating systems below. | |
| 149 | -case $os in | |
| 150 | - -sun*os*) | |
| 151 | - # Prevent following clause from handling this invalid input. | |
| 152 | - ;; | |
| 153 | - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
| 154 | - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
| 155 | - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
| 156 | - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
| 157 | - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
| 158 | - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
| 159 | - -apple | -axis | -knuth | -cray | -microblaze) | |
| 160 | - os= | |
| 161 | - basic_machine=$1 | |
| 162 | - ;; | |
| 163 | - -bluegene*) | |
| 164 | - os=-cnk | |
| 165 | - ;; | |
| 166 | - -sim | -cisco | -oki | -wec | -winbond) | |
| 167 | - os= | |
| 168 | - basic_machine=$1 | |
| 169 | - ;; | |
| 170 | - -scout) | |
| 171 | - ;; | |
| 172 | - -wrs) | |
| 173 | - os=-vxworks | |
| 174 | - basic_machine=$1 | |
| 175 | - ;; | |
| 176 | - -chorusos*) | |
| 177 | - os=-chorusos | |
| 178 | - basic_machine=$1 | |
| 179 | - ;; | |
| 180 | - -chorusrdb) | |
| 181 | - os=-chorusrdb | |
| 182 | - basic_machine=$1 | |
| 183 | - ;; | |
| 184 | - -hiux*) | |
| 185 | - os=-hiuxwe2 | |
| 186 | - ;; | |
| 187 | - -sco6) | |
| 188 | - os=-sco5v6 | |
| 189 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 190 | - ;; | |
| 191 | - -sco5) | |
| 192 | - os=-sco3.2v5 | |
| 193 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 194 | - ;; | |
| 195 | - -sco4) | |
| 196 | - os=-sco3.2v4 | |
| 197 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 198 | - ;; | |
| 199 | - -sco3.2.[4-9]*) | |
| 200 | - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
| 201 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 202 | - ;; | |
| 203 | - -sco3.2v[4-9]*) | |
| 204 | - # Don't forget version if it is 3.2v4 or newer. | |
| 205 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 206 | - ;; | |
| 207 | - -sco5v6*) | |
| 208 | - # Don't forget version if it is 3.2v4 or newer. | |
| 209 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 210 | - ;; | |
| 211 | - -sco*) | |
| 212 | - os=-sco3.2v2 | |
| 213 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 214 | - ;; | |
| 215 | - -udk*) | |
| 216 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 217 | - ;; | |
| 218 | - -isc) | |
| 219 | - os=-isc2.2 | |
| 220 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 221 | - ;; | |
| 222 | - -clix*) | |
| 223 | - basic_machine=clipper-intergraph | |
| 224 | - ;; | |
| 225 | - -isc*) | |
| 226 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 227 | - ;; | |
| 228 | - -lynx*) | |
| 229 | - os=-lynxos | |
| 119 | +# Separate into logical components for further validation | |
| 120 | +case $1 in | |
| 121 | + *-*-*-*-*) | |
| 122 | + echo Invalid configuration \`"$1"\': more than four components >&2 | |
| 123 | + exit 1 | |
| 230 | 124 | ;; |
| 231 | - -ptx*) | |
| 232 | - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
| 125 | + *-*-*-*) | |
| 126 | + basic_machine=$field1-$field2 | |
| 127 | + os=$field3-$field4 | |
| 233 | 128 | ;; |
| 234 | - -windowsnt*) | |
| 235 | - os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
| 129 | + *-*-*) | |
| 130 | + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two | |
| 131 | + # parts | |
| 132 | + maybe_os=$field2-$field3 | |
| 133 | + case $maybe_os in | |
| 134 | + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ | |
| 135 | + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ | |
| 136 | + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | |
| 137 | + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | |
| 138 | + | storm-chaos* | os2-emx* | rtmk-nova*) | |
| 139 | + basic_machine=$field1 | |
| 140 | + os=$maybe_os | |
| 141 | + ;; | |
| 142 | + android-linux) | |
| 143 | + basic_machine=$field1-unknown | |
| 144 | + os=linux-android | |
| 145 | + ;; | |
| 146 | + *) | |
| 147 | + basic_machine=$field1-$field2 | |
| 148 | + os=$field3 | |
| 149 | + ;; | |
| 150 | + esac | |
| 236 | 151 | ;; |
| 237 | - -psos*) | |
| 238 | - os=-psos | |
| 152 | + *-*) | |
| 153 | + # A lone config we happen to match not fitting any pattern | |
| 154 | + case $field1-$field2 in | |
| 155 | + decstation-3100) | |
| 156 | + basic_machine=mips-dec | |
| 157 | + os= | |
| 158 | + ;; | |
| 159 | + *-*) | |
| 160 | + # Second component is usually, but not always the OS | |
| 161 | + case $field2 in | |
| 162 | + # Prevent following clause from handling this valid os | |
| 163 | + sun*os*) | |
| 164 | + basic_machine=$field1 | |
| 165 | + os=$field2 | |
| 166 | + ;; | |
| 167 | + # Manufacturers | |
| 168 | + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | |
| 169 | + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | |
| 170 | + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | |
| 171 | + | convergent* | ncr* | news | 32* | 3600* | 3100* \ | |
| 172 | + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | |
| 173 | + | ultra | tti* | harris | dolphin | highlevel | gould \ | |
| 174 | + | cbm | ns | masscomp | apple | axis | knuth | cray \ | |
| 175 | + | microblaze* | sim | cisco \ | |
| 176 | + | oki | wec | wrs | winbond) | |
| 177 | + basic_machine=$field1-$field2 | |
| 178 | + os= | |
| 179 | + ;; | |
| 180 | + *) | |
| 181 | + basic_machine=$field1 | |
| 182 | + os=$field2 | |
| 183 | + ;; | |
| 184 | + esac | |
| 185 | + ;; | |
| 186 | + esac | |
| 239 | 187 | ;; |
| 240 | - -mint | -mint[0-9]*) | |
| 241 | - basic_machine=m68k-atari | |
| 242 | - os=-mint | |
| 188 | + *) | |
| 189 | + # Convert single-component short-hands not valid as part of | |
| 190 | + # multi-component configurations. | |
| 191 | + case $field1 in | |
| 192 | + 386bsd) | |
| 193 | + basic_machine=i386-pc | |
| 194 | + os=bsd | |
| 195 | + ;; | |
| 196 | + a29khif) | |
| 197 | + basic_machine=a29k-amd | |
| 198 | + os=udi | |
| 199 | + ;; | |
| 200 | + adobe68k) | |
| 201 | + basic_machine=m68010-adobe | |
| 202 | + os=scout | |
| 203 | + ;; | |
| 204 | + alliant) | |
| 205 | + basic_machine=fx80-alliant | |
| 206 | + os= | |
| 207 | + ;; | |
| 208 | + altos | altos3068) | |
| 209 | + basic_machine=m68k-altos | |
| 210 | + os= | |
| 211 | + ;; | |
| 212 | + am29k) | |
| 213 | + basic_machine=a29k-none | |
| 214 | + os=bsd | |
| 215 | + ;; | |
| 216 | + amdahl) | |
| 217 | + basic_machine=580-amdahl | |
| 218 | + os=sysv | |
| 219 | + ;; | |
| 220 | + amiga) | |
| 221 | + basic_machine=m68k-unknown | |
| 222 | + os= | |
| 223 | + ;; | |
| 224 | + amigaos | amigados) | |
| 225 | + basic_machine=m68k-unknown | |
| 226 | + os=amigaos | |
| 227 | + ;; | |
| 228 | + amigaunix | amix) | |
| 229 | + basic_machine=m68k-unknown | |
| 230 | + os=sysv4 | |
| 231 | + ;; | |
| 232 | + apollo68) | |
| 233 | + basic_machine=m68k-apollo | |
| 234 | + os=sysv | |
| 235 | + ;; | |
| 236 | + apollo68bsd) | |
| 237 | + basic_machine=m68k-apollo | |
| 238 | + os=bsd | |
| 239 | + ;; | |
| 240 | + aros) | |
| 241 | + basic_machine=i386-pc | |
| 242 | + os=aros | |
| 243 | + ;; | |
| 244 | + aux) | |
| 245 | + basic_machine=m68k-apple | |
| 246 | + os=aux | |
| 247 | + ;; | |
| 248 | + balance) | |
| 249 | + basic_machine=ns32k-sequent | |
| 250 | + os=dynix | |
| 251 | + ;; | |
| 252 | + blackfin) | |
| 253 | + basic_machine=bfin-unknown | |
| 254 | + os=linux | |
| 255 | + ;; | |
| 256 | + cegcc) | |
| 257 | + basic_machine=arm-unknown | |
| 258 | + os=cegcc | |
| 259 | + ;; | |
| 260 | + convex-c1) | |
| 261 | + basic_machine=c1-convex | |
| 262 | + os=bsd | |
| 263 | + ;; | |
| 264 | + convex-c2) | |
| 265 | + basic_machine=c2-convex | |
| 266 | + os=bsd | |
| 267 | + ;; | |
| 268 | + convex-c32) | |
| 269 | + basic_machine=c32-convex | |
| 270 | + os=bsd | |
| 271 | + ;; | |
| 272 | + convex-c34) | |
| 273 | + basic_machine=c34-convex | |
| 274 | + os=bsd | |
| 275 | + ;; | |
| 276 | + convex-c38) | |
| 277 | + basic_machine=c38-convex | |
| 278 | + os=bsd | |
| 279 | + ;; | |
| 280 | + cray) | |
| 281 | + basic_machine=j90-cray | |
| 282 | + os=unicos | |
| 283 | + ;; | |
| 284 | + crds | unos) | |
| 285 | + basic_machine=m68k-crds | |
| 286 | + os= | |
| 287 | + ;; | |
| 288 | + da30) | |
| 289 | + basic_machine=m68k-da30 | |
| 290 | + os= | |
| 291 | + ;; | |
| 292 | + decstation | pmax | pmin | dec3100 | decstatn) | |
| 293 | + basic_machine=mips-dec | |
| 294 | + os= | |
| 295 | + ;; | |
| 296 | + delta88) | |
| 297 | + basic_machine=m88k-motorola | |
| 298 | + os=sysv3 | |
| 299 | + ;; | |
| 300 | + dicos) | |
| 301 | + basic_machine=i686-pc | |
| 302 | + os=dicos | |
| 303 | + ;; | |
| 304 | + djgpp) | |
| 305 | + basic_machine=i586-pc | |
| 306 | + os=msdosdjgpp | |
| 307 | + ;; | |
| 308 | + ebmon29k) | |
| 309 | + basic_machine=a29k-amd | |
| 310 | + os=ebmon | |
| 311 | + ;; | |
| 312 | + es1800 | OSE68k | ose68k | ose | OSE) | |
| 313 | + basic_machine=m68k-ericsson | |
| 314 | + os=ose | |
| 315 | + ;; | |
| 316 | + gmicro) | |
| 317 | + basic_machine=tron-gmicro | |
| 318 | + os=sysv | |
| 319 | + ;; | |
| 320 | + go32) | |
| 321 | + basic_machine=i386-pc | |
| 322 | + os=go32 | |
| 323 | + ;; | |
| 324 | + h8300hms) | |
| 325 | + basic_machine=h8300-hitachi | |
| 326 | + os=hms | |
| 327 | + ;; | |
| 328 | + h8300xray) | |
| 329 | + basic_machine=h8300-hitachi | |
| 330 | + os=xray | |
| 331 | + ;; | |
| 332 | + h8500hms) | |
| 333 | + basic_machine=h8500-hitachi | |
| 334 | + os=hms | |
| 335 | + ;; | |
| 336 | + harris) | |
| 337 | + basic_machine=m88k-harris | |
| 338 | + os=sysv3 | |
| 339 | + ;; | |
| 340 | + hp300 | hp300hpux) | |
| 341 | + basic_machine=m68k-hp | |
| 342 | + os=hpux | |
| 343 | + ;; | |
| 344 | + hp300bsd) | |
| 345 | + basic_machine=m68k-hp | |
| 346 | + os=bsd | |
| 347 | + ;; | |
| 348 | + hppaosf) | |
| 349 | + basic_machine=hppa1.1-hp | |
| 350 | + os=osf | |
| 351 | + ;; | |
| 352 | + hppro) | |
| 353 | + basic_machine=hppa1.1-hp | |
| 354 | + os=proelf | |
| 355 | + ;; | |
| 356 | + i386mach) | |
| 357 | + basic_machine=i386-mach | |
| 358 | + os=mach | |
| 359 | + ;; | |
| 360 | + isi68 | isi) | |
| 361 | + basic_machine=m68k-isi | |
| 362 | + os=sysv | |
| 363 | + ;; | |
| 364 | + m68knommu) | |
| 365 | + basic_machine=m68k-unknown | |
| 366 | + os=linux | |
| 367 | + ;; | |
| 368 | + magnum | m3230) | |
| 369 | + basic_machine=mips-mips | |
| 370 | + os=sysv | |
| 371 | + ;; | |
| 372 | + merlin) | |
| 373 | + basic_machine=ns32k-utek | |
| 374 | + os=sysv | |
| 375 | + ;; | |
| 376 | + mingw64) | |
| 377 | + basic_machine=x86_64-pc | |
| 378 | + os=mingw64 | |
| 379 | + ;; | |
| 380 | + mingw32) | |
| 381 | + basic_machine=i686-pc | |
| 382 | + os=mingw32 | |
| 383 | + ;; | |
| 384 | + mingw32ce) | |
| 385 | + basic_machine=arm-unknown | |
| 386 | + os=mingw32ce | |
| 387 | + ;; | |
| 388 | + monitor) | |
| 389 | + basic_machine=m68k-rom68k | |
| 390 | + os=coff | |
| 391 | + ;; | |
| 392 | + morphos) | |
| 393 | + basic_machine=powerpc-unknown | |
| 394 | + os=morphos | |
| 395 | + ;; | |
| 396 | + moxiebox) | |
| 397 | + basic_machine=moxie-unknown | |
| 398 | + os=moxiebox | |
| 399 | + ;; | |
| 400 | + msdos) | |
| 401 | + basic_machine=i386-pc | |
| 402 | + os=msdos | |
| 403 | + ;; | |
| 404 | + msys) | |
| 405 | + basic_machine=i686-pc | |
| 406 | + os=msys | |
| 407 | + ;; | |
| 408 | + mvs) | |
| 409 | + basic_machine=i370-ibm | |
| 410 | + os=mvs | |
| 411 | + ;; | |
| 412 | + nacl) | |
| 413 | + basic_machine=le32-unknown | |
| 414 | + os=nacl | |
| 415 | + ;; | |
| 416 | + ncr3000) | |
| 417 | + basic_machine=i486-ncr | |
| 418 | + os=sysv4 | |
| 419 | + ;; | |
| 420 | + netbsd386) | |
| 421 | + basic_machine=i386-pc | |
| 422 | + os=netbsd | |
| 423 | + ;; | |
| 424 | + netwinder) | |
| 425 | + basic_machine=armv4l-rebel | |
| 426 | + os=linux | |
| 427 | + ;; | |
| 428 | + news | news700 | news800 | news900) | |
| 429 | + basic_machine=m68k-sony | |
| 430 | + os=newsos | |
| 431 | + ;; | |
| 432 | + news1000) | |
| 433 | + basic_machine=m68030-sony | |
| 434 | + os=newsos | |
| 435 | + ;; | |
| 436 | + necv70) | |
| 437 | + basic_machine=v70-nec | |
| 438 | + os=sysv | |
| 439 | + ;; | |
| 440 | + nh3000) | |
| 441 | + basic_machine=m68k-harris | |
| 442 | + os=cxux | |
| 443 | + ;; | |
| 444 | + nh[45]000) | |
| 445 | + basic_machine=m88k-harris | |
| 446 | + os=cxux | |
| 447 | + ;; | |
| 448 | + nindy960) | |
| 449 | + basic_machine=i960-intel | |
| 450 | + os=nindy | |
| 451 | + ;; | |
| 452 | + mon960) | |
| 453 | + basic_machine=i960-intel | |
| 454 | + os=mon960 | |
| 455 | + ;; | |
| 456 | + nonstopux) | |
| 457 | + basic_machine=mips-compaq | |
| 458 | + os=nonstopux | |
| 459 | + ;; | |
| 460 | + os400) | |
| 461 | + basic_machine=powerpc-ibm | |
| 462 | + os=os400 | |
| 463 | + ;; | |
| 464 | + OSE68000 | ose68000) | |
| 465 | + basic_machine=m68000-ericsson | |
| 466 | + os=ose | |
| 467 | + ;; | |
| 468 | + os68k) | |
| 469 | + basic_machine=m68k-none | |
| 470 | + os=os68k | |
| 471 | + ;; | |
| 472 | + paragon) | |
| 473 | + basic_machine=i860-intel | |
| 474 | + os=osf | |
| 475 | + ;; | |
| 476 | + parisc) | |
| 477 | + basic_machine=hppa-unknown | |
| 478 | + os=linux | |
| 479 | + ;; | |
| 480 | + pw32) | |
| 481 | + basic_machine=i586-unknown | |
| 482 | + os=pw32 | |
| 483 | + ;; | |
| 484 | + rdos | rdos64) | |
| 485 | + basic_machine=x86_64-pc | |
| 486 | + os=rdos | |
| 487 | + ;; | |
| 488 | + rdos32) | |
| 489 | + basic_machine=i386-pc | |
| 490 | + os=rdos | |
| 491 | + ;; | |
| 492 | + rom68k) | |
| 493 | + basic_machine=m68k-rom68k | |
| 494 | + os=coff | |
| 495 | + ;; | |
| 496 | + sa29200) | |
| 497 | + basic_machine=a29k-amd | |
| 498 | + os=udi | |
| 499 | + ;; | |
| 500 | + sei) | |
| 501 | + basic_machine=mips-sei | |
| 502 | + os=seiux | |
| 503 | + ;; | |
| 504 | + sequent) | |
| 505 | + basic_machine=i386-sequent | |
| 506 | + os= | |
| 507 | + ;; | |
| 508 | + sps7) | |
| 509 | + basic_machine=m68k-bull | |
| 510 | + os=sysv2 | |
| 511 | + ;; | |
| 512 | + st2000) | |
| 513 | + basic_machine=m68k-tandem | |
| 514 | + os= | |
| 515 | + ;; | |
| 516 | + stratus) | |
| 517 | + basic_machine=i860-stratus | |
| 518 | + os=sysv4 | |
| 519 | + ;; | |
| 520 | + sun2) | |
| 521 | + basic_machine=m68000-sun | |
| 522 | + os= | |
| 523 | + ;; | |
| 524 | + sun2os3) | |
| 525 | + basic_machine=m68000-sun | |
| 526 | + os=sunos3 | |
| 527 | + ;; | |
| 528 | + sun2os4) | |
| 529 | + basic_machine=m68000-sun | |
| 530 | + os=sunos4 | |
| 531 | + ;; | |
| 532 | + sun3) | |
| 533 | + basic_machine=m68k-sun | |
| 534 | + os= | |
| 535 | + ;; | |
| 536 | + sun3os3) | |
| 537 | + basic_machine=m68k-sun | |
| 538 | + os=sunos3 | |
| 539 | + ;; | |
| 540 | + sun3os4) | |
| 541 | + basic_machine=m68k-sun | |
| 542 | + os=sunos4 | |
| 543 | + ;; | |
| 544 | + sun4) | |
| 545 | + basic_machine=sparc-sun | |
| 546 | + os= | |
| 547 | + ;; | |
| 548 | + sun4os3) | |
| 549 | + basic_machine=sparc-sun | |
| 550 | + os=sunos3 | |
| 551 | + ;; | |
| 552 | + sun4os4) | |
| 553 | + basic_machine=sparc-sun | |
| 554 | + os=sunos4 | |
| 555 | + ;; | |
| 556 | + sun4sol2) | |
| 557 | + basic_machine=sparc-sun | |
| 558 | + os=solaris2 | |
| 559 | + ;; | |
| 560 | + sun386 | sun386i | roadrunner) | |
| 561 | + basic_machine=i386-sun | |
| 562 | + os= | |
| 563 | + ;; | |
| 564 | + sv1) | |
| 565 | + basic_machine=sv1-cray | |
| 566 | + os=unicos | |
| 567 | + ;; | |
| 568 | + symmetry) | |
| 569 | + basic_machine=i386-sequent | |
| 570 | + os=dynix | |
| 571 | + ;; | |
| 572 | + t3e) | |
| 573 | + basic_machine=alphaev5-cray | |
| 574 | + os=unicos | |
| 575 | + ;; | |
| 576 | + t90) | |
| 577 | + basic_machine=t90-cray | |
| 578 | + os=unicos | |
| 579 | + ;; | |
| 580 | + toad1) | |
| 581 | + basic_machine=pdp10-xkl | |
| 582 | + os=tops20 | |
| 583 | + ;; | |
| 584 | + tpf) | |
| 585 | + basic_machine=s390x-ibm | |
| 586 | + os=tpf | |
| 587 | + ;; | |
| 588 | + udi29k) | |
| 589 | + basic_machine=a29k-amd | |
| 590 | + os=udi | |
| 591 | + ;; | |
| 592 | + ultra3) | |
| 593 | + basic_machine=a29k-nyu | |
| 594 | + os=sym1 | |
| 595 | + ;; | |
| 596 | + v810 | necv810) | |
| 597 | + basic_machine=v810-nec | |
| 598 | + os=none | |
| 599 | + ;; | |
| 600 | + vaxv) | |
| 601 | + basic_machine=vax-dec | |
| 602 | + os=sysv | |
| 603 | + ;; | |
| 604 | + vms) | |
| 605 | + basic_machine=vax-dec | |
| 606 | + os=vms | |
| 607 | + ;; | |
| 608 | + vsta) | |
| 609 | + basic_machine=i386-pc | |
| 610 | + os=vsta | |
| 611 | + ;; | |
| 612 | + vxworks960) | |
| 613 | + basic_machine=i960-wrs | |
| 614 | + os=vxworks | |
| 615 | + ;; | |
| 616 | + vxworks68) | |
| 617 | + basic_machine=m68k-wrs | |
| 618 | + os=vxworks | |
| 619 | + ;; | |
| 620 | + vxworks29k) | |
| 621 | + basic_machine=a29k-wrs | |
| 622 | + os=vxworks | |
| 623 | + ;; | |
| 624 | + xbox) | |
| 625 | + basic_machine=i686-pc | |
| 626 | + os=mingw32 | |
| 627 | + ;; | |
| 628 | + ymp) | |
| 629 | + basic_machine=ymp-cray | |
| 630 | + os=unicos | |
| 631 | + ;; | |
| 632 | + *) | |
| 633 | + basic_machine=$1 | |
| 634 | + os= | |
| 635 | + ;; | |
| 636 | + esac | |
| 243 | 637 | ;; |
| 244 | 638 | esac |
| 245 | 639 | |
| 246 | -# Decode aliases for certain CPU-COMPANY combinations. | |
| 640 | +# Decode 1-component or ad-hoc basic machines | |
| 247 | 641 | case $basic_machine in |
| 248 | - # Recognize the basic CPU types without company name. | |
| 249 | - # Some are omitted here because they have special meanings below. | |
| 250 | - 1750a | 580 \ | |
| 251 | - | a29k \ | |
| 252 | - | aarch64 | aarch64_be \ | |
| 253 | - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
| 254 | - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
| 255 | - | am33_2.0 \ | |
| 256 | - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | |
| 257 | - | be32 | be64 \ | |
| 258 | - | bfin \ | |
| 259 | - | c4x | clipper \ | |
| 260 | - | d10v | d30v | dlx | dsp16xx \ | |
| 261 | - | epiphany \ | |
| 262 | - | fido | fr30 | frv \ | |
| 263 | - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
| 264 | - | hexagon \ | |
| 265 | - | i370 | i860 | i960 | ia64 \ | |
| 266 | - | ip2k | iq2000 \ | |
| 267 | - | le32 | le64 \ | |
| 268 | - | lm32 \ | |
| 269 | - | m32c | m32r | m32rle | m68000 | m68k | m88k \ | |
| 270 | - | maxq | mb | microblaze | mcore | mep | metag \ | |
| 271 | - | mips | mipsbe | mipseb | mipsel | mipsle \ | |
| 272 | - | mips16 \ | |
| 273 | - | mips64 | mips64el \ | |
| 274 | - | mips64octeon | mips64octeonel \ | |
| 275 | - | mips64orion | mips64orionel \ | |
| 276 | - | mips64r5900 | mips64r5900el \ | |
| 277 | - | mips64vr | mips64vrel \ | |
| 278 | - | mips64vr4100 | mips64vr4100el \ | |
| 279 | - | mips64vr4300 | mips64vr4300el \ | |
| 280 | - | mips64vr5000 | mips64vr5000el \ | |
| 281 | - | mips64vr5900 | mips64vr5900el \ | |
| 282 | - | mipsisa32 | mipsisa32el \ | |
| 283 | - | mipsisa32r2 | mipsisa32r2el \ | |
| 284 | - | mipsisa64 | mipsisa64el \ | |
| 285 | - | mipsisa64r2 | mipsisa64r2el \ | |
| 286 | - | mipsisa64sb1 | mipsisa64sb1el \ | |
| 287 | - | mipsisa64sr71k | mipsisa64sr71kel \ | |
| 288 | - | mipstx39 | mipstx39el \ | |
| 289 | - | mn10200 | mn10300 \ | |
| 290 | - | moxie \ | |
| 291 | - | mt \ | |
| 292 | - | msp430 \ | |
| 293 | - | nds32 | nds32le | nds32be \ | |
| 294 | - | nios | nios2 \ | |
| 295 | - | ns16k | ns32k \ | |
| 296 | - | open8 \ | |
| 297 | - | or32 \ | |
| 298 | - | pdp10 | pdp11 | pj | pjl \ | |
| 299 | - | powerpc | powerpc64 | powerpc64le | powerpcle \ | |
| 300 | - | pyramid \ | |
| 301 | - | rl78 | rx \ | |
| 302 | - | score \ | |
| 303 | - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | |
| 304 | - | sh64 | sh64le \ | |
| 305 | - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | |
| 306 | - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
| 307 | - | spu \ | |
| 308 | - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | |
| 309 | - | ubicom32 \ | |
| 310 | - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | |
| 311 | - | we32k \ | |
| 312 | - | x86 | xc16x | xstormy16 | xtensa \ | |
| 313 | - | z8k | z80) | |
| 314 | - basic_machine=$basic_machine-unknown | |
| 315 | - ;; | |
| 316 | - c54x) | |
| 317 | - basic_machine=tic54x-unknown | |
| 318 | - ;; | |
| 319 | - c55x) | |
| 320 | - basic_machine=tic55x-unknown | |
| 321 | - ;; | |
| 322 | - c6x) | |
| 323 | - basic_machine=tic6x-unknown | |
| 324 | - ;; | |
| 325 | - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) | |
| 326 | - basic_machine=$basic_machine-unknown | |
| 327 | - os=-none | |
| 328 | - ;; | |
| 329 | - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | |
| 330 | - ;; | |
| 331 | - ms1) | |
| 332 | - basic_machine=mt-unknown | |
| 642 | + # Here we handle the default manufacturer of certain CPU types. It is in | |
| 643 | + # some cases the only manufacturer, in others, it is the most popular. | |
| 644 | + w89k) | |
| 645 | + cpu=hppa1.1 | |
| 646 | + vendor=winbond | |
| 333 | 647 | ;; |
| 334 | - | |
| 335 | - strongarm | thumb | xscale) | |
| 336 | - basic_machine=arm-unknown | |
| 648 | + op50n) | |
| 649 | + cpu=hppa1.1 | |
| 650 | + vendor=oki | |
| 337 | 651 | ;; |
| 338 | - xgate) | |
| 339 | - basic_machine=$basic_machine-unknown | |
| 340 | - os=-none | |
| 652 | + op60c) | |
| 653 | + cpu=hppa1.1 | |
| 654 | + vendor=oki | |
| 341 | 655 | ;; |
| 342 | - xscaleeb) | |
| 343 | - basic_machine=armeb-unknown | |
| 656 | + ibm*) | |
| 657 | + cpu=i370 | |
| 658 | + vendor=ibm | |
| 344 | 659 | ;; |
| 345 | - | |
| 346 | - xscaleel) | |
| 347 | - basic_machine=armel-unknown | |
| 660 | + orion105) | |
| 661 | + cpu=clipper | |
| 662 | + vendor=highlevel | |
| 348 | 663 | ;; |
| 349 | - | |
| 350 | - # We use `pc' rather than `unknown' | |
| 351 | - # because (1) that's what they normally are, and | |
| 352 | - # (2) the word "unknown" tends to confuse beginning users. | |
| 353 | - i*86 | x86_64) | |
| 354 | - basic_machine=$basic_machine-pc | |
| 355 | - ;; | |
| 356 | - # Object if more than one company name word. | |
| 357 | - *-*-*) | |
| 358 | - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
| 359 | - exit 1 | |
| 664 | + mac | mpw | mac-mpw) | |
| 665 | + cpu=m68k | |
| 666 | + vendor=apple | |
| 360 | 667 | ;; |
| 361 | - # Recognize the basic CPU types with company name. | |
| 362 | - 580-* \ | |
| 363 | - | a29k-* \ | |
| 364 | - | aarch64-* | aarch64_be-* \ | |
| 365 | - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | |
| 366 | - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | |
| 367 | - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | |
| 368 | - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | |
| 369 | - | avr-* | avr32-* \ | |
| 370 | - | be32-* | be64-* \ | |
| 371 | - | bfin-* | bs2000-* \ | |
| 372 | - | c[123]* | c30-* | [cjt]90-* | c4x-* \ | |
| 373 | - | clipper-* | craynv-* | cydra-* \ | |
| 374 | - | d10v-* | d30v-* | dlx-* \ | |
| 375 | - | elxsi-* \ | |
| 376 | - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | |
| 377 | - | h8300-* | h8500-* \ | |
| 378 | - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | |
| 379 | - | hexagon-* \ | |
| 380 | - | i*86-* | i860-* | i960-* | ia64-* \ | |
| 381 | - | ip2k-* | iq2000-* \ | |
| 382 | - | le32-* | le64-* \ | |
| 383 | - | lm32-* \ | |
| 384 | - | m32c-* | m32r-* | m32rle-* \ | |
| 385 | - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | |
| 386 | - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | |
| 387 | - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | |
| 388 | - | mips16-* \ | |
| 389 | - | mips64-* | mips64el-* \ | |
| 390 | - | mips64octeon-* | mips64octeonel-* \ | |
| 391 | - | mips64orion-* | mips64orionel-* \ | |
| 392 | - | mips64r5900-* | mips64r5900el-* \ | |
| 393 | - | mips64vr-* | mips64vrel-* \ | |
| 394 | - | mips64vr4100-* | mips64vr4100el-* \ | |
| 395 | - | mips64vr4300-* | mips64vr4300el-* \ | |
| 396 | - | mips64vr5000-* | mips64vr5000el-* \ | |
| 397 | - | mips64vr5900-* | mips64vr5900el-* \ | |
| 398 | - | mipsisa32-* | mipsisa32el-* \ | |
| 399 | - | mipsisa32r2-* | mipsisa32r2el-* \ | |
| 400 | - | mipsisa64-* | mipsisa64el-* \ | |
| 401 | - | mipsisa64r2-* | mipsisa64r2el-* \ | |
| 402 | - | mipsisa64sb1-* | mipsisa64sb1el-* \ | |
| 403 | - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | |
| 404 | - | mipstx39-* | mipstx39el-* \ | |
| 405 | - | mmix-* \ | |
| 406 | - | mt-* \ | |
| 407 | - | msp430-* \ | |
| 408 | - | nds32-* | nds32le-* | nds32be-* \ | |
| 409 | - | nios-* | nios2-* \ | |
| 410 | - | none-* | np1-* | ns16k-* | ns32k-* \ | |
| 411 | - | open8-* \ | |
| 412 | - | orion-* \ | |
| 413 | - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | |
| 414 | - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | |
| 415 | - | pyramid-* \ | |
| 416 | - | rl78-* | romp-* | rs6000-* | rx-* \ | |
| 417 | - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | |
| 418 | - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | |
| 419 | - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | |
| 420 | - | sparclite-* \ | |
| 421 | - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | |
| 422 | - | tahoe-* \ | |
| 423 | - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
| 424 | - | tile*-* \ | |
| 425 | - | tron-* \ | |
| 426 | - | ubicom32-* \ | |
| 427 | - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | |
| 428 | - | vax-* \ | |
| 429 | - | we32k-* \ | |
| 430 | - | x86-* | x86_64-* | xc16x-* | xps100-* \ | |
| 431 | - | xstormy16-* | xtensa*-* \ | |
| 432 | - | ymp-* \ | |
| 433 | - | z8k-* | z80-*) | |
| 434 | - ;; | |
| 435 | - # Recognize the basic CPU types without company name, with glob match. | |
| 436 | - xtensa*) | |
| 437 | - basic_machine=$basic_machine-unknown | |
| 668 | + pmac | pmac-mpw) | |
| 669 | + cpu=powerpc | |
| 670 | + vendor=apple | |
| 438 | 671 | ;; |
| 672 | + | |
| 439 | 673 | # Recognize the various machine names and aliases which stand |
| 440 | 674 | # for a CPU type and a company and sometimes even an OS. |
| 441 | - 386bsd) | |
| 442 | - basic_machine=i386-unknown | |
| 443 | - os=-bsd | |
| 444 | - ;; | |
| 445 | 675 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
| 446 | - basic_machine=m68000-att | |
| 676 | + cpu=m68000 | |
| 677 | + vendor=att | |
| 447 | 678 | ;; |
| 448 | 679 | 3b*) |
| 449 | - basic_machine=we32k-att | |
| 450 | - ;; | |
| 451 | - a29khif) | |
| 452 | - basic_machine=a29k-amd | |
| 453 | - os=-udi | |
| 454 | - ;; | |
| 455 | - abacus) | |
| 456 | - basic_machine=abacus-unknown | |
| 457 | - ;; | |
| 458 | - adobe68k) | |
| 459 | - basic_machine=m68010-adobe | |
| 460 | - os=-scout | |
| 461 | - ;; | |
| 462 | - alliant | fx80) | |
| 463 | - basic_machine=fx80-alliant | |
| 464 | - ;; | |
| 465 | - altos | altos3068) | |
| 466 | - basic_machine=m68k-altos | |
| 467 | - ;; | |
| 468 | - am29k) | |
| 469 | - basic_machine=a29k-none | |
| 470 | - os=-bsd | |
| 471 | - ;; | |
| 472 | - amd64) | |
| 473 | - basic_machine=x86_64-pc | |
| 474 | - ;; | |
| 475 | - amd64-*) | |
| 476 | - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 477 | - ;; | |
| 478 | - amdahl) | |
| 479 | - basic_machine=580-amdahl | |
| 480 | - os=-sysv | |
| 481 | - ;; | |
| 482 | - amiga | amiga-*) | |
| 483 | - basic_machine=m68k-unknown | |
| 484 | - ;; | |
| 485 | - amigaos | amigados) | |
| 486 | - basic_machine=m68k-unknown | |
| 487 | - os=-amigaos | |
| 488 | - ;; | |
| 489 | - amigaunix | amix) | |
| 490 | - basic_machine=m68k-unknown | |
| 491 | - os=-sysv4 | |
| 492 | - ;; | |
| 493 | - apollo68) | |
| 494 | - basic_machine=m68k-apollo | |
| 495 | - os=-sysv | |
| 496 | - ;; | |
| 497 | - apollo68bsd) | |
| 498 | - basic_machine=m68k-apollo | |
| 499 | - os=-bsd | |
| 500 | - ;; | |
| 501 | - aros) | |
| 502 | - basic_machine=i386-pc | |
| 503 | - os=-aros | |
| 504 | - ;; | |
| 505 | - aux) | |
| 506 | - basic_machine=m68k-apple | |
| 507 | - os=-aux | |
| 508 | - ;; | |
| 509 | - balance) | |
| 510 | - basic_machine=ns32k-sequent | |
| 511 | - os=-dynix | |
| 512 | - ;; | |
| 513 | - blackfin) | |
| 514 | - basic_machine=bfin-unknown | |
| 515 | - os=-linux | |
| 516 | - ;; | |
| 517 | - blackfin-*) | |
| 518 | - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 519 | - os=-linux | |
| 680 | + cpu=we32k | |
| 681 | + vendor=att | |
| 520 | 682 | ;; |
| 521 | 683 | bluegene*) |
| 522 | - basic_machine=powerpc-ibm | |
| 523 | - os=-cnk | |
| 524 | - ;; | |
| 525 | - c54x-*) | |
| 526 | - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 527 | - ;; | |
| 528 | - c55x-*) | |
| 529 | - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 530 | - ;; | |
| 531 | - c6x-*) | |
| 532 | - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 533 | - ;; | |
| 534 | - c90) | |
| 535 | - basic_machine=c90-cray | |
| 536 | - os=-unicos | |
| 537 | - ;; | |
| 538 | - cegcc) | |
| 539 | - basic_machine=arm-unknown | |
| 540 | - os=-cegcc | |
| 541 | - ;; | |
| 542 | - convex-c1) | |
| 543 | - basic_machine=c1-convex | |
| 544 | - os=-bsd | |
| 545 | - ;; | |
| 546 | - convex-c2) | |
| 547 | - basic_machine=c2-convex | |
| 548 | - os=-bsd | |
| 549 | - ;; | |
| 550 | - convex-c32) | |
| 551 | - basic_machine=c32-convex | |
| 552 | - os=-bsd | |
| 553 | - ;; | |
| 554 | - convex-c34) | |
| 555 | - basic_machine=c34-convex | |
| 556 | - os=-bsd | |
| 557 | - ;; | |
| 558 | - convex-c38) | |
| 559 | - basic_machine=c38-convex | |
| 560 | - os=-bsd | |
| 561 | - ;; | |
| 562 | - cray | j90) | |
| 563 | - basic_machine=j90-cray | |
| 564 | - os=-unicos | |
| 565 | - ;; | |
| 566 | - craynv) | |
| 567 | - basic_machine=craynv-cray | |
| 568 | - os=-unicosmp | |
| 569 | - ;; | |
| 570 | - cr16 | cr16-*) | |
| 571 | - basic_machine=cr16-unknown | |
| 572 | - os=-elf | |
| 573 | - ;; | |
| 574 | - crds | unos) | |
| 575 | - basic_machine=m68k-crds | |
| 576 | - ;; | |
| 577 | - crisv32 | crisv32-* | etraxfs*) | |
| 578 | - basic_machine=crisv32-axis | |
| 579 | - ;; | |
| 580 | - cris | cris-* | etrax*) | |
| 581 | - basic_machine=cris-axis | |
| 582 | - ;; | |
| 583 | - crx) | |
| 584 | - basic_machine=crx-unknown | |
| 585 | - os=-elf | |
| 586 | - ;; | |
| 587 | - da30 | da30-*) | |
| 588 | - basic_machine=m68k-da30 | |
| 589 | - ;; | |
| 590 | - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
| 591 | - basic_machine=mips-dec | |
| 684 | + cpu=powerpc | |
| 685 | + vendor=ibm | |
| 686 | + os=cnk | |
| 592 | 687 | ;; |
| 593 | 688 | decsystem10* | dec10*) |
| 594 | - basic_machine=pdp10-dec | |
| 595 | - os=-tops10 | |
| 689 | + cpu=pdp10 | |
| 690 | + vendor=dec | |
| 691 | + os=tops10 | |
| 596 | 692 | ;; |
| 597 | 693 | decsystem20* | dec20*) |
| 598 | - basic_machine=pdp10-dec | |
| 599 | - os=-tops20 | |
| 694 | + cpu=pdp10 | |
| 695 | + vendor=dec | |
| 696 | + os=tops20 | |
| 600 | 697 | ;; |
| 601 | 698 | delta | 3300 | motorola-3300 | motorola-delta \ |
| 602 | 699 | | 3300-motorola | delta-motorola) |
| 603 | - basic_machine=m68k-motorola | |
| 604 | - ;; | |
| 605 | - delta88) | |
| 606 | - basic_machine=m88k-motorola | |
| 607 | - os=-sysv3 | |
| 608 | - ;; | |
| 609 | - dicos) | |
| 610 | - basic_machine=i686-pc | |
| 611 | - os=-dicos | |
| 700 | + cpu=m68k | |
| 701 | + vendor=motorola | |
| 612 | 702 | ;; |
| 613 | - djgpp) | |
| 614 | - basic_machine=i586-pc | |
| 615 | - os=-msdosdjgpp | |
| 616 | - ;; | |
| 617 | - dpx20 | dpx20-*) | |
| 618 | - basic_machine=rs6000-bull | |
| 619 | - os=-bosx | |
| 620 | - ;; | |
| 621 | - dpx2* | dpx2*-bull) | |
| 622 | - basic_machine=m68k-bull | |
| 623 | - os=-sysv3 | |
| 624 | - ;; | |
| 625 | - ebmon29k) | |
| 626 | - basic_machine=a29k-amd | |
| 627 | - os=-ebmon | |
| 628 | - ;; | |
| 629 | - elxsi) | |
| 630 | - basic_machine=elxsi-elxsi | |
| 631 | - os=-bsd | |
| 703 | + dpx2*) | |
| 704 | + cpu=m68k | |
| 705 | + vendor=bull | |
| 706 | + os=sysv3 | |
| 632 | 707 | ;; |
| 633 | 708 | encore | umax | mmax) |
| 634 | - basic_machine=ns32k-encore | |
| 709 | + cpu=ns32k | |
| 710 | + vendor=encore | |
| 635 | 711 | ;; |
| 636 | - es1800 | OSE68k | ose68k | ose | OSE) | |
| 637 | - basic_machine=m68k-ericsson | |
| 638 | - os=-ose | |
| 712 | + elxsi) | |
| 713 | + cpu=elxsi | |
| 714 | + vendor=elxsi | |
| 715 | + os=${os:-bsd} | |
| 639 | 716 | ;; |
| 640 | 717 | fx2800) |
| 641 | - basic_machine=i860-alliant | |
| 718 | + cpu=i860 | |
| 719 | + vendor=alliant | |
| 642 | 720 | ;; |
| 643 | 721 | genix) |
| 644 | - basic_machine=ns32k-ns | |
| 645 | - ;; | |
| 646 | - gmicro) | |
| 647 | - basic_machine=tron-gmicro | |
| 648 | - os=-sysv | |
| 649 | - ;; | |
| 650 | - go32) | |
| 651 | - basic_machine=i386-pc | |
| 652 | - os=-go32 | |
| 722 | + cpu=ns32k | |
| 723 | + vendor=ns | |
| 653 | 724 | ;; |
| 654 | 725 | h3050r* | hiux*) |
| 655 | - basic_machine=hppa1.1-hitachi | |
| 656 | - os=-hiuxwe2 | |
| 657 | - ;; | |
| 658 | - h8300hms) | |
| 659 | - basic_machine=h8300-hitachi | |
| 660 | - os=-hms | |
| 661 | - ;; | |
| 662 | - h8300xray) | |
| 663 | - basic_machine=h8300-hitachi | |
| 664 | - os=-xray | |
| 665 | - ;; | |
| 666 | - h8500hms) | |
| 667 | - basic_machine=h8500-hitachi | |
| 668 | - os=-hms | |
| 669 | - ;; | |
| 670 | - harris) | |
| 671 | - basic_machine=m88k-harris | |
| 672 | - os=-sysv3 | |
| 673 | - ;; | |
| 674 | - hp300-*) | |
| 675 | - basic_machine=m68k-hp | |
| 676 | - ;; | |
| 677 | - hp300bsd) | |
| 678 | - basic_machine=m68k-hp | |
| 679 | - os=-bsd | |
| 680 | - ;; | |
| 681 | - hp300hpux) | |
| 682 | - basic_machine=m68k-hp | |
| 683 | - os=-hpux | |
| 726 | + cpu=hppa1.1 | |
| 727 | + vendor=hitachi | |
| 728 | + os=hiuxwe2 | |
| 684 | 729 | ;; |
| 685 | 730 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
| 686 | - basic_machine=hppa1.0-hp | |
| 731 | + cpu=hppa1.0 | |
| 732 | + vendor=hp | |
| 687 | 733 | ;; |
| 688 | 734 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
| 689 | - basic_machine=m68000-hp | |
| 735 | + cpu=m68000 | |
| 736 | + vendor=hp | |
| 690 | 737 | ;; |
| 691 | 738 | hp9k3[2-9][0-9]) |
| 692 | - basic_machine=m68k-hp | |
| 739 | + cpu=m68k | |
| 740 | + vendor=hp | |
| 693 | 741 | ;; |
| 694 | 742 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
| 695 | - basic_machine=hppa1.0-hp | |
| 743 | + cpu=hppa1.0 | |
| 744 | + vendor=hp | |
| 696 | 745 | ;; |
| 697 | 746 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
| 698 | - basic_machine=hppa1.1-hp | |
| 747 | + cpu=hppa1.1 | |
| 748 | + vendor=hp | |
| 699 | 749 | ;; |
| 700 | 750 | hp9k78[0-9] | hp78[0-9]) |
| 701 | 751 | # FIXME: really hppa2.0-hp |
| 702 | - basic_machine=hppa1.1-hp | |
| 752 | + cpu=hppa1.1 | |
| 753 | + vendor=hp | |
| 703 | 754 | ;; |
| 704 | 755 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) |
| 705 | 756 | # FIXME: really hppa2.0-hp |
| 706 | - basic_machine=hppa1.1-hp | |
| 757 | + cpu=hppa1.1 | |
| 758 | + vendor=hp | |
| 707 | 759 | ;; |
| 708 | 760 | hp9k8[0-9][13679] | hp8[0-9][13679]) |
| 709 | - basic_machine=hppa1.1-hp | |
| 761 | + cpu=hppa1.1 | |
| 762 | + vendor=hp | |
| 710 | 763 | ;; |
| 711 | 764 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
| 712 | - basic_machine=hppa1.0-hp | |
| 713 | - ;; | |
| 714 | - hppa-next) | |
| 715 | - os=-nextstep3 | |
| 716 | - ;; | |
| 717 | - hppaosf) | |
| 718 | - basic_machine=hppa1.1-hp | |
| 719 | - os=-osf | |
| 720 | - ;; | |
| 721 | - hppro) | |
| 722 | - basic_machine=hppa1.1-hp | |
| 723 | - os=-proelf | |
| 724 | - ;; | |
| 725 | - i370-ibm* | ibm*) | |
| 726 | - basic_machine=i370-ibm | |
| 765 | + cpu=hppa1.0 | |
| 766 | + vendor=hp | |
| 727 | 767 | ;; |
| 728 | 768 | i*86v32) |
| 729 | - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
| 730 | - os=-sysv32 | |
| 769 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
| 770 | + vendor=pc | |
| 771 | + os=sysv32 | |
| 731 | 772 | ;; |
| 732 | 773 | i*86v4*) |
| 733 | - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
| 734 | - os=-sysv4 | |
| 774 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
| 775 | + vendor=pc | |
| 776 | + os=sysv4 | |
| 735 | 777 | ;; |
| 736 | 778 | i*86v) |
| 737 | - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
| 738 | - os=-sysv | |
| 779 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
| 780 | + vendor=pc | |
| 781 | + os=sysv | |
| 739 | 782 | ;; |
| 740 | 783 | i*86sol2) |
| 741 | - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
| 742 | - os=-solaris2 | |
| 784 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
| 785 | + vendor=pc | |
| 786 | + os=solaris2 | |
| 743 | 787 | ;; |
| 744 | - i386mach) | |
| 745 | - basic_machine=i386-mach | |
| 746 | - os=-mach | |
| 747 | - ;; | |
| 748 | - i386-vsta | vsta) | |
| 749 | - basic_machine=i386-unknown | |
| 750 | - os=-vsta | |
| 788 | + j90 | j90-cray) | |
| 789 | + cpu=j90 | |
| 790 | + vendor=cray | |
| 791 | + os=${os:-unicos} | |
| 751 | 792 | ;; |
| 752 | 793 | iris | iris4d) |
| 753 | - basic_machine=mips-sgi | |
| 794 | + cpu=mips | |
| 795 | + vendor=sgi | |
| 754 | 796 | case $os in |
| 755 | - -irix*) | |
| 797 | + irix*) | |
| 756 | 798 | ;; |
| 757 | 799 | *) |
| 758 | - os=-irix4 | |
| 800 | + os=irix4 | |
| 759 | 801 | ;; |
| 760 | 802 | esac |
| 761 | 803 | ;; |
| 762 | - isi68 | isi) | |
| 763 | - basic_machine=m68k-isi | |
| 764 | - os=-sysv | |
| 765 | - ;; | |
| 766 | - m68knommu) | |
| 767 | - basic_machine=m68k-unknown | |
| 768 | - os=-linux | |
| 769 | - ;; | |
| 770 | - m68knommu-*) | |
| 771 | - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 772 | - os=-linux | |
| 773 | - ;; | |
| 774 | - m88k-omron*) | |
| 775 | - basic_machine=m88k-omron | |
| 776 | - ;; | |
| 777 | - magnum | m3230) | |
| 778 | - basic_machine=mips-mips | |
| 779 | - os=-sysv | |
| 780 | - ;; | |
| 781 | - merlin) | |
| 782 | - basic_machine=ns32k-utek | |
| 783 | - os=-sysv | |
| 784 | - ;; | |
| 785 | - microblaze) | |
| 786 | - basic_machine=microblaze-xilinx | |
| 787 | - ;; | |
| 788 | - mingw32) | |
| 789 | - basic_machine=i386-pc | |
| 790 | - os=-mingw32 | |
| 791 | - ;; | |
| 792 | - mingw32ce) | |
| 793 | - basic_machine=arm-unknown | |
| 794 | - os=-mingw32ce | |
| 795 | - ;; | |
| 796 | 804 | miniframe) |
| 797 | - basic_machine=m68000-convergent | |
| 798 | - ;; | |
| 799 | - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
| 800 | - basic_machine=m68k-atari | |
| 801 | - os=-mint | |
| 802 | - ;; | |
| 803 | - mips3*-*) | |
| 804 | - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
| 805 | - ;; | |
| 806 | - mips3*) | |
| 807 | - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
| 808 | - ;; | |
| 809 | - monitor) | |
| 810 | - basic_machine=m68k-rom68k | |
| 811 | - os=-coff | |
| 812 | - ;; | |
| 813 | - morphos) | |
| 814 | - basic_machine=powerpc-unknown | |
| 815 | - os=-morphos | |
| 816 | - ;; | |
| 817 | - msdos) | |
| 818 | - basic_machine=i386-pc | |
| 819 | - os=-msdos | |
| 820 | - ;; | |
| 821 | - ms1-*) | |
| 822 | - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` | |
| 823 | - ;; | |
| 824 | - msys) | |
| 825 | - basic_machine=i386-pc | |
| 826 | - os=-msys | |
| 827 | - ;; | |
| 828 | - mvs) | |
| 829 | - basic_machine=i370-ibm | |
| 830 | - os=-mvs | |
| 831 | - ;; | |
| 832 | - nacl) | |
| 833 | - basic_machine=le32-unknown | |
| 834 | - os=-nacl | |
| 835 | - ;; | |
| 836 | - ncr3000) | |
| 837 | - basic_machine=i486-ncr | |
| 838 | - os=-sysv4 | |
| 839 | - ;; | |
| 840 | - netbsd386) | |
| 841 | - basic_machine=i386-unknown | |
| 842 | - os=-netbsd | |
| 805 | + cpu=m68000 | |
| 806 | + vendor=convergent | |
| 843 | 807 | ;; |
| 844 | - netwinder) | |
| 845 | - basic_machine=armv4l-rebel | |
| 846 | - os=-linux | |
| 847 | - ;; | |
| 848 | - news | news700 | news800 | news900) | |
| 849 | - basic_machine=m68k-sony | |
| 850 | - os=-newsos | |
| 851 | - ;; | |
| 852 | - news1000) | |
| 853 | - basic_machine=m68030-sony | |
| 854 | - os=-newsos | |
| 808 | + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
| 809 | + cpu=m68k | |
| 810 | + vendor=atari | |
| 811 | + os=mint | |
| 855 | 812 | ;; |
| 856 | 813 | news-3600 | risc-news) |
| 857 | - basic_machine=mips-sony | |
| 858 | - os=-newsos | |
| 814 | + cpu=mips | |
| 815 | + vendor=sony | |
| 816 | + os=newsos | |
| 859 | 817 | ;; |
| 860 | - necv70) | |
| 861 | - basic_machine=v70-nec | |
| 862 | - os=-sysv | |
| 863 | - ;; | |
| 864 | - next | m*-next ) | |
| 865 | - basic_machine=m68k-next | |
| 818 | + next | m*-next) | |
| 819 | + cpu=m68k | |
| 820 | + vendor=next | |
| 866 | 821 | case $os in |
| 867 | - -nextstep* ) | |
| 822 | + openstep*) | |
| 823 | + ;; | |
| 824 | + nextstep*) | |
| 868 | 825 | ;; |
| 869 | - -ns2*) | |
| 870 | - os=-nextstep2 | |
| 826 | + ns2*) | |
| 827 | + os=nextstep2 | |
| 871 | 828 | ;; |
| 872 | 829 | *) |
| 873 | - os=-nextstep3 | |
| 830 | + os=nextstep3 | |
| 874 | 831 | ;; |
| 875 | 832 | esac |
| 876 | 833 | ;; |
| 877 | - nh3000) | |
| 878 | - basic_machine=m68k-harris | |
| 879 | - os=-cxux | |
| 880 | - ;; | |
| 881 | - nh[45]000) | |
| 882 | - basic_machine=m88k-harris | |
| 883 | - os=-cxux | |
| 884 | - ;; | |
| 885 | - nindy960) | |
| 886 | - basic_machine=i960-intel | |
| 887 | - os=-nindy | |
| 888 | - ;; | |
| 889 | - mon960) | |
| 890 | - basic_machine=i960-intel | |
| 891 | - os=-mon960 | |
| 892 | - ;; | |
| 893 | - nonstopux) | |
| 894 | - basic_machine=mips-compaq | |
| 895 | - os=-nonstopux | |
| 896 | - ;; | |
| 897 | 834 | np1) |
| 898 | - basic_machine=np1-gould | |
| 899 | - ;; | |
| 900 | - neo-tandem) | |
| 901 | - basic_machine=neo-tandem | |
| 902 | - ;; | |
| 903 | - nse-tandem) | |
| 904 | - basic_machine=nse-tandem | |
| 905 | - ;; | |
| 906 | - nsr-tandem) | |
| 907 | - basic_machine=nsr-tandem | |
| 835 | + cpu=np1 | |
| 836 | + vendor=gould | |
| 908 | 837 | ;; |
| 909 | 838 | op50n-* | op60c-*) |
| 910 | - basic_machine=hppa1.1-oki | |
| 911 | - os=-proelf | |
| 912 | - ;; | |
| 913 | - openrisc | openrisc-*) | |
| 914 | - basic_machine=or32-unknown | |
| 915 | - ;; | |
| 916 | - os400) | |
| 917 | - basic_machine=powerpc-ibm | |
| 918 | - os=-os400 | |
| 919 | - ;; | |
| 920 | - OSE68000 | ose68000) | |
| 921 | - basic_machine=m68000-ericsson | |
| 922 | - os=-ose | |
| 923 | - ;; | |
| 924 | - os68k) | |
| 925 | - basic_machine=m68k-none | |
| 926 | - os=-os68k | |
| 839 | + cpu=hppa1.1 | |
| 840 | + vendor=oki | |
| 841 | + os=proelf | |
| 927 | 842 | ;; |
| 928 | 843 | pa-hitachi) |
| 929 | - basic_machine=hppa1.1-hitachi | |
| 930 | - os=-hiuxwe2 | |
| 931 | - ;; | |
| 932 | - paragon) | |
| 933 | - basic_machine=i860-intel | |
| 934 | - os=-osf | |
| 935 | - ;; | |
| 936 | - parisc) | |
| 937 | - basic_machine=hppa-unknown | |
| 938 | - os=-linux | |
| 939 | - ;; | |
| 940 | - parisc-*) | |
| 941 | - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 942 | - os=-linux | |
| 844 | + cpu=hppa1.1 | |
| 845 | + vendor=hitachi | |
| 846 | + os=hiuxwe2 | |
| 943 | 847 | ;; |
| 944 | 848 | pbd) |
| 945 | - basic_machine=sparc-tti | |
| 849 | + cpu=sparc | |
| 850 | + vendor=tti | |
| 946 | 851 | ;; |
| 947 | 852 | pbb) |
| 948 | - basic_machine=m68k-tti | |
| 949 | - ;; | |
| 950 | - pc532 | pc532-*) | |
| 951 | - basic_machine=ns32k-pc532 | |
| 853 | + cpu=m68k | |
| 854 | + vendor=tti | |
| 952 | 855 | ;; |
| 953 | - pc98) | |
| 954 | - basic_machine=i386-pc | |
| 955 | - ;; | |
| 956 | - pc98-*) | |
| 957 | - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 958 | - ;; | |
| 959 | - pentium | p5 | k5 | k6 | nexgen | viac3) | |
| 960 | - basic_machine=i586-pc | |
| 961 | - ;; | |
| 962 | - pentiumpro | p6 | 6x86 | athlon | athlon_*) | |
| 963 | - basic_machine=i686-pc | |
| 964 | - ;; | |
| 965 | - pentiumii | pentium2 | pentiumiii | pentium3) | |
| 966 | - basic_machine=i686-pc | |
| 967 | - ;; | |
| 968 | - pentium4) | |
| 969 | - basic_machine=i786-pc | |
| 970 | - ;; | |
| 971 | - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
| 972 | - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 973 | - ;; | |
| 974 | - pentiumpro-* | p6-* | 6x86-* | athlon-*) | |
| 975 | - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 976 | - ;; | |
| 977 | - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
| 978 | - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 979 | - ;; | |
| 980 | - pentium4-*) | |
| 981 | - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 856 | + pc532) | |
| 857 | + cpu=ns32k | |
| 858 | + vendor=pc532 | |
| 982 | 859 | ;; |
| 983 | 860 | pn) |
| 984 | - basic_machine=pn-gould | |
| 985 | - ;; | |
| 986 | - power) basic_machine=power-ibm | |
| 861 | + cpu=pn | |
| 862 | + vendor=gould | |
| 987 | 863 | ;; |
| 988 | - ppc | ppcbe) basic_machine=powerpc-unknown | |
| 989 | - ;; | |
| 990 | - ppc-* | ppcbe-*) | |
| 991 | - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 992 | - ;; | |
| 993 | - ppcle | powerpclittle | ppc-le | powerpc-little) | |
| 994 | - basic_machine=powerpcle-unknown | |
| 995 | - ;; | |
| 996 | - ppcle-* | powerpclittle-*) | |
| 997 | - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 998 | - ;; | |
| 999 | - ppc64) basic_machine=powerpc64-unknown | |
| 1000 | - ;; | |
| 1001 | - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 1002 | - ;; | |
| 1003 | - ppc64le | powerpc64little | ppc64-le | powerpc64-little) | |
| 1004 | - basic_machine=powerpc64le-unknown | |
| 1005 | - ;; | |
| 1006 | - ppc64le-* | powerpc64little-*) | |
| 1007 | - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 864 | + power) | |
| 865 | + cpu=power | |
| 866 | + vendor=ibm | |
| 1008 | 867 | ;; |
| 1009 | 868 | ps2) |
| 1010 | - basic_machine=i386-ibm | |
| 1011 | - ;; | |
| 1012 | - pw32) | |
| 1013 | - basic_machine=i586-unknown | |
| 1014 | - os=-pw32 | |
| 1015 | - ;; | |
| 1016 | - rdos) | |
| 1017 | - basic_machine=i386-pc | |
| 1018 | - os=-rdos | |
| 1019 | - ;; | |
| 1020 | - rom68k) | |
| 1021 | - basic_machine=m68k-rom68k | |
| 1022 | - os=-coff | |
| 869 | + cpu=i386 | |
| 870 | + vendor=ibm | |
| 1023 | 871 | ;; |
| 1024 | 872 | rm[46]00) |
| 1025 | - basic_machine=mips-siemens | |
| 873 | + cpu=mips | |
| 874 | + vendor=siemens | |
| 1026 | 875 | ;; |
| 1027 | 876 | rtpc | rtpc-*) |
| 1028 | - basic_machine=romp-ibm | |
| 877 | + cpu=romp | |
| 878 | + vendor=ibm | |
| 1029 | 879 | ;; |
| 1030 | - s390 | s390-*) | |
| 1031 | - basic_machine=s390-ibm | |
| 1032 | - ;; | |
| 1033 | - s390x | s390x-*) | |
| 1034 | - basic_machine=s390x-ibm | |
| 1035 | - ;; | |
| 1036 | - sa29200) | |
| 1037 | - basic_machine=a29k-amd | |
| 1038 | - os=-udi | |
| 1039 | - ;; | |
| 1040 | - sb1) | |
| 1041 | - basic_machine=mipsisa64sb1-unknown | |
| 880 | + sde) | |
| 881 | + cpu=mipsisa32 | |
| 882 | + vendor=sde | |
| 883 | + os=${os:-elf} | |
| 1042 | 884 | ;; |
| 1043 | - sb1el) | |
| 1044 | - basic_machine=mipsisa64sb1el-unknown | |
| 885 | + simso-wrs) | |
| 886 | + cpu=sparclite | |
| 887 | + vendor=wrs | |
| 888 | + os=vxworks | |
| 1045 | 889 | ;; |
| 1046 | - sde) | |
| 1047 | - basic_machine=mipsisa32-sde | |
| 1048 | - os=-elf | |
| 890 | + tower | tower-32) | |
| 891 | + cpu=m68k | |
| 892 | + vendor=ncr | |
| 1049 | 893 | ;; |
| 1050 | - sei) | |
| 1051 | - basic_machine=mips-sei | |
| 1052 | - os=-seiux | |
| 894 | + vpp*|vx|vx-*) | |
| 895 | + cpu=f301 | |
| 896 | + vendor=fujitsu | |
| 1053 | 897 | ;; |
| 1054 | - sequent) | |
| 1055 | - basic_machine=i386-sequent | |
| 898 | + w65) | |
| 899 | + cpu=w65 | |
| 900 | + vendor=wdc | |
| 1056 | 901 | ;; |
| 1057 | - sh) | |
| 1058 | - basic_machine=sh-hitachi | |
| 1059 | - os=-hms | |
| 902 | + w89k-*) | |
| 903 | + cpu=hppa1.1 | |
| 904 | + vendor=winbond | |
| 905 | + os=proelf | |
| 1060 | 906 | ;; |
| 1061 | - sh5el) | |
| 1062 | - basic_machine=sh5le-unknown | |
| 907 | + none) | |
| 908 | + cpu=none | |
| 909 | + vendor=none | |
| 1063 | 910 | ;; |
| 1064 | - sh64) | |
| 1065 | - basic_machine=sh64-unknown | |
| 911 | + leon|leon[3-9]) | |
| 912 | + cpu=sparc | |
| 913 | + vendor=$basic_machine | |
| 1066 | 914 | ;; |
| 1067 | - sparclite-wrs | simso-wrs) | |
| 1068 | - basic_machine=sparclite-wrs | |
| 1069 | - os=-vxworks | |
| 915 | + leon-*|leon[3-9]-*) | |
| 916 | + cpu=sparc | |
| 917 | + vendor=`echo "$basic_machine" | sed 's/-.*//'` | |
| 1070 | 918 | ;; |
| 1071 | - sps7) | |
| 1072 | - basic_machine=m68k-bull | |
| 1073 | - os=-sysv2 | |
| 919 | + | |
| 920 | + *-*) | |
| 921 | + # shellcheck disable=SC2162 | |
| 922 | + IFS="-" read cpu vendor <<EOF | |
| 923 | +$basic_machine | |
| 924 | +EOF | |
| 1074 | 925 | ;; |
| 1075 | - spur) | |
| 1076 | - basic_machine=spur-unknown | |
| 926 | + # We use `pc' rather than `unknown' | |
| 927 | + # because (1) that's what they normally are, and | |
| 928 | + # (2) the word "unknown" tends to confuse beginning users. | |
| 929 | + i*86 | x86_64) | |
| 930 | + cpu=$basic_machine | |
| 931 | + vendor=pc | |
| 1077 | 932 | ;; |
| 1078 | - st2000) | |
| 1079 | - basic_machine=m68k-tandem | |
| 933 | + # These rules are duplicated from below for sake of the special case above; | |
| 934 | + # i.e. things that normalized to x86 arches should also default to "pc" | |
| 935 | + pc98) | |
| 936 | + cpu=i386 | |
| 937 | + vendor=pc | |
| 1080 | 938 | ;; |
| 1081 | - stratus) | |
| 1082 | - basic_machine=i860-stratus | |
| 1083 | - os=-sysv4 | |
| 939 | + x64 | amd64) | |
| 940 | + cpu=x86_64 | |
| 941 | + vendor=pc | |
| 1084 | 942 | ;; |
| 1085 | - strongarm-* | thumb-*) | |
| 1086 | - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` | |
| 943 | + # Recognize the basic CPU types without company name. | |
| 944 | + *) | |
| 945 | + cpu=$basic_machine | |
| 946 | + vendor=unknown | |
| 1087 | 947 | ;; |
| 1088 | - sun2) | |
| 1089 | - basic_machine=m68000-sun | |
| 948 | +esac | |
| 949 | + | |
| 950 | +unset -v basic_machine | |
| 951 | + | |
| 952 | +# Decode basic machines in the full and proper CPU-Company form. | |
| 953 | +case $cpu-$vendor in | |
| 954 | + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in | |
| 955 | + # some cases the only manufacturer, in others, it is the most popular. | |
| 956 | + craynv-unknown) | |
| 957 | + vendor=cray | |
| 958 | + os=${os:-unicosmp} | |
| 1090 | 959 | ;; |
| 1091 | - sun2os3) | |
| 1092 | - basic_machine=m68000-sun | |
| 1093 | - os=-sunos3 | |
| 960 | + c90-unknown | c90-cray) | |
| 961 | + vendor=cray | |
| 962 | + os=${os:-unicos} | |
| 1094 | 963 | ;; |
| 1095 | - sun2os4) | |
| 1096 | - basic_machine=m68000-sun | |
| 1097 | - os=-sunos4 | |
| 964 | + fx80-unknown) | |
| 965 | + vendor=alliant | |
| 1098 | 966 | ;; |
| 1099 | - sun3os3) | |
| 1100 | - basic_machine=m68k-sun | |
| 1101 | - os=-sunos3 | |
| 967 | + romp-unknown) | |
| 968 | + vendor=ibm | |
| 1102 | 969 | ;; |
| 1103 | - sun3os4) | |
| 1104 | - basic_machine=m68k-sun | |
| 1105 | - os=-sunos4 | |
| 970 | + mmix-unknown) | |
| 971 | + vendor=knuth | |
| 1106 | 972 | ;; |
| 1107 | - sun4os3) | |
| 1108 | - basic_machine=sparc-sun | |
| 1109 | - os=-sunos3 | |
| 973 | + microblaze-unknown | microblazeel-unknown) | |
| 974 | + vendor=xilinx | |
| 1110 | 975 | ;; |
| 1111 | - sun4os4) | |
| 1112 | - basic_machine=sparc-sun | |
| 1113 | - os=-sunos4 | |
| 976 | + rs6000-unknown) | |
| 977 | + vendor=ibm | |
| 1114 | 978 | ;; |
| 1115 | - sun4sol2) | |
| 1116 | - basic_machine=sparc-sun | |
| 1117 | - os=-solaris2 | |
| 979 | + vax-unknown) | |
| 980 | + vendor=dec | |
| 1118 | 981 | ;; |
| 1119 | - sun3 | sun3-*) | |
| 1120 | - basic_machine=m68k-sun | |
| 982 | + pdp11-unknown) | |
| 983 | + vendor=dec | |
| 1121 | 984 | ;; |
| 1122 | - sun4) | |
| 1123 | - basic_machine=sparc-sun | |
| 985 | + we32k-unknown) | |
| 986 | + vendor=att | |
| 1124 | 987 | ;; |
| 1125 | - sun386 | sun386i | roadrunner) | |
| 1126 | - basic_machine=i386-sun | |
| 988 | + cydra-unknown) | |
| 989 | + vendor=cydrome | |
| 1127 | 990 | ;; |
| 1128 | - sv1) | |
| 1129 | - basic_machine=sv1-cray | |
| 1130 | - os=-unicos | |
| 991 | + i370-ibm*) | |
| 992 | + vendor=ibm | |
| 1131 | 993 | ;; |
| 1132 | - symmetry) | |
| 1133 | - basic_machine=i386-sequent | |
| 1134 | - os=-dynix | |
| 994 | + orion-unknown) | |
| 995 | + vendor=highlevel | |
| 1135 | 996 | ;; |
| 1136 | - t3e) | |
| 1137 | - basic_machine=alphaev5-cray | |
| 1138 | - os=-unicos | |
| 997 | + xps-unknown | xps100-unknown) | |
| 998 | + cpu=xps100 | |
| 999 | + vendor=honeywell | |
| 1139 | 1000 | ;; |
| 1140 | - t90) | |
| 1141 | - basic_machine=t90-cray | |
| 1142 | - os=-unicos | |
| 1001 | + | |
| 1002 | + # Here we normalize CPU types with a missing or matching vendor | |
| 1003 | + dpx20-unknown | dpx20-bull) | |
| 1004 | + cpu=rs6000 | |
| 1005 | + vendor=bull | |
| 1006 | + os=${os:-bosx} | |
| 1143 | 1007 | ;; |
| 1144 | - tile*) | |
| 1145 | - basic_machine=$basic_machine-unknown | |
| 1146 | - os=-linux-gnu | |
| 1008 | + | |
| 1009 | + # Here we normalize CPU types irrespective of the vendor | |
| 1010 | + amd64-*) | |
| 1011 | + cpu=x86_64 | |
| 1147 | 1012 | ;; |
| 1148 | - tx39) | |
| 1149 | - basic_machine=mipstx39-unknown | |
| 1013 | + blackfin-*) | |
| 1014 | + cpu=bfin | |
| 1015 | + os=linux | |
| 1150 | 1016 | ;; |
| 1151 | - tx39el) | |
| 1152 | - basic_machine=mipstx39el-unknown | |
| 1017 | + c54x-*) | |
| 1018 | + cpu=tic54x | |
| 1153 | 1019 | ;; |
| 1154 | - toad1) | |
| 1155 | - basic_machine=pdp10-xkl | |
| 1156 | - os=-tops20 | |
| 1020 | + c55x-*) | |
| 1021 | + cpu=tic55x | |
| 1157 | 1022 | ;; |
| 1158 | - tower | tower-32) | |
| 1159 | - basic_machine=m68k-ncr | |
| 1023 | + c6x-*) | |
| 1024 | + cpu=tic6x | |
| 1160 | 1025 | ;; |
| 1161 | - tpf) | |
| 1162 | - basic_machine=s390x-ibm | |
| 1163 | - os=-tpf | |
| 1026 | + e500v[12]-*) | |
| 1027 | + cpu=powerpc | |
| 1028 | + os=$os"spe" | |
| 1164 | 1029 | ;; |
| 1165 | - udi29k) | |
| 1166 | - basic_machine=a29k-amd | |
| 1167 | - os=-udi | |
| 1030 | + mips3*-*) | |
| 1031 | + cpu=mips64 | |
| 1168 | 1032 | ;; |
| 1169 | - ultra3) | |
| 1170 | - basic_machine=a29k-nyu | |
| 1171 | - os=-sym1 | |
| 1033 | + ms1-*) | |
| 1034 | + cpu=mt | |
| 1172 | 1035 | ;; |
| 1173 | - v810 | necv810) | |
| 1174 | - basic_machine=v810-nec | |
| 1175 | - os=-none | |
| 1036 | + m68knommu-*) | |
| 1037 | + cpu=m68k | |
| 1038 | + os=linux | |
| 1176 | 1039 | ;; |
| 1177 | - vaxv) | |
| 1178 | - basic_machine=vax-dec | |
| 1179 | - os=-sysv | |
| 1040 | + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) | |
| 1041 | + cpu=s12z | |
| 1180 | 1042 | ;; |
| 1181 | - vms) | |
| 1182 | - basic_machine=vax-dec | |
| 1183 | - os=-vms | |
| 1043 | + openrisc-*) | |
| 1044 | + cpu=or32 | |
| 1184 | 1045 | ;; |
| 1185 | - vpp*|vx|vx-*) | |
| 1186 | - basic_machine=f301-fujitsu | |
| 1046 | + parisc-*) | |
| 1047 | + cpu=hppa | |
| 1048 | + os=linux | |
| 1187 | 1049 | ;; |
| 1188 | - vxworks960) | |
| 1189 | - basic_machine=i960-wrs | |
| 1190 | - os=-vxworks | |
| 1050 | + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
| 1051 | + cpu=i586 | |
| 1191 | 1052 | ;; |
| 1192 | - vxworks68) | |
| 1193 | - basic_machine=m68k-wrs | |
| 1194 | - os=-vxworks | |
| 1053 | + pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) | |
| 1054 | + cpu=i686 | |
| 1195 | 1055 | ;; |
| 1196 | - vxworks29k) | |
| 1197 | - basic_machine=a29k-wrs | |
| 1198 | - os=-vxworks | |
| 1056 | + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
| 1057 | + cpu=i686 | |
| 1199 | 1058 | ;; |
| 1200 | - w65*) | |
| 1201 | - basic_machine=w65-wdc | |
| 1202 | - os=-none | |
| 1059 | + pentium4-*) | |
| 1060 | + cpu=i786 | |
| 1203 | 1061 | ;; |
| 1204 | - w89k-*) | |
| 1205 | - basic_machine=hppa1.1-winbond | |
| 1206 | - os=-proelf | |
| 1062 | + pc98-*) | |
| 1063 | + cpu=i386 | |
| 1207 | 1064 | ;; |
| 1208 | - xbox) | |
| 1209 | - basic_machine=i686-pc | |
| 1210 | - os=-mingw32 | |
| 1065 | + ppc-* | ppcbe-*) | |
| 1066 | + cpu=powerpc | |
| 1211 | 1067 | ;; |
| 1212 | - xps | xps100) | |
| 1213 | - basic_machine=xps100-honeywell | |
| 1068 | + ppcle-* | powerpclittle-*) | |
| 1069 | + cpu=powerpcle | |
| 1214 | 1070 | ;; |
| 1215 | - xscale-* | xscalee[bl]-*) | |
| 1216 | - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` | |
| 1071 | + ppc64-*) | |
| 1072 | + cpu=powerpc64 | |
| 1217 | 1073 | ;; |
| 1218 | - ymp) | |
| 1219 | - basic_machine=ymp-cray | |
| 1220 | - os=-unicos | |
| 1074 | + ppc64le-* | powerpc64little-*) | |
| 1075 | + cpu=powerpc64le | |
| 1221 | 1076 | ;; |
| 1222 | - z8k-*-coff) | |
| 1223 | - basic_machine=z8k-unknown | |
| 1224 | - os=-sim | |
| 1077 | + sb1-*) | |
| 1078 | + cpu=mipsisa64sb1 | |
| 1225 | 1079 | ;; |
| 1226 | - z80-*-coff) | |
| 1227 | - basic_machine=z80-unknown | |
| 1228 | - os=-sim | |
| 1080 | + sb1el-*) | |
| 1081 | + cpu=mipsisa64sb1el | |
| 1229 | 1082 | ;; |
| 1230 | - none) | |
| 1231 | - basic_machine=none-none | |
| 1232 | - os=-none | |
| 1083 | + sh5e[lb]-*) | |
| 1084 | + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` | |
| 1233 | 1085 | ;; |
| 1234 | - | |
| 1235 | -# Here we handle the default manufacturer of certain CPU types. It is in | |
| 1236 | -# some cases the only manufacturer, in others, it is the most popular. | |
| 1237 | - w89k) | |
| 1238 | - basic_machine=hppa1.1-winbond | |
| 1086 | + spur-*) | |
| 1087 | + cpu=spur | |
| 1239 | 1088 | ;; |
| 1240 | - op50n) | |
| 1241 | - basic_machine=hppa1.1-oki | |
| 1089 | + strongarm-* | thumb-*) | |
| 1090 | + cpu=arm | |
| 1242 | 1091 | ;; |
| 1243 | - op60c) | |
| 1244 | - basic_machine=hppa1.1-oki | |
| 1092 | + tx39-*) | |
| 1093 | + cpu=mipstx39 | |
| 1245 | 1094 | ;; |
| 1246 | - romp) | |
| 1247 | - basic_machine=romp-ibm | |
| 1095 | + tx39el-*) | |
| 1096 | + cpu=mipstx39el | |
| 1248 | 1097 | ;; |
| 1249 | - mmix) | |
| 1250 | - basic_machine=mmix-knuth | |
| 1098 | + x64-*) | |
| 1099 | + cpu=x86_64 | |
| 1251 | 1100 | ;; |
| 1252 | - rs6000) | |
| 1253 | - basic_machine=rs6000-ibm | |
| 1101 | + xscale-* | xscalee[bl]-*) | |
| 1102 | + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` | |
| 1254 | 1103 | ;; |
| 1255 | - vax) | |
| 1256 | - basic_machine=vax-dec | |
| 1104 | + | |
| 1105 | + # Recognize the canonical CPU Types that limit and/or modify the | |
| 1106 | + # company names they are paired with. | |
| 1107 | + cr16-*) | |
| 1108 | + os=${os:-elf} | |
| 1257 | 1109 | ;; |
| 1258 | - pdp10) | |
| 1259 | - # there are many clones, so DEC is not a safe bet | |
| 1260 | - basic_machine=pdp10-unknown | |
| 1110 | + crisv32-* | etraxfs*-*) | |
| 1111 | + cpu=crisv32 | |
| 1112 | + vendor=axis | |
| 1261 | 1113 | ;; |
| 1262 | - pdp11) | |
| 1263 | - basic_machine=pdp11-dec | |
| 1114 | + cris-* | etrax*-*) | |
| 1115 | + cpu=cris | |
| 1116 | + vendor=axis | |
| 1264 | 1117 | ;; |
| 1265 | - we32k) | |
| 1266 | - basic_machine=we32k-att | |
| 1118 | + crx-*) | |
| 1119 | + os=${os:-elf} | |
| 1267 | 1120 | ;; |
| 1268 | - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) | |
| 1269 | - basic_machine=sh-unknown | |
| 1121 | + neo-tandem) | |
| 1122 | + cpu=neo | |
| 1123 | + vendor=tandem | |
| 1270 | 1124 | ;; |
| 1271 | - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) | |
| 1272 | - basic_machine=sparc-sun | |
| 1125 | + nse-tandem) | |
| 1126 | + cpu=nse | |
| 1127 | + vendor=tandem | |
| 1273 | 1128 | ;; |
| 1274 | - cydra) | |
| 1275 | - basic_machine=cydra-cydrome | |
| 1129 | + nsr-tandem) | |
| 1130 | + cpu=nsr | |
| 1131 | + vendor=tandem | |
| 1276 | 1132 | ;; |
| 1277 | - orion) | |
| 1278 | - basic_machine=orion-highlevel | |
| 1133 | + nsv-tandem) | |
| 1134 | + cpu=nsv | |
| 1135 | + vendor=tandem | |
| 1279 | 1136 | ;; |
| 1280 | - orion105) | |
| 1281 | - basic_machine=clipper-highlevel | |
| 1137 | + nsx-tandem) | |
| 1138 | + cpu=nsx | |
| 1139 | + vendor=tandem | |
| 1282 | 1140 | ;; |
| 1283 | - mac | mpw | mac-mpw) | |
| 1284 | - basic_machine=m68k-apple | |
| 1141 | + s390-*) | |
| 1142 | + cpu=s390 | |
| 1143 | + vendor=ibm | |
| 1285 | 1144 | ;; |
| 1286 | - pmac | pmac-mpw) | |
| 1287 | - basic_machine=powerpc-apple | |
| 1145 | + s390x-*) | |
| 1146 | + cpu=s390x | |
| 1147 | + vendor=ibm | |
| 1288 | 1148 | ;; |
| 1289 | - *-unknown) | |
| 1290 | - # Make sure to match an already-canonicalized machine name. | |
| 1149 | + tile*-*) | |
| 1150 | + os=${os:-linux-gnu} | |
| 1291 | 1151 | ;; |
| 1152 | + | |
| 1292 | 1153 | *) |
| 1293 | - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
| 1294 | - exit 1 | |
| 1154 | + # Recognize the canonical CPU types that are allowed with any | |
| 1155 | + # company name. | |
| 1156 | + case $cpu in | |
| 1157 | + 1750a | 580 \ | |
| 1158 | + | a29k \ | |
| 1159 | + | aarch64 | aarch64_be \ | |
| 1160 | + | abacus \ | |
| 1161 | + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | |
| 1162 | + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | |
| 1163 | + | alphapca5[67] | alpha64pca5[67] \ | |
| 1164 | + | am33_2.0 \ | |
| 1165 | + | amdgcn \ | |
| 1166 | + | arc | arceb \ | |
| 1167 | + | arm | arm[lb]e | arme[lb] | armv* \ | |
| 1168 | + | avr | avr32 \ | |
| 1169 | + | asmjs \ | |
| 1170 | + | ba \ | |
| 1171 | + | be32 | be64 \ | |
| 1172 | + | bfin | bpf | bs2000 \ | |
| 1173 | + | c[123]* | c30 | [cjt]90 | c4x \ | |
| 1174 | + | c8051 | clipper | craynv | csky | cydra \ | |
| 1175 | + | d10v | d30v | dlx | dsp16xx \ | |
| 1176 | + | e2k | elxsi | epiphany \ | |
| 1177 | + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ | |
| 1178 | + | h8300 | h8500 \ | |
| 1179 | + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
| 1180 | + | hexagon \ | |
| 1181 | + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | |
| 1182 | + | ip2k | iq2000 \ | |
| 1183 | + | k1om \ | |
| 1184 | + | le32 | le64 \ | |
| 1185 | + | lm32 \ | |
| 1186 | + | m32c | m32r | m32rle \ | |
| 1187 | + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | |
| 1188 | + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | |
| 1189 | + | m88110 | m88k | maxq | mb | mcore | mep | metag \ | |
| 1190 | + | microblaze | microblazeel \ | |
| 1191 | + | mips | mipsbe | mipseb | mipsel | mipsle \ | |
| 1192 | + | mips16 \ | |
| 1193 | + | mips64 | mips64eb | mips64el \ | |
| 1194 | + | mips64octeon | mips64octeonel \ | |
| 1195 | + | mips64orion | mips64orionel \ | |
| 1196 | + | mips64r5900 | mips64r5900el \ | |
| 1197 | + | mips64vr | mips64vrel \ | |
| 1198 | + | mips64vr4100 | mips64vr4100el \ | |
| 1199 | + | mips64vr4300 | mips64vr4300el \ | |
| 1200 | + | mips64vr5000 | mips64vr5000el \ | |
| 1201 | + | mips64vr5900 | mips64vr5900el \ | |
| 1202 | + | mipsisa32 | mipsisa32el \ | |
| 1203 | + | mipsisa32r2 | mipsisa32r2el \ | |
| 1204 | + | mipsisa32r6 | mipsisa32r6el \ | |
| 1205 | + | mipsisa64 | mipsisa64el \ | |
| 1206 | + | mipsisa64r2 | mipsisa64r2el \ | |
| 1207 | + | mipsisa64r6 | mipsisa64r6el \ | |
| 1208 | + | mipsisa64sb1 | mipsisa64sb1el \ | |
| 1209 | + | mipsisa64sr71k | mipsisa64sr71kel \ | |
| 1210 | + | mipsr5900 | mipsr5900el \ | |
| 1211 | + | mipstx39 | mipstx39el \ | |
| 1212 | + | mmix \ | |
| 1213 | + | mn10200 | mn10300 \ | |
| 1214 | + | moxie \ | |
| 1215 | + | mt \ | |
| 1216 | + | msp430 \ | |
| 1217 | + | nds32 | nds32le | nds32be \ | |
| 1218 | + | nfp \ | |
| 1219 | + | nios | nios2 | nios2eb | nios2el \ | |
| 1220 | + | none | np1 | ns16k | ns32k | nvptx \ | |
| 1221 | + | open8 \ | |
| 1222 | + | or1k* \ | |
| 1223 | + | or32 \ | |
| 1224 | + | orion \ | |
| 1225 | + | picochip \ | |
| 1226 | + | pdp10 | pdp11 | pj | pjl | pn | power \ | |
| 1227 | + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | |
| 1228 | + | pru \ | |
| 1229 | + | pyramid \ | |
| 1230 | + | riscv | riscv32 | riscv64 \ | |
| 1231 | + | rl78 | romp | rs6000 | rx \ | |
| 1232 | + | score \ | |
| 1233 | + | sh | shl \ | |
| 1234 | + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | |
| 1235 | + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ | |
| 1236 | + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | |
| 1237 | + | sparclite \ | |
| 1238 | + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | |
| 1239 | + | spu \ | |
| 1240 | + | tahoe \ | |
| 1241 | + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | |
| 1242 | + | tron \ | |
| 1243 | + | ubicom32 \ | |
| 1244 | + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | |
| 1245 | + | vax \ | |
| 1246 | + | visium \ | |
| 1247 | + | w65 \ | |
| 1248 | + | wasm32 | wasm64 \ | |
| 1249 | + | we32k \ | |
| 1250 | + | x86 | x86_64 | xc16x | xgate | xps100 \ | |
| 1251 | + | xstormy16 | xtensa* \ | |
| 1252 | + | ymp \ | |
| 1253 | + | z8k | z80) | |
| 1254 | + ;; | |
| 1255 | + | |
| 1256 | + *) | |
| 1257 | + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 | |
| 1258 | + exit 1 | |
| 1259 | + ;; | |
| 1260 | + esac | |
| 1295 | 1261 | ;; |
| 1296 | 1262 | esac |
| 1297 | 1263 | |
| 1298 | 1264 | # Here we canonicalize certain aliases for manufacturers. |
| 1299 | -case $basic_machine in | |
| 1300 | - *-digital*) | |
| 1301 | - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
| 1265 | +case $vendor in | |
| 1266 | + digital*) | |
| 1267 | + vendor=dec | |
| 1302 | 1268 | ;; |
| 1303 | - *-commodore*) | |
| 1304 | - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
| 1269 | + commodore*) | |
| 1270 | + vendor=cbm | |
| 1305 | 1271 | ;; |
| 1306 | 1272 | *) |
| 1307 | 1273 | ;; |
| ... | ... | @@ -1309,200 +1275,244 @@ esac |
| 1309 | 1275 | |
| 1310 | 1276 | # Decode manufacturer-specific aliases for certain operating systems. |
| 1311 | 1277 | |
| 1312 | -if [ x"$os" != x"" ] | |
| 1278 | +if [ x$os != x ] | |
| 1313 | 1279 | then |
| 1314 | 1280 | case $os in |
| 1315 | - # First match some system type aliases | |
| 1316 | - # that might get confused with valid system types. | |
| 1317 | - # -solaris* is a basic system type, with this one exception. | |
| 1318 | - -auroraux) | |
| 1319 | - os=-auroraux | |
| 1281 | + # First match some system type aliases that might get confused | |
| 1282 | + # with valid system types. | |
| 1283 | + # solaris* is a basic system type, with this one exception. | |
| 1284 | + auroraux) | |
| 1285 | + os=auroraux | |
| 1320 | 1286 | ;; |
| 1321 | - -solaris1 | -solaris1.*) | |
| 1322 | - os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
| 1287 | + bluegene*) | |
| 1288 | + os=cnk | |
| 1323 | 1289 | ;; |
| 1324 | - -solaris) | |
| 1325 | - os=-solaris2 | |
| 1290 | + solaris1 | solaris1.*) | |
| 1291 | + os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
| 1326 | 1292 | ;; |
| 1327 | - -svr4*) | |
| 1328 | - os=-sysv4 | |
| 1293 | + solaris) | |
| 1294 | + os=solaris2 | |
| 1329 | 1295 | ;; |
| 1330 | - -unixware*) | |
| 1331 | - os=-sysv4.2uw | |
| 1296 | + unixware*) | |
| 1297 | + os=sysv4.2uw | |
| 1332 | 1298 | ;; |
| 1333 | - -gnu/linux*) | |
| 1299 | + gnu/linux*) | |
| 1334 | 1300 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` |
| 1335 | 1301 | ;; |
| 1336 | - # First accept the basic system types. | |
| 1302 | + # es1800 is here to avoid being matched by es* (a different OS) | |
| 1303 | + es1800*) | |
| 1304 | + os=ose | |
| 1305 | + ;; | |
| 1306 | + # Some version numbers need modification | |
| 1307 | + chorusos*) | |
| 1308 | + os=chorusos | |
| 1309 | + ;; | |
| 1310 | + isc) | |
| 1311 | + os=isc2.2 | |
| 1312 | + ;; | |
| 1313 | + sco6) | |
| 1314 | + os=sco5v6 | |
| 1315 | + ;; | |
| 1316 | + sco5) | |
| 1317 | + os=sco3.2v5 | |
| 1318 | + ;; | |
| 1319 | + sco4) | |
| 1320 | + os=sco3.2v4 | |
| 1321 | + ;; | |
| 1322 | + sco3.2.[4-9]*) | |
| 1323 | + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
| 1324 | + ;; | |
| 1325 | + sco3.2v[4-9]* | sco5v6*) | |
| 1326 | + # Don't forget version if it is 3.2v4 or newer. | |
| 1327 | + ;; | |
| 1328 | + scout) | |
| 1329 | + # Don't match below | |
| 1330 | + ;; | |
| 1331 | + sco*) | |
| 1332 | + os=sco3.2v2 | |
| 1333 | + ;; | |
| 1334 | + psos*) | |
| 1335 | + os=psos | |
| 1336 | + ;; | |
| 1337 | + # Now accept the basic system types. | |
| 1337 | 1338 | # The portable systems comes first. |
| 1338 | - # Each alternative MUST END IN A *, to match a version number. | |
| 1339 | - # -sysv* is not here because it comes later, after sysvr4. | |
| 1340 | - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | |
| 1341 | - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | |
| 1342 | - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | |
| 1343 | - | -sym* | -kopensolaris* \ | |
| 1344 | - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | |
| 1345 | - | -aos* | -aros* \ | |
| 1346 | - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | |
| 1347 | - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
| 1348 | - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | |
| 1349 | - | -openbsd* | -solidbsd* \ | |
| 1350 | - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | |
| 1351 | - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | |
| 1352 | - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | |
| 1353 | - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | |
| 1354 | - | -chorusos* | -chorusrdb* | -cegcc* \ | |
| 1355 | - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | |
| 1356 | - | -mingw32* | -linux-gnu* | -linux-android* \ | |
| 1357 | - | -linux-newlib* | -linux-uclibc* \ | |
| 1358 | - | -uxpv* | -beos* | -mpeix* | -udk* \ | |
| 1359 | - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | |
| 1360 | - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | |
| 1361 | - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | |
| 1362 | - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | |
| 1363 | - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | |
| 1364 | - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | |
| 1365 | - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | |
| 1339 | + # Each alternative MUST end in a * to match a version number. | |
| 1340 | + # sysv* is not here because it comes later, after sysvr4. | |
| 1341 | + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ | |
| 1342 | + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ | |
| 1343 | + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | |
| 1344 | + | sym* | kopensolaris* | plan9* \ | |
| 1345 | + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | |
| 1346 | + | aos* | aros* | cloudabi* | sortix* | twizzler* \ | |
| 1347 | + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | |
| 1348 | + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | |
| 1349 | + | knetbsd* | mirbsd* | netbsd* \ | |
| 1350 | + | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ | |
| 1351 | + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ | |
| 1352 | + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | |
| 1353 | + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | |
| 1354 | + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ | |
| 1355 | + | chorusrdb* | cegcc* | glidix* \ | |
| 1356 | + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | |
| 1357 | + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ | |
| 1358 | + | linux-newlib* | linux-musl* | linux-uclibc* \ | |
| 1359 | + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | |
| 1360 | + | interix* | uwin* | mks* | rhapsody* | darwin* \ | |
| 1361 | + | openstep* | oskit* | conix* | pw32* | nonstopux* \ | |
| 1362 | + | storm-chaos* | tops10* | tenex* | tops20* | its* \ | |
| 1363 | + | os2* | vos* | palmos* | uclinux* | nucleus* \ | |
| 1364 | + | morphos* | superux* | rtmk* | windiss* \ | |
| 1365 | + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | |
| 1366 | + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | |
| 1367 | + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | |
| 1368 | + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | |
| 1369 | + | nsk* | powerunix) | |
| 1366 | 1370 | # Remember, each alternative MUST END IN *, to match a version number. |
| 1367 | 1371 | ;; |
| 1368 | - -qnx*) | |
| 1369 | - case $basic_machine in | |
| 1370 | - x86-* | i*86-*) | |
| 1372 | + qnx*) | |
| 1373 | + case $cpu in | |
| 1374 | + x86 | i*86) | |
| 1371 | 1375 | ;; |
| 1372 | 1376 | *) |
| 1373 | - os=-nto$os | |
| 1377 | + os=nto-$os | |
| 1374 | 1378 | ;; |
| 1375 | 1379 | esac |
| 1376 | 1380 | ;; |
| 1377 | - -nto-qnx*) | |
| 1381 | + hiux*) | |
| 1382 | + os=hiuxwe2 | |
| 1378 | 1383 | ;; |
| 1379 | - -nto*) | |
| 1380 | - os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
| 1384 | + nto-qnx*) | |
| 1381 | 1385 | ;; |
| 1382 | - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | |
| 1383 | - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | |
| 1384 | - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | |
| 1386 | + nto*) | |
| 1387 | + os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
| 1385 | 1388 | ;; |
| 1386 | - -mac*) | |
| 1387 | - os=`echo $os | sed -e 's|mac|macos|'` | |
| 1389 | + sim | xray | os68k* | v88r* \ | |
| 1390 | + | windows* | osx | abug | netware* | os9* \ | |
| 1391 | + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) | |
| 1388 | 1392 | ;; |
| 1389 | - -linux-dietlibc) | |
| 1390 | - os=-linux-dietlibc | |
| 1393 | + linux-dietlibc) | |
| 1394 | + os=linux-dietlibc | |
| 1391 | 1395 | ;; |
| 1392 | - -linux*) | |
| 1396 | + linux*) | |
| 1393 | 1397 | os=`echo $os | sed -e 's|linux|linux-gnu|'` |
| 1394 | 1398 | ;; |
| 1395 | - -sunos5*) | |
| 1396 | - os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
| 1399 | + lynx*178) | |
| 1400 | + os=lynxos178 | |
| 1401 | + ;; | |
| 1402 | + lynx*5) | |
| 1403 | + os=lynxos5 | |
| 1397 | 1404 | ;; |
| 1398 | - -sunos6*) | |
| 1399 | - os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
| 1405 | + lynx*) | |
| 1406 | + os=lynxos | |
| 1400 | 1407 | ;; |
| 1401 | - -opened*) | |
| 1402 | - os=-openedition | |
| 1408 | + mac*) | |
| 1409 | + os=`echo "$os" | sed -e 's|mac|macos|'` | |
| 1403 | 1410 | ;; |
| 1404 | - -os400*) | |
| 1405 | - os=-os400 | |
| 1411 | + opened*) | |
| 1412 | + os=openedition | |
| 1406 | 1413 | ;; |
| 1407 | - -wince*) | |
| 1408 | - os=-wince | |
| 1414 | + os400*) | |
| 1415 | + os=os400 | |
| 1409 | 1416 | ;; |
| 1410 | - -osfrose*) | |
| 1411 | - os=-osfrose | |
| 1417 | + sunos5*) | |
| 1418 | + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` | |
| 1412 | 1419 | ;; |
| 1413 | - -osf*) | |
| 1414 | - os=-osf | |
| 1420 | + sunos6*) | |
| 1421 | + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` | |
| 1415 | 1422 | ;; |
| 1416 | - -utek*) | |
| 1417 | - os=-bsd | |
| 1423 | + wince*) | |
| 1424 | + os=wince | |
| 1418 | 1425 | ;; |
| 1419 | - -dynix*) | |
| 1420 | - os=-bsd | |
| 1426 | + utek*) | |
| 1427 | + os=bsd | |
| 1421 | 1428 | ;; |
| 1422 | - -acis*) | |
| 1423 | - os=-aos | |
| 1429 | + dynix*) | |
| 1430 | + os=bsd | |
| 1424 | 1431 | ;; |
| 1425 | - -atheos*) | |
| 1426 | - os=-atheos | |
| 1432 | + acis*) | |
| 1433 | + os=aos | |
| 1427 | 1434 | ;; |
| 1428 | - -syllable*) | |
| 1429 | - os=-syllable | |
| 1435 | + atheos*) | |
| 1436 | + os=atheos | |
| 1430 | 1437 | ;; |
| 1431 | - -386bsd) | |
| 1432 | - os=-bsd | |
| 1438 | + syllable*) | |
| 1439 | + os=syllable | |
| 1433 | 1440 | ;; |
| 1434 | - -ctix* | -uts*) | |
| 1435 | - os=-sysv | |
| 1441 | + 386bsd) | |
| 1442 | + os=bsd | |
| 1436 | 1443 | ;; |
| 1437 | - -nova*) | |
| 1438 | - os=-rtmk-nova | |
| 1444 | + ctix* | uts*) | |
| 1445 | + os=sysv | |
| 1439 | 1446 | ;; |
| 1440 | - -ns2 ) | |
| 1441 | - os=-nextstep2 | |
| 1447 | + nova*) | |
| 1448 | + os=rtmk-nova | |
| 1442 | 1449 | ;; |
| 1443 | - -nsk*) | |
| 1444 | - os=-nsk | |
| 1450 | + ns2) | |
| 1451 | + os=nextstep2 | |
| 1445 | 1452 | ;; |
| 1446 | 1453 | # Preserve the version number of sinix5. |
| 1447 | - -sinix5.*) | |
| 1454 | + sinix5.*) | |
| 1448 | 1455 | os=`echo $os | sed -e 's|sinix|sysv|'` |
| 1449 | 1456 | ;; |
| 1450 | - -sinix*) | |
| 1451 | - os=-sysv4 | |
| 1457 | + sinix*) | |
| 1458 | + os=sysv4 | |
| 1452 | 1459 | ;; |
| 1453 | - -tpf*) | |
| 1454 | - os=-tpf | |
| 1460 | + tpf*) | |
| 1461 | + os=tpf | |
| 1455 | 1462 | ;; |
| 1456 | - -triton*) | |
| 1457 | - os=-sysv3 | |
| 1463 | + triton*) | |
| 1464 | + os=sysv3 | |
| 1458 | 1465 | ;; |
| 1459 | - -oss*) | |
| 1460 | - os=-sysv3 | |
| 1466 | + oss*) | |
| 1467 | + os=sysv3 | |
| 1461 | 1468 | ;; |
| 1462 | - -svr4) | |
| 1463 | - os=-sysv4 | |
| 1469 | + svr4*) | |
| 1470 | + os=sysv4 | |
| 1464 | 1471 | ;; |
| 1465 | - -svr3) | |
| 1466 | - os=-sysv3 | |
| 1472 | + svr3) | |
| 1473 | + os=sysv3 | |
| 1467 | 1474 | ;; |
| 1468 | - -sysvr4) | |
| 1469 | - os=-sysv4 | |
| 1475 | + sysvr4) | |
| 1476 | + os=sysv4 | |
| 1470 | 1477 | ;; |
| 1471 | - # This must come after -sysvr4. | |
| 1472 | - -sysv*) | |
| 1478 | + # This must come after sysvr4. | |
| 1479 | + sysv*) | |
| 1473 | 1480 | ;; |
| 1474 | - -ose*) | |
| 1475 | - os=-ose | |
| 1481 | + ose*) | |
| 1482 | + os=ose | |
| 1476 | 1483 | ;; |
| 1477 | - -es1800*) | |
| 1478 | - os=-ose | |
| 1484 | + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
| 1485 | + os=mint | |
| 1479 | 1486 | ;; |
| 1480 | - -xenix) | |
| 1481 | - os=-xenix | |
| 1487 | + zvmoe) | |
| 1488 | + os=zvmoe | |
| 1482 | 1489 | ;; |
| 1483 | - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
| 1484 | - os=-mint | |
| 1490 | + dicos*) | |
| 1491 | + os=dicos | |
| 1485 | 1492 | ;; |
| 1486 | - -aros*) | |
| 1487 | - os=-aros | |
| 1488 | - ;; | |
| 1489 | - -kaos*) | |
| 1490 | - os=-kaos | |
| 1493 | + pikeos*) | |
| 1494 | + # Until real need of OS specific support for | |
| 1495 | + # particular features comes up, bare metal | |
| 1496 | + # configurations are quite functional. | |
| 1497 | + case $cpu in | |
| 1498 | + arm*) | |
| 1499 | + os=eabi | |
| 1500 | + ;; | |
| 1501 | + *) | |
| 1502 | + os=elf | |
| 1503 | + ;; | |
| 1504 | + esac | |
| 1491 | 1505 | ;; |
| 1492 | - -zvmoe) | |
| 1493 | - os=-zvmoe | |
| 1506 | + nacl*) | |
| 1494 | 1507 | ;; |
| 1495 | - -dicos*) | |
| 1496 | - os=-dicos | |
| 1508 | + ios) | |
| 1497 | 1509 | ;; |
| 1498 | - -nacl*) | |
| 1510 | + none) | |
| 1499 | 1511 | ;; |
| 1500 | - -none) | |
| 1512 | + *-eabi) | |
| 1501 | 1513 | ;; |
| 1502 | 1514 | *) |
| 1503 | - # Get rid of the `-' at the beginning of $os. | |
| 1504 | - os=`echo $os | sed 's/[^-]*-//'` | |
| 1505 | - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
| 1515 | + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 | |
| 1506 | 1516 | exit 1 |
| 1507 | 1517 | ;; |
| 1508 | 1518 | esac |
| ... | ... | @@ -1518,255 +1528,265 @@ else |
| 1518 | 1528 | # will signal an error saying that MANUFACTURER isn't an operating |
| 1519 | 1529 | # system, and we'll never get to this point. |
| 1520 | 1530 | |
| 1521 | -case $basic_machine in | |
| 1531 | +case $cpu-$vendor in | |
| 1522 | 1532 | score-*) |
| 1523 | - os=-elf | |
| 1533 | + os=elf | |
| 1524 | 1534 | ;; |
| 1525 | 1535 | spu-*) |
| 1526 | - os=-elf | |
| 1536 | + os=elf | |
| 1527 | 1537 | ;; |
| 1528 | 1538 | *-acorn) |
| 1529 | - os=-riscix1.2 | |
| 1539 | + os=riscix1.2 | |
| 1530 | 1540 | ;; |
| 1531 | 1541 | arm*-rebel) |
| 1532 | - os=-linux | |
| 1542 | + os=linux | |
| 1533 | 1543 | ;; |
| 1534 | 1544 | arm*-semi) |
| 1535 | - os=-aout | |
| 1545 | + os=aout | |
| 1536 | 1546 | ;; |
| 1537 | 1547 | c4x-* | tic4x-*) |
| 1538 | - os=-coff | |
| 1548 | + os=coff | |
| 1549 | + ;; | |
| 1550 | + c8051-*) | |
| 1551 | + os=elf | |
| 1552 | + ;; | |
| 1553 | + clipper-intergraph) | |
| 1554 | + os=clix | |
| 1555 | + ;; | |
| 1556 | + hexagon-*) | |
| 1557 | + os=elf | |
| 1539 | 1558 | ;; |
| 1540 | 1559 | tic54x-*) |
| 1541 | - os=-coff | |
| 1560 | + os=coff | |
| 1542 | 1561 | ;; |
| 1543 | 1562 | tic55x-*) |
| 1544 | - os=-coff | |
| 1563 | + os=coff | |
| 1545 | 1564 | ;; |
| 1546 | 1565 | tic6x-*) |
| 1547 | - os=-coff | |
| 1566 | + os=coff | |
| 1548 | 1567 | ;; |
| 1549 | 1568 | # This must come before the *-dec entry. |
| 1550 | 1569 | pdp10-*) |
| 1551 | - os=-tops20 | |
| 1570 | + os=tops20 | |
| 1552 | 1571 | ;; |
| 1553 | 1572 | pdp11-*) |
| 1554 | - os=-none | |
| 1573 | + os=none | |
| 1555 | 1574 | ;; |
| 1556 | 1575 | *-dec | vax-*) |
| 1557 | - os=-ultrix4.2 | |
| 1576 | + os=ultrix4.2 | |
| 1558 | 1577 | ;; |
| 1559 | 1578 | m68*-apollo) |
| 1560 | - os=-domain | |
| 1579 | + os=domain | |
| 1561 | 1580 | ;; |
| 1562 | 1581 | i386-sun) |
| 1563 | - os=-sunos4.0.2 | |
| 1582 | + os=sunos4.0.2 | |
| 1564 | 1583 | ;; |
| 1565 | 1584 | m68000-sun) |
| 1566 | - os=-sunos3 | |
| 1585 | + os=sunos3 | |
| 1567 | 1586 | ;; |
| 1568 | 1587 | m68*-cisco) |
| 1569 | - os=-aout | |
| 1588 | + os=aout | |
| 1570 | 1589 | ;; |
| 1571 | 1590 | mep-*) |
| 1572 | - os=-elf | |
| 1591 | + os=elf | |
| 1573 | 1592 | ;; |
| 1574 | 1593 | mips*-cisco) |
| 1575 | - os=-elf | |
| 1594 | + os=elf | |
| 1576 | 1595 | ;; |
| 1577 | 1596 | mips*-*) |
| 1578 | - os=-elf | |
| 1597 | + os=elf | |
| 1579 | 1598 | ;; |
| 1580 | 1599 | or32-*) |
| 1581 | - os=-coff | |
| 1600 | + os=coff | |
| 1582 | 1601 | ;; |
| 1583 | 1602 | *-tti) # must be before sparc entry or we get the wrong os. |
| 1584 | - os=-sysv3 | |
| 1603 | + os=sysv3 | |
| 1585 | 1604 | ;; |
| 1586 | 1605 | sparc-* | *-sun) |
| 1587 | - os=-sunos4.1.1 | |
| 1606 | + os=sunos4.1.1 | |
| 1588 | 1607 | ;; |
| 1589 | - *-be) | |
| 1590 | - os=-beos | |
| 1608 | + pru-*) | |
| 1609 | + os=elf | |
| 1591 | 1610 | ;; |
| 1592 | - *-haiku) | |
| 1593 | - os=-haiku | |
| 1611 | + *-be) | |
| 1612 | + os=beos | |
| 1594 | 1613 | ;; |
| 1595 | 1614 | *-ibm) |
| 1596 | - os=-aix | |
| 1615 | + os=aix | |
| 1597 | 1616 | ;; |
| 1598 | 1617 | *-knuth) |
| 1599 | - os=-mmixware | |
| 1618 | + os=mmixware | |
| 1600 | 1619 | ;; |
| 1601 | 1620 | *-wec) |
| 1602 | - os=-proelf | |
| 1621 | + os=proelf | |
| 1603 | 1622 | ;; |
| 1604 | 1623 | *-winbond) |
| 1605 | - os=-proelf | |
| 1624 | + os=proelf | |
| 1606 | 1625 | ;; |
| 1607 | 1626 | *-oki) |
| 1608 | - os=-proelf | |
| 1627 | + os=proelf | |
| 1609 | 1628 | ;; |
| 1610 | 1629 | *-hp) |
| 1611 | - os=-hpux | |
| 1630 | + os=hpux | |
| 1612 | 1631 | ;; |
| 1613 | 1632 | *-hitachi) |
| 1614 | - os=-hiux | |
| 1633 | + os=hiux | |
| 1615 | 1634 | ;; |
| 1616 | 1635 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
| 1617 | - os=-sysv | |
| 1636 | + os=sysv | |
| 1618 | 1637 | ;; |
| 1619 | 1638 | *-cbm) |
| 1620 | - os=-amigaos | |
| 1639 | + os=amigaos | |
| 1621 | 1640 | ;; |
| 1622 | 1641 | *-dg) |
| 1623 | - os=-dgux | |
| 1642 | + os=dgux | |
| 1624 | 1643 | ;; |
| 1625 | 1644 | *-dolphin) |
| 1626 | - os=-sysv3 | |
| 1645 | + os=sysv3 | |
| 1627 | 1646 | ;; |
| 1628 | 1647 | m68k-ccur) |
| 1629 | - os=-rtu | |
| 1648 | + os=rtu | |
| 1630 | 1649 | ;; |
| 1631 | 1650 | m88k-omron*) |
| 1632 | - os=-luna | |
| 1651 | + os=luna | |
| 1633 | 1652 | ;; |
| 1634 | - *-next ) | |
| 1635 | - os=-nextstep | |
| 1653 | + *-next) | |
| 1654 | + os=nextstep | |
| 1636 | 1655 | ;; |
| 1637 | 1656 | *-sequent) |
| 1638 | - os=-ptx | |
| 1657 | + os=ptx | |
| 1639 | 1658 | ;; |
| 1640 | 1659 | *-crds) |
| 1641 | - os=-unos | |
| 1660 | + os=unos | |
| 1642 | 1661 | ;; |
| 1643 | 1662 | *-ns) |
| 1644 | - os=-genix | |
| 1663 | + os=genix | |
| 1645 | 1664 | ;; |
| 1646 | 1665 | i370-*) |
| 1647 | - os=-mvs | |
| 1648 | - ;; | |
| 1649 | - *-next) | |
| 1650 | - os=-nextstep3 | |
| 1666 | + os=mvs | |
| 1651 | 1667 | ;; |
| 1652 | 1668 | *-gould) |
| 1653 | - os=-sysv | |
| 1669 | + os=sysv | |
| 1654 | 1670 | ;; |
| 1655 | 1671 | *-highlevel) |
| 1656 | - os=-bsd | |
| 1672 | + os=bsd | |
| 1657 | 1673 | ;; |
| 1658 | 1674 | *-encore) |
| 1659 | - os=-bsd | |
| 1675 | + os=bsd | |
| 1660 | 1676 | ;; |
| 1661 | 1677 | *-sgi) |
| 1662 | - os=-irix | |
| 1678 | + os=irix | |
| 1663 | 1679 | ;; |
| 1664 | 1680 | *-siemens) |
| 1665 | - os=-sysv4 | |
| 1681 | + os=sysv4 | |
| 1666 | 1682 | ;; |
| 1667 | 1683 | *-masscomp) |
| 1668 | - os=-rtu | |
| 1684 | + os=rtu | |
| 1669 | 1685 | ;; |
| 1670 | 1686 | f30[01]-fujitsu | f700-fujitsu) |
| 1671 | - os=-uxpv | |
| 1687 | + os=uxpv | |
| 1672 | 1688 | ;; |
| 1673 | 1689 | *-rom68k) |
| 1674 | - os=-coff | |
| 1690 | + os=coff | |
| 1675 | 1691 | ;; |
| 1676 | 1692 | *-*bug) |
| 1677 | - os=-coff | |
| 1693 | + os=coff | |
| 1678 | 1694 | ;; |
| 1679 | 1695 | *-apple) |
| 1680 | - os=-macos | |
| 1696 | + os=macos | |
| 1681 | 1697 | ;; |
| 1682 | 1698 | *-atari*) |
| 1683 | - os=-mint | |
| 1699 | + os=mint | |
| 1700 | + ;; | |
| 1701 | + *-wrs) | |
| 1702 | + os=vxworks | |
| 1684 | 1703 | ;; |
| 1685 | 1704 | *) |
| 1686 | - os=-none | |
| 1705 | + os=none | |
| 1687 | 1706 | ;; |
| 1688 | 1707 | esac |
| 1689 | 1708 | fi |
| 1690 | 1709 | |
| 1691 | 1710 | # Here we handle the case where we know the os, and the CPU type, but not the |
| 1692 | 1711 | # manufacturer. We pick the logical manufacturer. |
| 1693 | -vendor=unknown | |
| 1694 | -case $basic_machine in | |
| 1695 | - *-unknown) | |
| 1712 | +case $vendor in | |
| 1713 | + unknown) | |
| 1696 | 1714 | case $os in |
| 1697 | - -riscix*) | |
| 1715 | + riscix*) | |
| 1698 | 1716 | vendor=acorn |
| 1699 | 1717 | ;; |
| 1700 | - -sunos*) | |
| 1718 | + sunos*) | |
| 1701 | 1719 | vendor=sun |
| 1702 | 1720 | ;; |
| 1703 | - -cnk*|-aix*) | |
| 1721 | + cnk*|-aix*) | |
| 1704 | 1722 | vendor=ibm |
| 1705 | 1723 | ;; |
| 1706 | - -beos*) | |
| 1724 | + beos*) | |
| 1707 | 1725 | vendor=be |
| 1708 | 1726 | ;; |
| 1709 | - -hpux*) | |
| 1727 | + hpux*) | |
| 1710 | 1728 | vendor=hp |
| 1711 | 1729 | ;; |
| 1712 | - -mpeix*) | |
| 1730 | + mpeix*) | |
| 1713 | 1731 | vendor=hp |
| 1714 | 1732 | ;; |
| 1715 | - -hiux*) | |
| 1733 | + hiux*) | |
| 1716 | 1734 | vendor=hitachi |
| 1717 | 1735 | ;; |
| 1718 | - -unos*) | |
| 1736 | + unos*) | |
| 1719 | 1737 | vendor=crds |
| 1720 | 1738 | ;; |
| 1721 | - -dgux*) | |
| 1739 | + dgux*) | |
| 1722 | 1740 | vendor=dg |
| 1723 | 1741 | ;; |
| 1724 | - -luna*) | |
| 1742 | + luna*) | |
| 1725 | 1743 | vendor=omron |
| 1726 | 1744 | ;; |
| 1727 | - -genix*) | |
| 1745 | + genix*) | |
| 1728 | 1746 | vendor=ns |
| 1729 | 1747 | ;; |
| 1730 | - -mvs* | -opened*) | |
| 1748 | + clix*) | |
| 1749 | + vendor=intergraph | |
| 1750 | + ;; | |
| 1751 | + mvs* | opened*) | |
| 1731 | 1752 | vendor=ibm |
| 1732 | 1753 | ;; |
| 1733 | - -os400*) | |
| 1754 | + os400*) | |
| 1734 | 1755 | vendor=ibm |
| 1735 | 1756 | ;; |
| 1736 | - -ptx*) | |
| 1757 | + ptx*) | |
| 1737 | 1758 | vendor=sequent |
| 1738 | 1759 | ;; |
| 1739 | - -tpf*) | |
| 1760 | + tpf*) | |
| 1740 | 1761 | vendor=ibm |
| 1741 | 1762 | ;; |
| 1742 | - -vxsim* | -vxworks* | -windiss*) | |
| 1763 | + vxsim* | vxworks* | windiss*) | |
| 1743 | 1764 | vendor=wrs |
| 1744 | 1765 | ;; |
| 1745 | - -aux*) | |
| 1766 | + aux*) | |
| 1746 | 1767 | vendor=apple |
| 1747 | 1768 | ;; |
| 1748 | - -hms*) | |
| 1769 | + hms*) | |
| 1749 | 1770 | vendor=hitachi |
| 1750 | 1771 | ;; |
| 1751 | - -mpw* | -macos*) | |
| 1772 | + mpw* | macos*) | |
| 1752 | 1773 | vendor=apple |
| 1753 | 1774 | ;; |
| 1754 | - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
| 1775 | + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
| 1755 | 1776 | vendor=atari |
| 1756 | 1777 | ;; |
| 1757 | - -vos*) | |
| 1778 | + vos*) | |
| 1758 | 1779 | vendor=stratus |
| 1759 | 1780 | ;; |
| 1760 | 1781 | esac |
| 1761 | - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
| 1762 | 1782 | ;; |
| 1763 | 1783 | esac |
| 1764 | 1784 | |
| 1765 | -echo $basic_machine$os | |
| 1785 | +echo "$cpu-$vendor-$os" | |
| 1766 | 1786 | exit |
| 1767 | 1787 | |
| 1768 | 1788 | # Local variables: |
| 1769 | -# eval: (add-hook 'write-file-hooks 'time-stamp) | |
| 1789 | +# eval: (add-hook 'before-save-hook 'time-stamp) | |
| 1770 | 1790 | # time-stamp-start: "timestamp='" |
| 1771 | 1791 | # time-stamp-format: "%:y-%02m-%02d" |
| 1772 | 1792 | # time-stamp-end: "'" | ... | ... |
configure
| ... | ... | @@ -6890,11 +6890,8 @@ _LT_EOF |
| 6890 | 6890 | test $ac_status = 0; }; then |
| 6891 | 6891 | # Now try to grab the symbols. |
| 6892 | 6892 | nlist=conftest.nm |
| 6893 | - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 | |
| 6894 | - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 | |
| 6895 | - ac_status=$? | |
| 6896 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 6897 | - test $ac_status = 0; } && test -s "$nlist"; then | |
| 6893 | + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 | |
| 6894 | + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then | |
| 6898 | 6895 | # Try sorting and uniquifying the output. |
| 6899 | 6896 | if sort "$nlist" | uniq > "$nlist"T; then |
| 6900 | 6897 | mv -f "$nlist"T "$nlist" |
| ... | ... | @@ -9301,6 +9298,12 @@ lt_prog_compiler_static= |
| 9301 | 9298 | lt_prog_compiler_pic='-KPIC' |
| 9302 | 9299 | lt_prog_compiler_static='-static' |
| 9303 | 9300 | ;; |
| 9301 | + # flang / f18. f95 an alias for gfortran or flang on Debian | |
| 9302 | + flang* | f18* | f95*) | |
| 9303 | + lt_prog_compiler_wl='-Wl,' | |
| 9304 | + lt_prog_compiler_pic='-fPIC' | |
| 9305 | + lt_prog_compiler_static='-static' | |
| 9306 | + ;; | |
| 9304 | 9307 | # icc used to be incompatible with GCC. |
| 9305 | 9308 | # ICC 10 doesn't accept -KPIC any more. |
| 9306 | 9309 | icc* | ifort*) |
| ... | ... | @@ -13243,7 +13246,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld |
| 13243 | 13246 | # Commands to make compiler produce verbose output that lists |
| 13244 | 13247 | # what "hidden" libraries, object files and flags are used when |
| 13245 | 13248 | # linking a shared library. |
| 13246 | - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
| 13249 | + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
| 13247 | 13250 | |
| 13248 | 13251 | else |
| 13249 | 13252 | GXX=no |
| ... | ... | @@ -13735,7 +13738,7 @@ fi |
| 13735 | 13738 | # explicitly linking system object files so we need to strip them |
| 13736 | 13739 | # from the output so that they don't get included in the library |
| 13737 | 13740 | # dependencies. |
| 13738 | - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
| 13741 | + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
| 13739 | 13742 | ;; |
| 13740 | 13743 | *) |
| 13741 | 13744 | if test yes = "$GXX"; then |
| ... | ... | @@ -13800,7 +13803,7 @@ fi |
| 13800 | 13803 | # explicitly linking system object files so we need to strip them |
| 13801 | 13804 | # from the output so that they don't get included in the library |
| 13802 | 13805 | # dependencies. |
| 13803 | - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
| 13806 | + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
| 13804 | 13807 | ;; |
| 13805 | 13808 | *) |
| 13806 | 13809 | if test yes = "$GXX"; then |
| ... | ... | @@ -14139,7 +14142,7 @@ fi |
| 14139 | 14142 | # Commands to make compiler produce verbose output that lists |
| 14140 | 14143 | # what "hidden" libraries, object files and flags are used when |
| 14141 | 14144 | # linking a shared library. |
| 14142 | - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
| 14145 | + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
| 14143 | 14146 | |
| 14144 | 14147 | else |
| 14145 | 14148 | # FIXME: insert proper C++ library support |
| ... | ... | @@ -14223,7 +14226,7 @@ fi |
| 14223 | 14226 | # Commands to make compiler produce verbose output that lists |
| 14224 | 14227 | # what "hidden" libraries, object files and flags are used when |
| 14225 | 14228 | # linking a shared library. |
| 14226 | - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
| 14229 | + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
| 14227 | 14230 | else |
| 14228 | 14231 | # g++ 2.7 appears to require '-G' NOT '-shared' on this |
| 14229 | 14232 | # platform. |
| ... | ... | @@ -14234,7 +14237,7 @@ fi |
| 14234 | 14237 | # Commands to make compiler produce verbose output that lists |
| 14235 | 14238 | # what "hidden" libraries, object files and flags are used when |
| 14236 | 14239 | # linking a shared library. |
| 14237 | - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
| 14240 | + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
| 14238 | 14241 | fi |
| 14239 | 14242 | |
| 14240 | 14243 | hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' | ... | ... |
ltmain.sh
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | |
| 32 | 32 | PROGRAM=libtool |
| 33 | 33 | PACKAGE=libtool |
| 34 | -VERSION="2.4.6 Debian-2.4.6-2" | |
| 34 | +VERSION="2.4.6 Debian-2.4.6-11" | |
| 35 | 35 | package_revision=2.4.6 |
| 36 | 36 | |
| 37 | 37 | |
| ... | ... | @@ -1370,7 +1370,7 @@ func_lt_ver () |
| 1370 | 1370 | #! /bin/sh |
| 1371 | 1371 | |
| 1372 | 1372 | # Set a version string for this script. |
| 1373 | -scriptversion=2014-01-07.03; # UTC | |
| 1373 | +scriptversion=2015-10-07.11; # UTC | |
| 1374 | 1374 | |
| 1375 | 1375 | # A portable, pluggable option parser for Bourne shell. |
| 1376 | 1376 | # Written by Gary V. Vaughan, 2010 |
| ... | ... | @@ -1530,6 +1530,8 @@ func_run_hooks () |
| 1530 | 1530 | { |
| 1531 | 1531 | $debug_cmd |
| 1532 | 1532 | |
| 1533 | + _G_rc_run_hooks=false | |
| 1534 | + | |
| 1533 | 1535 | case " $hookable_fns " in |
| 1534 | 1536 | *" $1 "*) ;; |
| 1535 | 1537 | *) func_fatal_error "'$1' does not support hook funcions.n" ;; |
| ... | ... | @@ -1538,16 +1540,16 @@ func_run_hooks () |
| 1538 | 1540 | eval _G_hook_fns=\$$1_hooks; shift |
| 1539 | 1541 | |
| 1540 | 1542 | for _G_hook in $_G_hook_fns; do |
| 1541 | - eval $_G_hook '"$@"' | |
| 1542 | - | |
| 1543 | - # store returned options list back into positional | |
| 1544 | - # parameters for next 'cmd' execution. | |
| 1545 | - eval _G_hook_result=\$${_G_hook}_result | |
| 1546 | - eval set dummy "$_G_hook_result"; shift | |
| 1543 | + if eval $_G_hook '"$@"'; then | |
| 1544 | + # store returned options list back into positional | |
| 1545 | + # parameters for next 'cmd' execution. | |
| 1546 | + eval _G_hook_result=\$${_G_hook}_result | |
| 1547 | + eval set dummy "$_G_hook_result"; shift | |
| 1548 | + _G_rc_run_hooks=: | |
| 1549 | + fi | |
| 1547 | 1550 | done |
| 1548 | 1551 | |
| 1549 | - func_quote_for_eval ${1+"$@"} | |
| 1550 | - func_run_hooks_result=$func_quote_for_eval_result | |
| 1552 | + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result | |
| 1551 | 1553 | } |
| 1552 | 1554 | |
| 1553 | 1555 | |
| ... | ... | @@ -1557,10 +1559,16 @@ func_run_hooks () |
| 1557 | 1559 | ## --------------- ## |
| 1558 | 1560 | |
| 1559 | 1561 | # In order to add your own option parsing hooks, you must accept the |
| 1560 | -# full positional parameter list in your hook function, remove any | |
| 1561 | -# options that you action, and then pass back the remaining unprocessed | |
| 1562 | +# full positional parameter list in your hook function, you may remove/edit | |
| 1563 | +# any options that you action, and then pass back the remaining unprocessed | |
| 1562 | 1564 | # options in '<hooked_function_name>_result', escaped suitably for |
| 1563 | -# 'eval'. Like this: | |
| 1565 | +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the | |
| 1566 | +# hook's caller know that it should pay attention to | |
| 1567 | +# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that | |
| 1568 | +# arguments are left untouched by the hook and therefore caller will ignore the | |
| 1569 | +# result variable. | |
| 1570 | +# | |
| 1571 | +# Like this: | |
| 1564 | 1572 | # |
| 1565 | 1573 | # my_options_prep () |
| 1566 | 1574 | # { |
| ... | ... | @@ -1570,9 +1578,11 @@ func_run_hooks () |
| 1570 | 1578 | # usage_message=$usage_message' |
| 1571 | 1579 | # -s, --silent don'\''t print informational messages |
| 1572 | 1580 | # ' |
| 1573 | -# | |
| 1574 | -# func_quote_for_eval ${1+"$@"} | |
| 1575 | -# my_options_prep_result=$func_quote_for_eval_result | |
| 1581 | +# # No change in '$@' (ignored completely by this hook). There is | |
| 1582 | +# # no need to do the equivalent (but slower) action: | |
| 1583 | +# # func_quote_for_eval ${1+"$@"} | |
| 1584 | +# # my_options_prep_result=$func_quote_for_eval_result | |
| 1585 | +# false | |
| 1576 | 1586 | # } |
| 1577 | 1587 | # func_add_hook func_options_prep my_options_prep |
| 1578 | 1588 | # |
| ... | ... | @@ -1581,25 +1591,37 @@ func_run_hooks () |
| 1581 | 1591 | # { |
| 1582 | 1592 | # $debug_cmd |
| 1583 | 1593 | # |
| 1594 | +# args_changed=false | |
| 1595 | +# | |
| 1584 | 1596 | # # Note that for efficiency, we parse as many options as we can |
| 1585 | 1597 | # # recognise in a loop before passing the remainder back to the |
| 1586 | 1598 | # # caller on the first unrecognised argument we encounter. |
| 1587 | 1599 | # while test $# -gt 0; do |
| 1588 | 1600 | # opt=$1; shift |
| 1589 | 1601 | # case $opt in |
| 1590 | -# --silent|-s) opt_silent=: ;; | |
| 1602 | +# --silent|-s) opt_silent=: | |
| 1603 | +# args_changed=: | |
| 1604 | +# ;; | |
| 1591 | 1605 | # # Separate non-argument short options: |
| 1592 | 1606 | # -s*) func_split_short_opt "$_G_opt" |
| 1593 | 1607 | # set dummy "$func_split_short_opt_name" \ |
| 1594 | 1608 | # "-$func_split_short_opt_arg" ${1+"$@"} |
| 1595 | 1609 | # shift |
| 1610 | +# args_changed=: | |
| 1596 | 1611 | # ;; |
| 1597 | -# *) set dummy "$_G_opt" "$*"; shift; break ;; | |
| 1612 | +# *) # Make sure the first unrecognised option "$_G_opt" | |
| 1613 | +# # is added back to "$@", we could need that later | |
| 1614 | +# # if $args_changed is true. | |
| 1615 | +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
| 1598 | 1616 | # esac |
| 1599 | 1617 | # done |
| 1600 | 1618 | # |
| 1601 | -# func_quote_for_eval ${1+"$@"} | |
| 1602 | -# my_silent_option_result=$func_quote_for_eval_result | |
| 1619 | +# if $args_changed; then | |
| 1620 | +# func_quote_for_eval ${1+"$@"} | |
| 1621 | +# my_silent_option_result=$func_quote_for_eval_result | |
| 1622 | +# fi | |
| 1623 | +# | |
| 1624 | +# $args_changed | |
| 1603 | 1625 | # } |
| 1604 | 1626 | # func_add_hook func_parse_options my_silent_option |
| 1605 | 1627 | # |
| ... | ... | @@ -1611,16 +1633,32 @@ func_run_hooks () |
| 1611 | 1633 | # $opt_silent && $opt_verbose && func_fatal_help "\ |
| 1612 | 1634 | # '--silent' and '--verbose' options are mutually exclusive." |
| 1613 | 1635 | # |
| 1614 | -# func_quote_for_eval ${1+"$@"} | |
| 1615 | -# my_option_validation_result=$func_quote_for_eval_result | |
| 1636 | +# false | |
| 1616 | 1637 | # } |
| 1617 | 1638 | # func_add_hook func_validate_options my_option_validation |
| 1618 | 1639 | # |
| 1619 | -# You'll alse need to manually amend $usage_message to reflect the extra | |
| 1640 | +# You'll also need to manually amend $usage_message to reflect the extra | |
| 1620 | 1641 | # options you parse. It's preferable to append if you can, so that |
| 1621 | 1642 | # multiple option parsing hooks can be added safely. |
| 1622 | 1643 | |
| 1623 | 1644 | |
| 1645 | +# func_options_finish [ARG]... | |
| 1646 | +# ---------------------------- | |
| 1647 | +# Finishing the option parse loop (call 'func_options' hooks ATM). | |
| 1648 | +func_options_finish () | |
| 1649 | +{ | |
| 1650 | + $debug_cmd | |
| 1651 | + | |
| 1652 | + _G_func_options_finish_exit=false | |
| 1653 | + if func_run_hooks func_options ${1+"$@"}; then | |
| 1654 | + func_options_finish_result=$func_run_hooks_result | |
| 1655 | + _G_func_options_finish_exit=: | |
| 1656 | + fi | |
| 1657 | + | |
| 1658 | + $_G_func_options_finish_exit | |
| 1659 | +} | |
| 1660 | + | |
| 1661 | + | |
| 1624 | 1662 | # func_options [ARG]... |
| 1625 | 1663 | # --------------------- |
| 1626 | 1664 | # All the functions called inside func_options are hookable. See the |
| ... | ... | @@ -1630,17 +1668,28 @@ func_options () |
| 1630 | 1668 | { |
| 1631 | 1669 | $debug_cmd |
| 1632 | 1670 | |
| 1633 | - func_options_prep ${1+"$@"} | |
| 1634 | - eval func_parse_options \ | |
| 1635 | - ${func_options_prep_result+"$func_options_prep_result"} | |
| 1636 | - eval func_validate_options \ | |
| 1637 | - ${func_parse_options_result+"$func_parse_options_result"} | |
| 1671 | + _G_rc_options=false | |
| 1638 | 1672 | |
| 1639 | - eval func_run_hooks func_options \ | |
| 1640 | - ${func_validate_options_result+"$func_validate_options_result"} | |
| 1673 | + for my_func in options_prep parse_options validate_options options_finish | |
| 1674 | + do | |
| 1675 | + if eval func_$my_func '${1+"$@"}'; then | |
| 1676 | + eval _G_res_var='$'"func_${my_func}_result" | |
| 1677 | + eval set dummy "$_G_res_var" ; shift | |
| 1678 | + _G_rc_options=: | |
| 1679 | + fi | |
| 1680 | + done | |
| 1681 | + | |
| 1682 | + # Save modified positional parameters for caller. As a top-level | |
| 1683 | + # options-parser function we always need to set the 'func_options_result' | |
| 1684 | + # variable (regardless the $_G_rc_options value). | |
| 1685 | + if $_G_rc_options; then | |
| 1686 | + func_options_result=$_G_res_var | |
| 1687 | + else | |
| 1688 | + func_quote_for_eval ${1+"$@"} | |
| 1689 | + func_options_result=$func_quote_for_eval_result | |
| 1690 | + fi | |
| 1641 | 1691 | |
| 1642 | - # save modified positional parameters for caller | |
| 1643 | - func_options_result=$func_run_hooks_result | |
| 1692 | + $_G_rc_options | |
| 1644 | 1693 | } |
| 1645 | 1694 | |
| 1646 | 1695 | |
| ... | ... | @@ -1649,9 +1698,9 @@ func_options () |
| 1649 | 1698 | # All initialisations required before starting the option parse loop. |
| 1650 | 1699 | # Note that when calling hook functions, we pass through the list of |
| 1651 | 1700 | # positional parameters. If a hook function modifies that list, and |
| 1652 | -# needs to propogate that back to rest of this script, then the complete | |
| 1701 | +# needs to propagate that back to rest of this script, then the complete | |
| 1653 | 1702 | # modified list must be put in 'func_run_hooks_result' before |
| 1654 | -# returning. | |
| 1703 | +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). | |
| 1655 | 1704 | func_hookable func_options_prep |
| 1656 | 1705 | func_options_prep () |
| 1657 | 1706 | { |
| ... | ... | @@ -1661,10 +1710,14 @@ func_options_prep () |
| 1661 | 1710 | opt_verbose=false |
| 1662 | 1711 | opt_warning_types= |
| 1663 | 1712 | |
| 1664 | - func_run_hooks func_options_prep ${1+"$@"} | |
| 1713 | + _G_rc_options_prep=false | |
| 1714 | + if func_run_hooks func_options_prep ${1+"$@"}; then | |
| 1715 | + _G_rc_options_prep=: | |
| 1716 | + # save modified positional parameters for caller | |
| 1717 | + func_options_prep_result=$func_run_hooks_result | |
| 1718 | + fi | |
| 1665 | 1719 | |
| 1666 | - # save modified positional parameters for caller | |
| 1667 | - func_options_prep_result=$func_run_hooks_result | |
| 1720 | + $_G_rc_options_prep | |
| 1668 | 1721 | } |
| 1669 | 1722 | |
| 1670 | 1723 | |
| ... | ... | @@ -1678,18 +1731,20 @@ func_parse_options () |
| 1678 | 1731 | |
| 1679 | 1732 | func_parse_options_result= |
| 1680 | 1733 | |
| 1734 | + _G_rc_parse_options=false | |
| 1681 | 1735 | # this just eases exit handling |
| 1682 | 1736 | while test $# -gt 0; do |
| 1683 | 1737 | # Defer to hook functions for initial option parsing, so they |
| 1684 | 1738 | # get priority in the event of reusing an option name. |
| 1685 | - func_run_hooks func_parse_options ${1+"$@"} | |
| 1686 | - | |
| 1687 | - # Adjust func_parse_options positional parameters to match | |
| 1688 | - eval set dummy "$func_run_hooks_result"; shift | |
| 1739 | + if func_run_hooks func_parse_options ${1+"$@"}; then | |
| 1740 | + eval set dummy "$func_run_hooks_result"; shift | |
| 1741 | + _G_rc_parse_options=: | |
| 1742 | + fi | |
| 1689 | 1743 | |
| 1690 | 1744 | # Break out of the loop if we already parsed every option. |
| 1691 | 1745 | test $# -gt 0 || break |
| 1692 | 1746 | |
| 1747 | + _G_match_parse_options=: | |
| 1693 | 1748 | _G_opt=$1 |
| 1694 | 1749 | shift |
| 1695 | 1750 | case $_G_opt in |
| ... | ... | @@ -1704,7 +1759,10 @@ func_parse_options () |
| 1704 | 1759 | ;; |
| 1705 | 1760 | |
| 1706 | 1761 | --warnings|--warning|-W) |
| 1707 | - test $# = 0 && func_missing_arg $_G_opt && break | |
| 1762 | + if test $# = 0 && func_missing_arg $_G_opt; then | |
| 1763 | + _G_rc_parse_options=: | |
| 1764 | + break | |
| 1765 | + fi | |
| 1708 | 1766 | case " $warning_categories $1" in |
| 1709 | 1767 | *" $1 "*) |
| 1710 | 1768 | # trailing space prevents matching last $1 above |
| ... | ... | @@ -1757,15 +1815,25 @@ func_parse_options () |
| 1757 | 1815 | shift |
| 1758 | 1816 | ;; |
| 1759 | 1817 | |
| 1760 | - --) break ;; | |
| 1818 | + --) _G_rc_parse_options=: ; break ;; | |
| 1761 | 1819 | -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; |
| 1762 | - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
| 1820 | + *) set dummy "$_G_opt" ${1+"$@"}; shift | |
| 1821 | + _G_match_parse_options=false | |
| 1822 | + break | |
| 1823 | + ;; | |
| 1763 | 1824 | esac |
| 1825 | + | |
| 1826 | + $_G_match_parse_options && _G_rc_parse_options=: | |
| 1764 | 1827 | done |
| 1765 | 1828 | |
| 1766 | - # save modified positional parameters for caller | |
| 1767 | - func_quote_for_eval ${1+"$@"} | |
| 1768 | - func_parse_options_result=$func_quote_for_eval_result | |
| 1829 | + | |
| 1830 | + if $_G_rc_parse_options; then | |
| 1831 | + # save modified positional parameters for caller | |
| 1832 | + func_quote_for_eval ${1+"$@"} | |
| 1833 | + func_parse_options_result=$func_quote_for_eval_result | |
| 1834 | + fi | |
| 1835 | + | |
| 1836 | + $_G_rc_parse_options | |
| 1769 | 1837 | } |
| 1770 | 1838 | |
| 1771 | 1839 | |
| ... | ... | @@ -1778,16 +1846,21 @@ func_validate_options () |
| 1778 | 1846 | { |
| 1779 | 1847 | $debug_cmd |
| 1780 | 1848 | |
| 1849 | + _G_rc_validate_options=false | |
| 1850 | + | |
| 1781 | 1851 | # Display all warnings if -W was not given. |
| 1782 | 1852 | test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" |
| 1783 | 1853 | |
| 1784 | - func_run_hooks func_validate_options ${1+"$@"} | |
| 1854 | + if func_run_hooks func_validate_options ${1+"$@"}; then | |
| 1855 | + # save modified positional parameters for caller | |
| 1856 | + func_validate_options_result=$func_run_hooks_result | |
| 1857 | + _G_rc_validate_options=: | |
| 1858 | + fi | |
| 1785 | 1859 | |
| 1786 | 1860 | # Bail if the options were screwed! |
| 1787 | 1861 | $exit_cmd $EXIT_FAILURE |
| 1788 | 1862 | |
| 1789 | - # save modified positional parameters for caller | |
| 1790 | - func_validate_options_result=$func_run_hooks_result | |
| 1863 | + $_G_rc_validate_options | |
| 1791 | 1864 | } |
| 1792 | 1865 | |
| 1793 | 1866 | |
| ... | ... | @@ -2068,7 +2141,7 @@ include the following information: |
| 2068 | 2141 | compiler: $LTCC |
| 2069 | 2142 | compiler flags: $LTCFLAGS |
| 2070 | 2143 | linker: $LD (gnu? $with_gnu_ld) |
| 2071 | - version: $progname $scriptversion Debian-2.4.6-2 | |
| 2144 | + version: $progname $scriptversion Debian-2.4.6-11 | |
| 2072 | 2145 | automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` |
| 2073 | 2146 | autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` |
| 2074 | 2147 | |
| ... | ... | @@ -2270,6 +2343,8 @@ libtool_options_prep () |
| 2270 | 2343 | nonopt= |
| 2271 | 2344 | preserve_args= |
| 2272 | 2345 | |
| 2346 | + _G_rc_lt_options_prep=: | |
| 2347 | + | |
| 2273 | 2348 | # Shorthand for --mode=foo, only valid as the first argument |
| 2274 | 2349 | case $1 in |
| 2275 | 2350 | clean|clea|cle|cl) |
| ... | ... | @@ -2293,11 +2368,18 @@ libtool_options_prep () |
| 2293 | 2368 | uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) |
| 2294 | 2369 | shift; set dummy --mode uninstall ${1+"$@"}; shift |
| 2295 | 2370 | ;; |
| 2371 | + *) | |
| 2372 | + _G_rc_lt_options_prep=false | |
| 2373 | + ;; | |
| 2296 | 2374 | esac |
| 2297 | 2375 | |
| 2298 | - # Pass back the list of options. | |
| 2299 | - func_quote_for_eval ${1+"$@"} | |
| 2300 | - libtool_options_prep_result=$func_quote_for_eval_result | |
| 2376 | + if $_G_rc_lt_options_prep; then | |
| 2377 | + # Pass back the list of options. | |
| 2378 | + func_quote_for_eval ${1+"$@"} | |
| 2379 | + libtool_options_prep_result=$func_quote_for_eval_result | |
| 2380 | + fi | |
| 2381 | + | |
| 2382 | + $_G_rc_lt_options_prep | |
| 2301 | 2383 | } |
| 2302 | 2384 | func_add_hook func_options_prep libtool_options_prep |
| 2303 | 2385 | |
| ... | ... | @@ -2309,9 +2391,12 @@ libtool_parse_options () |
| 2309 | 2391 | { |
| 2310 | 2392 | $debug_cmd |
| 2311 | 2393 | |
| 2394 | + _G_rc_lt_parse_options=false | |
| 2395 | + | |
| 2312 | 2396 | # Perform our own loop to consume as many options as possible in |
| 2313 | 2397 | # each iteration. |
| 2314 | 2398 | while test $# -gt 0; do |
| 2399 | + _G_match_lt_parse_options=: | |
| 2315 | 2400 | _G_opt=$1 |
| 2316 | 2401 | shift |
| 2317 | 2402 | case $_G_opt in |
| ... | ... | @@ -2386,15 +2471,22 @@ libtool_parse_options () |
| 2386 | 2471 | func_append preserve_args " $_G_opt" |
| 2387 | 2472 | ;; |
| 2388 | 2473 | |
| 2389 | - # An option not handled by this hook function: | |
| 2390 | - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
| 2474 | + # An option not handled by this hook function: | |
| 2475 | + *) set dummy "$_G_opt" ${1+"$@"} ; shift | |
| 2476 | + _G_match_lt_parse_options=false | |
| 2477 | + break | |
| 2478 | + ;; | |
| 2391 | 2479 | esac |
| 2480 | + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: | |
| 2392 | 2481 | done |
| 2393 | 2482 | |
| 2483 | + if $_G_rc_lt_parse_options; then | |
| 2484 | + # save modified positional parameters for caller | |
| 2485 | + func_quote_for_eval ${1+"$@"} | |
| 2486 | + libtool_parse_options_result=$func_quote_for_eval_result | |
| 2487 | + fi | |
| 2394 | 2488 | |
| 2395 | - # save modified positional parameters for caller | |
| 2396 | - func_quote_for_eval ${1+"$@"} | |
| 2397 | - libtool_parse_options_result=$func_quote_for_eval_result | |
| 2489 | + $_G_rc_lt_parse_options | |
| 2398 | 2490 | } |
| 2399 | 2491 | func_add_hook func_parse_options libtool_parse_options |
| 2400 | 2492 | |
| ... | ... | @@ -7275,10 +7367,11 @@ func_mode_link () |
| 7275 | 7367 | # -specs=* GCC specs files |
| 7276 | 7368 | # -stdlib=* select c++ std lib with clang |
| 7277 | 7369 | # -fsanitize=* Clang/GCC memory and address sanitizer |
| 7370 | + # -fuse-ld=* Linker select flags for GCC | |
| 7278 | 7371 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ |
| 7279 | 7372 | -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ |
| 7280 | 7373 | -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ |
| 7281 | - -specs=*|-fsanitize=*) | |
| 7374 | + -specs=*|-fsanitize=*|-fuse-ld=*) | |
| 7282 | 7375 | func_quote_for_eval "$arg" |
| 7283 | 7376 | arg=$func_quote_for_eval_result |
| 7284 | 7377 | func_append compile_command " $arg" | ... | ... |
m4/libtool.m4
| ... | ... | @@ -4063,7 +4063,8 @@ _LT_EOF |
| 4063 | 4063 | if AC_TRY_EVAL(ac_compile); then |
| 4064 | 4064 | # Now try to grab the symbols. |
| 4065 | 4065 | nlist=conftest.nm |
| 4066 | - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then | |
| 4066 | + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD | |
| 4067 | + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then | |
| 4067 | 4068 | # Try sorting and uniquifying the output. |
| 4068 | 4069 | if sort "$nlist" | uniq > "$nlist"T; then |
| 4069 | 4070 | mv -f "$nlist"T "$nlist" |
| ... | ... | @@ -4703,6 +4704,12 @@ m4_if([$1], [CXX], [ |
| 4703 | 4704 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4704 | 4705 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4705 | 4706 | ;; |
| 4707 | + # flang / f18. f95 an alias for gfortran or flang on Debian | |
| 4708 | + flang* | f18* | f95*) | |
| 4709 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
| 4710 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
| 4711 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
| 4712 | + ;; | |
| 4706 | 4713 | # icc used to be incompatible with GCC. |
| 4707 | 4714 | # ICC 10 doesn't accept -KPIC any more. |
| 4708 | 4715 | icc* | ifort*) |
| ... | ... | @@ -6438,7 +6445,7 @@ if test yes != "$_lt_caught_CXX_error"; then |
| 6438 | 6445 | # Commands to make compiler produce verbose output that lists |
| 6439 | 6446 | # what "hidden" libraries, object files and flags are used when |
| 6440 | 6447 | # linking a shared library. |
| 6441 | - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
| 6448 | + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
| 6442 | 6449 | |
| 6443 | 6450 | else |
| 6444 | 6451 | GXX=no |
| ... | ... | @@ -6813,7 +6820,7 @@ if test yes != "$_lt_caught_CXX_error"; then |
| 6813 | 6820 | # explicitly linking system object files so we need to strip them |
| 6814 | 6821 | # from the output so that they don't get included in the library |
| 6815 | 6822 | # dependencies. |
| 6816 | - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
| 6823 | + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
| 6817 | 6824 | ;; |
| 6818 | 6825 | *) |
| 6819 | 6826 | if test yes = "$GXX"; then |
| ... | ... | @@ -6878,7 +6885,7 @@ if test yes != "$_lt_caught_CXX_error"; then |
| 6878 | 6885 | # explicitly linking system object files so we need to strip them |
| 6879 | 6886 | # from the output so that they don't get included in the library |
| 6880 | 6887 | # dependencies. |
| 6881 | - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
| 6888 | + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
| 6882 | 6889 | ;; |
| 6883 | 6890 | *) |
| 6884 | 6891 | if test yes = "$GXX"; then |
| ... | ... | @@ -7217,7 +7224,7 @@ if test yes != "$_lt_caught_CXX_error"; then |
| 7217 | 7224 | # Commands to make compiler produce verbose output that lists |
| 7218 | 7225 | # what "hidden" libraries, object files and flags are used when |
| 7219 | 7226 | # linking a shared library. |
| 7220 | - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
| 7227 | + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
| 7221 | 7228 | |
| 7222 | 7229 | else |
| 7223 | 7230 | # FIXME: insert proper C++ library support |
| ... | ... | @@ -7301,7 +7308,7 @@ if test yes != "$_lt_caught_CXX_error"; then |
| 7301 | 7308 | # Commands to make compiler produce verbose output that lists |
| 7302 | 7309 | # what "hidden" libraries, object files and flags are used when |
| 7303 | 7310 | # linking a shared library. |
| 7304 | - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
| 7311 | + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
| 7305 | 7312 | else |
| 7306 | 7313 | # g++ 2.7 appears to require '-G' NOT '-shared' on this |
| 7307 | 7314 | # platform. |
| ... | ... | @@ -7312,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then |
| 7312 | 7319 | # Commands to make compiler produce verbose output that lists |
| 7313 | 7320 | # what "hidden" libraries, object files and flags are used when |
| 7314 | 7321 | # linking a shared library. |
| 7315 | - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
| 7322 | + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
| 7316 | 7323 | fi |
| 7317 | 7324 | |
| 7318 | 7325 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' | ... | ... |