|
Lines 1-39
Link Here
|
| 1 |
#! /bin/sh |
1 |
#! /bin/sh |
| 2 |
# |
|
|
| 3 |
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
| 4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 5 |
# |
| 6 |
# This code is free software; you can redistribute it and/or modify it |
| 7 |
# under the terms of the GNU General Public License version 2 only, as |
| 8 |
# published by the Free Software Foundation. Oracle designates this |
| 9 |
# particular file as subject to the "Classpath" exception as provided |
| 10 |
# by Oracle in the LICENSE file that accompanied this code. |
| 11 |
# |
| 12 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
| 13 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 14 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 15 |
# version 2 for more details (a copy is included in the LICENSE file that |
| 16 |
# accompanied this code). |
| 17 |
# |
| 18 |
# You should have received a copy of the GNU General Public License version |
| 19 |
# 2 along with this work; if not, write to the Free Software Foundation, |
| 20 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 21 |
# |
| 22 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 23 |
# or visit www.oracle.com if you need additional information or have any |
| 24 |
# questions. |
| 25 |
# |
| 26 |
|
| 27 |
# Attempt to guess a canonical system name. |
2 |
# Attempt to guess a canonical system name. |
| 28 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
3 |
# Copyright 1992-2016 Free Software Foundation, Inc. |
| 29 |
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, |
|
|
| 30 |
# 2011, 2012 Free Software Foundation, Inc. |
| 31 |
|
4 |
|
| 32 |
timestamp='2012-02-10' |
5 |
timestamp='2016-04-02' |
| 33 |
|
6 |
|
| 34 |
# This file is free software; you can redistribute it and/or modify it |
7 |
# This file is free software; you can redistribute it and/or modify it |
| 35 |
# under the terms of the GNU General Public License as published by |
8 |
# under the terms of the GNU General Public License as published by |
| 36 |
# the Free Software Foundation; either version 2 of the License, or |
9 |
# the Free Software Foundation; either version 3 of the License, or |
| 37 |
# (at your option) any later version. |
10 |
# (at your option) any later version. |
| 38 |
# |
11 |
# |
| 39 |
# This program is distributed in the hope that it will be useful, but |
12 |
# This program is distributed in the hope that it will be useful, but |
|
Lines 47-65
Link Here
|
| 47 |
# As a special exception to the GNU General Public License, if you |
20 |
# As a special exception to the GNU General Public License, if you |
| 48 |
# distribute this file as part of a program that contains a |
21 |
# distribute this file as part of a program that contains a |
| 49 |
# configuration script generated by Autoconf, you may include it under |
22 |
# configuration script generated by Autoconf, you may include it under |
| 50 |
# 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 |
| 51 |
|
24 |
# program. This Exception is an additional permission under section 7 |
| 52 |
|
25 |
# of the GNU General Public License, version 3 ("GPLv3"). |
| 53 |
# Originally written by Per Bothner. Please send patches (context |
|
|
| 54 |
# diff format) to <config-patches@gnu.org> and include a ChangeLog |
| 55 |
# entry. |
| 56 |
# |
26 |
# |
| 57 |
# This script attempts to guess a canonical system name similar to |
27 |
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
| 58 |
# config.sub. If it succeeds, it prints the system name on stdout, and |
|
|
| 59 |
# exits with 0. Otherwise, it exits with 1. |
| 60 |
# |
28 |
# |
| 61 |
# You can get the latest version of this script from: |
29 |
# You can get the latest version of this script from: |
| 62 |
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD |
30 |
# http://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 |
|
| 63 |
|
34 |
|
| 64 |
me=`echo "$0" | sed -e 's,.*/,,'` |
35 |
me=`echo "$0" | sed -e 's,.*/,,'` |
| 65 |
|
36 |
|
|
Lines 79-87
Link Here
|
| 79 |
GNU config.guess ($timestamp) |
50 |
GNU config.guess ($timestamp) |
| 80 |
|
51 |
|
| 81 |
Originally written by Per Bothner. |
52 |
Originally written by Per Bothner. |
| 82 |
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
53 |
Copyright 1992-2016 Free Software Foundation, Inc. |
| 83 |
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 |
|
|
| 84 |
Free Software Foundation, Inc. |
| 85 |
|
54 |
|
| 86 |
This is free software; see the source for copying conditions. There is NO |
55 |
This is free software; see the source for copying conditions. There is NO |
| 87 |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
56 |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
|
Lines 163-168
Link Here
|
| 163 |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
132 |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
| 164 |
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
133 |
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
| 165 |
|
134 |
|
|
|
135 |
case "${UNAME_SYSTEM}" in |
| 136 |
Linux|GNU|GNU/*) |
| 137 |
# If the system lacks a compiler, then just pick glibc. |
| 138 |
# We could probably try harder. |
| 139 |
LIBC=gnu |
| 140 |
|
| 141 |
eval $set_cc_for_build |
| 142 |
cat <<-EOF > $dummy.c |
| 143 |
#include <features.h> |
| 144 |
#if defined(__UCLIBC__) |
| 145 |
LIBC=uclibc |
| 146 |
#elif defined(__dietlibc__) |
| 147 |
LIBC=dietlibc |
| 148 |
#else |
| 149 |
LIBC=gnu |
| 150 |
#endif |
| 151 |
EOF |
| 152 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` |
| 153 |
;; |
| 154 |
esac |
| 155 |
|
| 166 |
# Note: order is significant - the case branches are not exclusive. |
156 |
# Note: order is significant - the case branches are not exclusive. |
| 167 |
|
157 |
|
| 168 |
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
158 |
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
|
Lines 178-197
Link Here
|
| 178 |
# Note: NetBSD doesn't particularly care about the vendor |
168 |
# Note: NetBSD doesn't particularly care about the vendor |
| 179 |
# portion of the name. We always set it to "unknown". |
169 |
# portion of the name. We always set it to "unknown". |
| 180 |
sysctl="sysctl -n hw.machine_arch" |
170 |
sysctl="sysctl -n hw.machine_arch" |
| 181 |
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ |
171 |
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
| 182 |
/usr/sbin/$sysctl 2>/dev/null || echo unknown)` |
172 |
/sbin/$sysctl 2>/dev/null || \ |
|
|
173 |
/usr/sbin/$sysctl 2>/dev/null || \ |
| 174 |
echo unknown)` |
| 183 |
case "${UNAME_MACHINE_ARCH}" in |
175 |
case "${UNAME_MACHINE_ARCH}" in |
| 184 |
armeb) machine=armeb-unknown ;; |
176 |
armeb) machine=armeb-unknown ;; |
| 185 |
arm*) machine=arm-unknown ;; |
177 |
arm*) machine=arm-unknown ;; |
| 186 |
sh3el) machine=shl-unknown ;; |
178 |
sh3el) machine=shl-unknown ;; |
| 187 |
sh3eb) machine=sh-unknown ;; |
179 |
sh3eb) machine=sh-unknown ;; |
| 188 |
sh5el) machine=sh5le-unknown ;; |
180 |
sh5el) machine=sh5le-unknown ;; |
|
|
181 |
earmv*) |
| 182 |
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
| 183 |
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` |
| 184 |
machine=${arch}${endian}-unknown |
| 185 |
;; |
| 189 |
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
186 |
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
| 190 |
esac |
187 |
esac |
| 191 |
# The Operating System including object format, if it has switched |
188 |
# The Operating System including object format, if it has switched |
| 192 |
# to ELF recently, or will in the future. |
189 |
# to ELF recently, or will in the future. |
| 193 |
case "${UNAME_MACHINE_ARCH}" in |
190 |
case "${UNAME_MACHINE_ARCH}" in |
| 194 |
arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
191 |
arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) |
| 195 |
eval $set_cc_for_build |
192 |
eval $set_cc_for_build |
| 196 |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
193 |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 197 |
| grep -q __ELF__ |
194 |
| grep -q __ELF__ |
|
Lines 207-212
Link Here
|
| 207 |
os=netbsd |
204 |
os=netbsd |
| 208 |
;; |
205 |
;; |
| 209 |
esac |
206 |
esac |
|
|
207 |
# Determine ABI tags. |
| 208 |
case "${UNAME_MACHINE_ARCH}" in |
| 209 |
earm*) |
| 210 |
expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
| 211 |
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` |
| 212 |
;; |
| 213 |
esac |
| 210 |
# The OS release |
214 |
# The OS release |
| 211 |
# Debian GNU/NetBSD machines have a different userland, and |
215 |
# Debian GNU/NetBSD machines have a different userland, and |
| 212 |
# thus, need a distinct triplet. However, they do not need |
216 |
# thus, need a distinct triplet. However, they do not need |
|
Lines 217-234
Link Here
|
| 217 |
release='-gnu' |
221 |
release='-gnu' |
| 218 |
;; |
222 |
;; |
| 219 |
*) |
223 |
*) |
| 220 |
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
224 |
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` |
| 221 |
;; |
225 |
;; |
| 222 |
esac |
226 |
esac |
| 223 |
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
227 |
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
| 224 |
# contains redundant information, the shorter form: |
228 |
# contains redundant information, the shorter form: |
| 225 |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
229 |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
| 226 |
echo "${machine}-${os}${release}" |
230 |
echo "${machine}-${os}${release}${abi}" |
|
|
231 |
exit ;; |
| 232 |
*:Bitrig:*:*) |
| 233 |
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
| 234 |
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} |
| 227 |
exit ;; |
235 |
exit ;; |
| 228 |
*:OpenBSD:*:*) |
236 |
*:OpenBSD:*:*) |
| 229 |
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
237 |
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
| 230 |
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} |
238 |
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} |
| 231 |
exit ;; |
239 |
exit ;; |
|
|
240 |
*:LibertyBSD:*:*) |
| 241 |
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
| 242 |
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} |
| 243 |
exit ;; |
| 232 |
*:ekkoBSD:*:*) |
244 |
*:ekkoBSD:*:*) |
| 233 |
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} |
245 |
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} |
| 234 |
exit ;; |
246 |
exit ;; |
|
Lines 241-246
Link Here
|
| 241 |
*:MirBSD:*:*) |
253 |
*:MirBSD:*:*) |
| 242 |
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} |
254 |
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} |
| 243 |
exit ;; |
255 |
exit ;; |
|
|
256 |
*:Sortix:*:*) |
| 257 |
echo ${UNAME_MACHINE}-unknown-sortix |
| 258 |
exit ;; |
| 244 |
alpha:OSF1:*:*) |
259 |
alpha:OSF1:*:*) |
| 245 |
case $UNAME_RELEASE in |
260 |
case $UNAME_RELEASE in |
| 246 |
*4.0) |
261 |
*4.0) |
|
Lines 257-298
Link Here
|
| 257 |
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
272 |
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
| 258 |
case "$ALPHA_CPU_TYPE" in |
273 |
case "$ALPHA_CPU_TYPE" in |
| 259 |
"EV4 (21064)") |
274 |
"EV4 (21064)") |
| 260 |
UNAME_MACHINE="alpha" ;; |
275 |
UNAME_MACHINE=alpha ;; |
| 261 |
"EV4.5 (21064)") |
276 |
"EV4.5 (21064)") |
| 262 |
UNAME_MACHINE="alpha" ;; |
277 |
UNAME_MACHINE=alpha ;; |
| 263 |
"LCA4 (21066/21068)") |
278 |
"LCA4 (21066/21068)") |
| 264 |
UNAME_MACHINE="alpha" ;; |
279 |
UNAME_MACHINE=alpha ;; |
| 265 |
"EV5 (21164)") |
280 |
"EV5 (21164)") |
| 266 |
UNAME_MACHINE="alphaev5" ;; |
281 |
UNAME_MACHINE=alphaev5 ;; |
| 267 |
"EV5.6 (21164A)") |
282 |
"EV5.6 (21164A)") |
| 268 |
UNAME_MACHINE="alphaev56" ;; |
283 |
UNAME_MACHINE=alphaev56 ;; |
| 269 |
"EV5.6 (21164PC)") |
284 |
"EV5.6 (21164PC)") |
| 270 |
UNAME_MACHINE="alphapca56" ;; |
285 |
UNAME_MACHINE=alphapca56 ;; |
| 271 |
"EV5.7 (21164PC)") |
286 |
"EV5.7 (21164PC)") |
| 272 |
UNAME_MACHINE="alphapca57" ;; |
287 |
UNAME_MACHINE=alphapca57 ;; |
| 273 |
"EV6 (21264)") |
288 |
"EV6 (21264)") |
| 274 |
UNAME_MACHINE="alphaev6" ;; |
289 |
UNAME_MACHINE=alphaev6 ;; |
| 275 |
"EV6.7 (21264A)") |
290 |
"EV6.7 (21264A)") |
| 276 |
UNAME_MACHINE="alphaev67" ;; |
291 |
UNAME_MACHINE=alphaev67 ;; |
| 277 |
"EV6.8CB (21264C)") |
292 |
"EV6.8CB (21264C)") |
| 278 |
UNAME_MACHINE="alphaev68" ;; |
293 |
UNAME_MACHINE=alphaev68 ;; |
| 279 |
"EV6.8AL (21264B)") |
294 |
"EV6.8AL (21264B)") |
| 280 |
UNAME_MACHINE="alphaev68" ;; |
295 |
UNAME_MACHINE=alphaev68 ;; |
| 281 |
"EV6.8CX (21264D)") |
296 |
"EV6.8CX (21264D)") |
| 282 |
UNAME_MACHINE="alphaev68" ;; |
297 |
UNAME_MACHINE=alphaev68 ;; |
| 283 |
"EV6.9A (21264/EV69A)") |
298 |
"EV6.9A (21264/EV69A)") |
| 284 |
UNAME_MACHINE="alphaev69" ;; |
299 |
UNAME_MACHINE=alphaev69 ;; |
| 285 |
"EV7 (21364)") |
300 |
"EV7 (21364)") |
| 286 |
UNAME_MACHINE="alphaev7" ;; |
301 |
UNAME_MACHINE=alphaev7 ;; |
| 287 |
"EV7.9 (21364A)") |
302 |
"EV7.9 (21364A)") |
| 288 |
UNAME_MACHINE="alphaev79" ;; |
303 |
UNAME_MACHINE=alphaev79 ;; |
| 289 |
esac |
304 |
esac |
| 290 |
# A Pn.n version is a patched version. |
305 |
# A Pn.n version is a patched version. |
| 291 |
# A Vn.n version is a released version. |
306 |
# A Vn.n version is a released version. |
| 292 |
# A Tn.n version is a released field test version. |
307 |
# A Tn.n version is a released field test version. |
| 293 |
# A Xn.n version is an unreleased experimental baselevel. |
308 |
# A Xn.n version is an unreleased experimental baselevel. |
| 294 |
# 1.2 uses "1.2" for uname -r. |
309 |
# 1.2 uses "1.2" for uname -r. |
| 295 |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
310 |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
| 296 |
# Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
311 |
# Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
| 297 |
exitcode=$? |
312 |
exitcode=$? |
| 298 |
trap '' 0 |
313 |
trap '' 0 |
|
Lines 327-333
Link Here
|
| 327 |
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
342 |
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
| 328 |
echo arm-acorn-riscix${UNAME_RELEASE} |
343 |
echo arm-acorn-riscix${UNAME_RELEASE} |
| 329 |
exit ;; |
344 |
exit ;; |
| 330 |
arm:riscos:*:*|arm:RISCOS:*:*) |
345 |
arm*:riscos:*:*|arm*:RISCOS:*:*) |
| 331 |
echo arm-unknown-riscos |
346 |
echo arm-unknown-riscos |
| 332 |
exit ;; |
347 |
exit ;; |
| 333 |
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
348 |
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
|
Lines 365-380
Link Here
|
| 365 |
exit ;; |
380 |
exit ;; |
| 366 |
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
381 |
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
| 367 |
eval $set_cc_for_build |
382 |
eval $set_cc_for_build |
| 368 |
SUN_ARCH="i386" |
383 |
SUN_ARCH=i386 |
| 369 |
# If there is a compiler, see if it is configured for 64-bit objects. |
384 |
# If there is a compiler, see if it is configured for 64-bit objects. |
| 370 |
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
385 |
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
| 371 |
# This test works for both compilers. |
386 |
# This test works for both compilers. |
| 372 |
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then |
387 |
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
| 373 |
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
388 |
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
| 374 |
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
389 |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
| 375 |
grep IS_64BIT_ARCH >/dev/null |
390 |
grep IS_64BIT_ARCH >/dev/null |
| 376 |
then |
391 |
then |
| 377 |
SUN_ARCH="x86_64" |
392 |
SUN_ARCH=x86_64 |
| 378 |
fi |
393 |
fi |
| 379 |
fi |
394 |
fi |
| 380 |
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
395 |
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
|
Lines 399-405
Link Here
|
| 399 |
exit ;; |
414 |
exit ;; |
| 400 |
sun*:*:4.2BSD:*) |
415 |
sun*:*:4.2BSD:*) |
| 401 |
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
416 |
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
| 402 |
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 |
417 |
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 |
| 403 |
case "`/bin/arch`" in |
418 |
case "`/bin/arch`" in |
| 404 |
sun3) |
419 |
sun3) |
| 405 |
echo m68k-sun-sunos${UNAME_RELEASE} |
420 |
echo m68k-sun-sunos${UNAME_RELEASE} |
|
Lines 585-592
Link Here
|
| 585 |
else |
600 |
else |
| 586 |
IBM_ARCH=powerpc |
601 |
IBM_ARCH=powerpc |
| 587 |
fi |
602 |
fi |
| 588 |
if [ -x /usr/bin/oslevel ] ; then |
603 |
if [ -x /usr/bin/lslpp ] ; then |
| 589 |
IBM_REV=`/usr/bin/oslevel` |
604 |
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | |
|
|
605 |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
| 590 |
else |
606 |
else |
| 591 |
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
607 |
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
| 592 |
fi |
608 |
fi |
|
Lines 623-635
Link Here
|
| 623 |
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
639 |
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
| 624 |
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
640 |
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
| 625 |
case "${sc_cpu_version}" in |
641 |
case "${sc_cpu_version}" in |
| 626 |
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
642 |
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
| 627 |
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
643 |
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
| 628 |
532) # CPU_PA_RISC2_0 |
644 |
532) # CPU_PA_RISC2_0 |
| 629 |
case "${sc_kernel_bits}" in |
645 |
case "${sc_kernel_bits}" in |
| 630 |
32) HP_ARCH="hppa2.0n" ;; |
646 |
32) HP_ARCH=hppa2.0n ;; |
| 631 |
64) HP_ARCH="hppa2.0w" ;; |
647 |
64) HP_ARCH=hppa2.0w ;; |
| 632 |
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
648 |
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
| 633 |
esac ;; |
649 |
esac ;; |
| 634 |
esac |
650 |
esac |
| 635 |
fi |
651 |
fi |
|
Lines 668-678
Link Here
|
| 668 |
exit (0); |
684 |
exit (0); |
| 669 |
} |
685 |
} |
| 670 |
EOF |
686 |
EOF |
| 671 |
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
687 |
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
| 672 |
test -z "$HP_ARCH" && HP_ARCH=hppa |
688 |
test -z "$HP_ARCH" && HP_ARCH=hppa |
| 673 |
fi ;; |
689 |
fi ;; |
| 674 |
esac |
690 |
esac |
| 675 |
if [ ${HP_ARCH} = "hppa2.0w" ] |
691 |
if [ ${HP_ARCH} = hppa2.0w ] |
| 676 |
then |
692 |
then |
| 677 |
eval $set_cc_for_build |
693 |
eval $set_cc_for_build |
| 678 |
|
694 |
|
|
Lines 685-696
Link Here
|
| 685 |
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
701 |
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
| 686 |
# => hppa64-hp-hpux11.23 |
702 |
# => hppa64-hp-hpux11.23 |
| 687 |
|
703 |
|
| 688 |
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | |
704 |
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | |
| 689 |
grep -q __LP64__ |
705 |
grep -q __LP64__ |
| 690 |
then |
706 |
then |
| 691 |
HP_ARCH="hppa2.0w" |
707 |
HP_ARCH=hppa2.0w |
| 692 |
else |
708 |
else |
| 693 |
HP_ARCH="hppa64" |
709 |
HP_ARCH=hppa64 |
| 694 |
fi |
710 |
fi |
| 695 |
fi |
711 |
fi |
| 696 |
echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
712 |
echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
|
Lines 795-808
Link Here
|
| 795 |
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
811 |
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
| 796 |
exit ;; |
812 |
exit ;; |
| 797 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
813 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
| 798 |
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
814 |
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
| 799 |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
815 |
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
| 800 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
816 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
| 801 |
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
817 |
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
| 802 |
exit ;; |
818 |
exit ;; |
| 803 |
5000:UNIX_System_V:4.*:*) |
819 |
5000:UNIX_System_V:4.*:*) |
| 804 |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
820 |
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
| 805 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` |
821 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
| 806 |
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
822 |
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
| 807 |
exit ;; |
823 |
exit ;; |
| 808 |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
824 |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
|
Lines 826-835
Link Here
|
| 826 |
i*:CYGWIN*:*) |
842 |
i*:CYGWIN*:*) |
| 827 |
echo ${UNAME_MACHINE}-pc-cygwin |
843 |
echo ${UNAME_MACHINE}-pc-cygwin |
| 828 |
exit ;; |
844 |
exit ;; |
|
|
845 |
*:MINGW64*:*) |
| 846 |
echo ${UNAME_MACHINE}-pc-mingw64 |
| 847 |
exit ;; |
| 829 |
*:MINGW*:*) |
848 |
*:MINGW*:*) |
| 830 |
echo ${UNAME_MACHINE}-pc-mingw32 |
849 |
echo ${UNAME_MACHINE}-pc-mingw32 |
| 831 |
exit ;; |
850 |
exit ;; |
| 832 |
i*:MSYS*:*) |
851 |
*:MSYS*:*) |
| 833 |
echo ${UNAME_MACHINE}-pc-msys |
852 |
echo ${UNAME_MACHINE}-pc-msys |
| 834 |
exit ;; |
853 |
exit ;; |
| 835 |
i*:windows32*:*) |
854 |
i*:windows32*:*) |
|
Lines 877-897
Link Here
|
| 877 |
exit ;; |
896 |
exit ;; |
| 878 |
*:GNU:*:*) |
897 |
*:GNU:*:*) |
| 879 |
# the GNU system |
898 |
# the GNU system |
| 880 |
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
899 |
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
| 881 |
exit ;; |
900 |
exit ;; |
| 882 |
*:GNU/*:*:*) |
901 |
*:GNU/*:*:*) |
| 883 |
# other systems with GNU libc and userland |
902 |
# other systems with GNU libc and userland |
| 884 |
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu |
903 |
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} |
| 885 |
exit ;; |
904 |
exit ;; |
| 886 |
i*86:Minix:*:*) |
905 |
i*86:Minix:*:*) |
| 887 |
echo ${UNAME_MACHINE}-pc-minix |
906 |
echo ${UNAME_MACHINE}-pc-minix |
| 888 |
exit ;; |
907 |
exit ;; |
| 889 |
aarch64:Linux:*:*) |
908 |
aarch64:Linux:*:*) |
| 890 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
909 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 891 |
exit ;; |
910 |
exit ;; |
| 892 |
aarch64_be:Linux:*:*) |
911 |
aarch64_be:Linux:*:*) |
| 893 |
UNAME_MACHINE=aarch64_be |
912 |
UNAME_MACHINE=aarch64_be |
| 894 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
913 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 895 |
exit ;; |
914 |
exit ;; |
| 896 |
alpha:Linux:*:*) |
915 |
alpha:Linux:*:*) |
| 897 |
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
916 |
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
|
Lines 904-962
Link Here
|
| 904 |
EV68*) UNAME_MACHINE=alphaev68 ;; |
923 |
EV68*) UNAME_MACHINE=alphaev68 ;; |
| 905 |
esac |
924 |
esac |
| 906 |
objdump --private-headers /bin/sh | grep -q ld.so.1 |
925 |
objdump --private-headers /bin/sh | grep -q ld.so.1 |
| 907 |
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
926 |
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
| 908 |
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} |
927 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
928 |
exit ;; |
| 929 |
arc:Linux:*:* | arceb:Linux:*:*) |
| 930 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 909 |
exit ;; |
931 |
exit ;; |
| 910 |
arm*:Linux:*:*) |
932 |
arm*:Linux:*:*) |
| 911 |
eval $set_cc_for_build |
933 |
eval $set_cc_for_build |
| 912 |
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
934 |
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 913 |
| grep -q __ARM_EABI__ |
935 |
| grep -q __ARM_EABI__ |
| 914 |
then |
936 |
then |
| 915 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
937 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 916 |
else |
938 |
else |
| 917 |
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
939 |
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 918 |
| grep -q __ARM_PCS_VFP |
940 |
| grep -q __ARM_PCS_VFP |
| 919 |
then |
941 |
then |
| 920 |
echo ${UNAME_MACHINE}-unknown-linux-gnueabi |
942 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi |
| 921 |
else |
943 |
else |
| 922 |
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf |
944 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf |
| 923 |
fi |
945 |
fi |
| 924 |
fi |
946 |
fi |
| 925 |
exit ;; |
947 |
exit ;; |
| 926 |
avr32*:Linux:*:*) |
948 |
avr32*:Linux:*:*) |
| 927 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
949 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 928 |
exit ;; |
950 |
exit ;; |
| 929 |
cris:Linux:*:*) |
951 |
cris:Linux:*:*) |
| 930 |
echo ${UNAME_MACHINE}-axis-linux-gnu |
952 |
echo ${UNAME_MACHINE}-axis-linux-${LIBC} |
| 931 |
exit ;; |
953 |
exit ;; |
| 932 |
crisv32:Linux:*:*) |
954 |
crisv32:Linux:*:*) |
| 933 |
echo ${UNAME_MACHINE}-axis-linux-gnu |
955 |
echo ${UNAME_MACHINE}-axis-linux-${LIBC} |
|
|
956 |
exit ;; |
| 957 |
e2k:Linux:*:*) |
| 958 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 934 |
exit ;; |
959 |
exit ;; |
| 935 |
frv:Linux:*:*) |
960 |
frv:Linux:*:*) |
| 936 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
961 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 937 |
exit ;; |
962 |
exit ;; |
| 938 |
hexagon:Linux:*:*) |
963 |
hexagon:Linux:*:*) |
| 939 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
964 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 940 |
exit ;; |
965 |
exit ;; |
| 941 |
i*86:Linux:*:*) |
966 |
i*86:Linux:*:*) |
| 942 |
LIBC=gnu |
967 |
echo ${UNAME_MACHINE}-pc-linux-${LIBC} |
| 943 |
eval $set_cc_for_build |
|
|
| 944 |
sed 's/^ //' << EOF >$dummy.c |
| 945 |
#ifdef __dietlibc__ |
| 946 |
LIBC=dietlibc |
| 947 |
#endif |
| 948 |
EOF |
| 949 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` |
| 950 |
echo "${UNAME_MACHINE}-pc-linux-${LIBC}" |
| 951 |
exit ;; |
968 |
exit ;; |
| 952 |
ia64:Linux:*:*) |
969 |
ia64:Linux:*:*) |
| 953 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
970 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
971 |
exit ;; |
| 972 |
k1om:Linux:*:*) |
| 973 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 954 |
exit ;; |
974 |
exit ;; |
| 955 |
m32r*:Linux:*:*) |
975 |
m32r*:Linux:*:*) |
| 956 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
976 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 957 |
exit ;; |
977 |
exit ;; |
| 958 |
m68*:Linux:*:*) |
978 |
m68*:Linux:*:*) |
| 959 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
979 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 960 |
exit ;; |
980 |
exit ;; |
| 961 |
mips:Linux:*:* | mips64:Linux:*:*) |
981 |
mips:Linux:*:* | mips64:Linux:*:*) |
| 962 |
eval $set_cc_for_build |
982 |
eval $set_cc_for_build |
|
Lines 975-1028
Link Here
|
| 975 |
#endif |
995 |
#endif |
| 976 |
EOF |
996 |
EOF |
| 977 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
997 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
| 978 |
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } |
998 |
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } |
| 979 |
;; |
999 |
;; |
| 980 |
or32:Linux:*:*) |
1000 |
openrisc*:Linux:*:*) |
| 981 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
1001 |
echo or1k-unknown-linux-${LIBC} |
|
|
1002 |
exit ;; |
| 1003 |
or32:Linux:*:* | or1k*:Linux:*:*) |
| 1004 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 982 |
exit ;; |
1005 |
exit ;; |
| 983 |
padre:Linux:*:*) |
1006 |
padre:Linux:*:*) |
| 984 |
echo sparc-unknown-linux-gnu |
1007 |
echo sparc-unknown-linux-${LIBC} |
| 985 |
exit ;; |
1008 |
exit ;; |
| 986 |
parisc64:Linux:*:* | hppa64:Linux:*:*) |
1009 |
parisc64:Linux:*:* | hppa64:Linux:*:*) |
| 987 |
echo hppa64-unknown-linux-gnu |
1010 |
echo hppa64-unknown-linux-${LIBC} |
| 988 |
exit ;; |
1011 |
exit ;; |
| 989 |
parisc:Linux:*:* | hppa:Linux:*:*) |
1012 |
parisc:Linux:*:* | hppa:Linux:*:*) |
| 990 |
# Look for CPU level |
1013 |
# Look for CPU level |
| 991 |
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
1014 |
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
| 992 |
PA7*) echo hppa1.1-unknown-linux-gnu ;; |
1015 |
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; |
| 993 |
PA8*) echo hppa2.0-unknown-linux-gnu ;; |
1016 |
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; |
| 994 |
*) echo hppa-unknown-linux-gnu ;; |
1017 |
*) echo hppa-unknown-linux-${LIBC} ;; |
| 995 |
esac |
1018 |
esac |
| 996 |
exit ;; |
1019 |
exit ;; |
| 997 |
ppc64:Linux:*:*) |
1020 |
ppc64:Linux:*:*) |
| 998 |
echo powerpc64-unknown-linux-gnu |
1021 |
echo powerpc64-unknown-linux-${LIBC} |
| 999 |
exit ;; |
1022 |
exit ;; |
| 1000 |
ppc:Linux:*:*) |
1023 |
ppc:Linux:*:*) |
| 1001 |
echo powerpc-unknown-linux-gnu |
1024 |
echo powerpc-unknown-linux-${LIBC} |
|
|
1025 |
exit ;; |
| 1026 |
ppc64le:Linux:*:*) |
| 1027 |
echo powerpc64le-unknown-linux-${LIBC} |
| 1028 |
exit ;; |
| 1029 |
ppcle:Linux:*:*) |
| 1030 |
echo powerpcle-unknown-linux-${LIBC} |
| 1002 |
exit ;; |
1031 |
exit ;; |
| 1003 |
s390:Linux:*:* | s390x:Linux:*:*) |
1032 |
s390:Linux:*:* | s390x:Linux:*:*) |
| 1004 |
echo ${UNAME_MACHINE}-ibm-linux |
1033 |
echo ${UNAME_MACHINE}-ibm-linux-${LIBC} |
| 1005 |
exit ;; |
1034 |
exit ;; |
| 1006 |
sh64*:Linux:*:*) |
1035 |
sh64*:Linux:*:*) |
| 1007 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
1036 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 1008 |
exit ;; |
1037 |
exit ;; |
| 1009 |
sh*:Linux:*:*) |
1038 |
sh*:Linux:*:*) |
| 1010 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
1039 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 1011 |
exit ;; |
1040 |
exit ;; |
| 1012 |
sparc:Linux:*:* | sparc64:Linux:*:*) |
1041 |
sparc:Linux:*:* | sparc64:Linux:*:*) |
| 1013 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
1042 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 1014 |
exit ;; |
1043 |
exit ;; |
| 1015 |
tile*:Linux:*:*) |
1044 |
tile*:Linux:*:*) |
| 1016 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
1045 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 1017 |
exit ;; |
1046 |
exit ;; |
| 1018 |
vax:Linux:*:*) |
1047 |
vax:Linux:*:*) |
| 1019 |
echo ${UNAME_MACHINE}-dec-linux-gnu |
1048 |
echo ${UNAME_MACHINE}-dec-linux-${LIBC} |
| 1020 |
exit ;; |
1049 |
exit ;; |
| 1021 |
x86_64:Linux:*:*) |
1050 |
x86_64:Linux:*:*) |
| 1022 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
1051 |
eval $set_cc_for_build |
|
|
1052 |
X86_64_ABI= |
| 1053 |
# If there is a compiler, see if it is configured for 32-bit objects. |
| 1054 |
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then |
| 1055 |
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ |
| 1056 |
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
| 1057 |
grep IS_X32 >/dev/null |
| 1058 |
then |
| 1059 |
X86_64_ABI=x32 |
| 1060 |
fi |
| 1061 |
fi |
| 1062 |
echo ${UNAME_MACHINE}-pc-linux-${LIBC}${X86_64_ABI} |
| 1023 |
exit ;; |
1063 |
exit ;; |
| 1024 |
xtensa*:Linux:*:*) |
1064 |
xtensa*:Linux:*:*) |
| 1025 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
1065 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 1026 |
exit ;; |
1066 |
exit ;; |
| 1027 |
i*86:DYNIX/ptx:4*:*) |
1067 |
i*86:DYNIX/ptx:4*:*) |
| 1028 |
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1068 |
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
|
Lines 1098-1104
Link Here
|
| 1098 |
# uname -m prints for DJGPP always 'pc', but it prints nothing about |
1138 |
# uname -m prints for DJGPP always 'pc', but it prints nothing about |
| 1099 |
# the processor, so we play safe by assuming i586. |
1139 |
# the processor, so we play safe by assuming i586. |
| 1100 |
# Note: whatever this is, it MUST be the same as what config.sub |
1140 |
# Note: whatever this is, it MUST be the same as what config.sub |
| 1101 |
# prints for the "djgpp" host, or else GDB configury will decide that |
1141 |
# prints for the "djgpp" host, or else GDB configure will decide that |
| 1102 |
# this is a cross-build. |
1142 |
# this is a cross-build. |
| 1103 |
echo i586-pc-msdosdjgpp |
1143 |
echo i586-pc-msdosdjgpp |
| 1104 |
exit ;; |
1144 |
exit ;; |
|
Lines 1226-1231
Link Here
|
| 1226 |
BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
1266 |
BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
| 1227 |
echo i586-pc-haiku |
1267 |
echo i586-pc-haiku |
| 1228 |
exit ;; |
1268 |
exit ;; |
|
|
1269 |
x86_64:Haiku:*:*) |
| 1270 |
echo x86_64-unknown-haiku |
| 1271 |
exit ;; |
| 1229 |
SX-4:SUPER-UX:*:*) |
1272 |
SX-4:SUPER-UX:*:*) |
| 1230 |
echo sx4-nec-superux${UNAME_RELEASE} |
1273 |
echo sx4-nec-superux${UNAME_RELEASE} |
| 1231 |
exit ;; |
1274 |
exit ;; |
|
Lines 1244-1249
Link Here
|
| 1244 |
SX-8R:SUPER-UX:*:*) |
1287 |
SX-8R:SUPER-UX:*:*) |
| 1245 |
echo sx8r-nec-superux${UNAME_RELEASE} |
1288 |
echo sx8r-nec-superux${UNAME_RELEASE} |
| 1246 |
exit ;; |
1289 |
exit ;; |
|
|
1290 |
SX-ACE:SUPER-UX:*:*) |
| 1291 |
echo sxace-nec-superux${UNAME_RELEASE} |
| 1292 |
exit ;; |
| 1247 |
Power*:Rhapsody:*:*) |
1293 |
Power*:Rhapsody:*:*) |
| 1248 |
echo powerpc-apple-rhapsody${UNAME_RELEASE} |
1294 |
echo powerpc-apple-rhapsody${UNAME_RELEASE} |
| 1249 |
exit ;; |
1295 |
exit ;; |
|
Lines 1252-1275
Link Here
|
| 1252 |
exit ;; |
1298 |
exit ;; |
| 1253 |
*:Darwin:*:*) |
1299 |
*:Darwin:*:*) |
| 1254 |
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
1300 |
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
| 1255 |
case $UNAME_PROCESSOR in |
1301 |
eval $set_cc_for_build |
| 1256 |
i386) |
1302 |
if test "$UNAME_PROCESSOR" = unknown ; then |
| 1257 |
eval $set_cc_for_build |
1303 |
UNAME_PROCESSOR=powerpc |
| 1258 |
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then |
1304 |
fi |
| 1259 |
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
1305 |
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then |
| 1260 |
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
1306 |
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
| 1261 |
grep IS_64BIT_ARCH >/dev/null |
1307 |
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
| 1262 |
then |
1308 |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
| 1263 |
UNAME_PROCESSOR="x86_64" |
1309 |
grep IS_64BIT_ARCH >/dev/null |
| 1264 |
fi |
1310 |
then |
| 1265 |
fi ;; |
1311 |
case $UNAME_PROCESSOR in |
| 1266 |
unknown) UNAME_PROCESSOR=powerpc ;; |
1312 |
i386) UNAME_PROCESSOR=x86_64 ;; |
| 1267 |
esac |
1313 |
powerpc) UNAME_PROCESSOR=powerpc64 ;; |
|
|
1314 |
esac |
| 1315 |
fi |
| 1316 |
fi |
| 1317 |
elif test "$UNAME_PROCESSOR" = i386 ; then |
| 1318 |
# Avoid executing cc on OS X 10.9, as it ships with a stub |
| 1319 |
# that puts up a graphical alert prompting to install |
| 1320 |
# developer tools. Any system running Mac OS X 10.7 or |
| 1321 |
# later (Darwin 11 and later) is required to have a 64-bit |
| 1322 |
# processor. This is not true of the ARM version of Darwin |
| 1323 |
# that Apple uses in portable devices. |
| 1324 |
UNAME_PROCESSOR=x86_64 |
| 1325 |
fi |
| 1268 |
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1326 |
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
| 1269 |
exit ;; |
1327 |
exit ;; |
| 1270 |
*:procnto*:*:* | *:QNX:[0123456789]*:*) |
1328 |
*:procnto*:*:* | *:QNX:[0123456789]*:*) |
| 1271 |
UNAME_PROCESSOR=`uname -p` |
1329 |
UNAME_PROCESSOR=`uname -p` |
| 1272 |
if test "$UNAME_PROCESSOR" = "x86"; then |
1330 |
if test "$UNAME_PROCESSOR" = x86; then |
| 1273 |
UNAME_PROCESSOR=i386 |
1331 |
UNAME_PROCESSOR=i386 |
| 1274 |
UNAME_MACHINE=pc |
1332 |
UNAME_MACHINE=pc |
| 1275 |
fi |
1333 |
fi |
|
Lines 1281-1287
Link Here
|
| 1281 |
NEO-?:NONSTOP_KERNEL:*:*) |
1339 |
NEO-?:NONSTOP_KERNEL:*:*) |
| 1282 |
echo neo-tandem-nsk${UNAME_RELEASE} |
1340 |
echo neo-tandem-nsk${UNAME_RELEASE} |
| 1283 |
exit ;; |
1341 |
exit ;; |
| 1284 |
NSE-?:NONSTOP_KERNEL:*:*) |
1342 |
NSE-*:NONSTOP_KERNEL:*:*) |
| 1285 |
echo nse-tandem-nsk${UNAME_RELEASE} |
1343 |
echo nse-tandem-nsk${UNAME_RELEASE} |
| 1286 |
exit ;; |
1344 |
exit ;; |
| 1287 |
NSR-?:NONSTOP_KERNEL:*:*) |
1345 |
NSR-?:NONSTOP_KERNEL:*:*) |
|
Lines 1300-1306
Link Here
|
| 1300 |
# "uname -m" is not consistent, so use $cputype instead. 386 |
1358 |
# "uname -m" is not consistent, so use $cputype instead. 386 |
| 1301 |
# is converted to i386 for consistency with other x86 |
1359 |
# is converted to i386 for consistency with other x86 |
| 1302 |
# operating systems. |
1360 |
# operating systems. |
| 1303 |
if test "$cputype" = "386"; then |
1361 |
if test "$cputype" = 386; then |
| 1304 |
UNAME_MACHINE=i386 |
1362 |
UNAME_MACHINE=i386 |
| 1305 |
else |
1363 |
else |
| 1306 |
UNAME_MACHINE="$cputype" |
1364 |
UNAME_MACHINE="$cputype" |
|
Lines 1342-1348
Link Here
|
| 1342 |
echo i386-pc-xenix |
1400 |
echo i386-pc-xenix |
| 1343 |
exit ;; |
1401 |
exit ;; |
| 1344 |
i*86:skyos:*:*) |
1402 |
i*86:skyos:*:*) |
| 1345 |
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' |
1403 |
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` |
| 1346 |
exit ;; |
1404 |
exit ;; |
| 1347 |
i*86:rdos:*:*) |
1405 |
i*86:rdos:*:*) |
| 1348 |
echo ${UNAME_MACHINE}-pc-rdos |
1406 |
echo ${UNAME_MACHINE}-pc-rdos |
|
Lines 1353-1510
Link Here
|
| 1353 |
x86_64:VMkernel:*:*) |
1411 |
x86_64:VMkernel:*:*) |
| 1354 |
echo ${UNAME_MACHINE}-unknown-esx |
1412 |
echo ${UNAME_MACHINE}-unknown-esx |
| 1355 |
exit ;; |
1413 |
exit ;; |
| 1356 |
esac |
1414 |
amd64:Isilon\ OneFS:*:*) |
| 1357 |
|
1415 |
echo x86_64-unknown-onefs |
| 1358 |
#echo '(No uname command or uname output not recognized.)' 1>&2 |
|
|
| 1359 |
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
| 1360 |
|
| 1361 |
eval $set_cc_for_build |
| 1362 |
cat >$dummy.c <<EOF |
| 1363 |
#ifdef _SEQUENT_ |
| 1364 |
# include <sys/types.h> |
| 1365 |
# include <sys/utsname.h> |
| 1366 |
#endif |
| 1367 |
main () |
| 1368 |
{ |
| 1369 |
#if defined (sony) |
| 1370 |
#if defined (MIPSEB) |
| 1371 |
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, |
| 1372 |
I don't know.... */ |
| 1373 |
printf ("mips-sony-bsd\n"); exit (0); |
| 1374 |
#else |
| 1375 |
#include <sys/param.h> |
| 1376 |
printf ("m68k-sony-newsos%s\n", |
| 1377 |
#ifdef NEWSOS4 |
| 1378 |
"4" |
| 1379 |
#else |
| 1380 |
"" |
| 1381 |
#endif |
| 1382 |
); exit (0); |
| 1383 |
#endif |
| 1384 |
#endif |
| 1385 |
|
| 1386 |
#if defined (__arm) && defined (__acorn) && defined (__unix) |
| 1387 |
printf ("arm-acorn-riscix\n"); exit (0); |
| 1388 |
#endif |
| 1389 |
|
| 1390 |
#if defined (hp300) && !defined (hpux) |
| 1391 |
printf ("m68k-hp-bsd\n"); exit (0); |
| 1392 |
#endif |
| 1393 |
|
| 1394 |
#if defined (NeXT) |
| 1395 |
#if !defined (__ARCHITECTURE__) |
| 1396 |
#define __ARCHITECTURE__ "m68k" |
| 1397 |
#endif |
| 1398 |
int version; |
| 1399 |
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
| 1400 |
if (version < 4) |
| 1401 |
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
| 1402 |
else |
| 1403 |
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
| 1404 |
exit (0); |
| 1405 |
#endif |
| 1406 |
|
| 1407 |
#if defined (MULTIMAX) || defined (n16) |
| 1408 |
#if defined (UMAXV) |
| 1409 |
printf ("ns32k-encore-sysv\n"); exit (0); |
| 1410 |
#else |
| 1411 |
#if defined (CMU) |
| 1412 |
printf ("ns32k-encore-mach\n"); exit (0); |
| 1413 |
#else |
| 1414 |
printf ("ns32k-encore-bsd\n"); exit (0); |
| 1415 |
#endif |
| 1416 |
#endif |
| 1417 |
#endif |
| 1418 |
|
| 1419 |
#if defined (__386BSD__) |
| 1420 |
printf ("i386-pc-bsd\n"); exit (0); |
| 1421 |
#endif |
| 1422 |
|
| 1423 |
#if defined (sequent) |
| 1424 |
#if defined (i386) |
| 1425 |
printf ("i386-sequent-dynix\n"); exit (0); |
| 1426 |
#endif |
| 1427 |
#if defined (ns32000) |
| 1428 |
printf ("ns32k-sequent-dynix\n"); exit (0); |
| 1429 |
#endif |
| 1430 |
#endif |
| 1431 |
|
| 1432 |
#if defined (_SEQUENT_) |
| 1433 |
struct utsname un; |
| 1434 |
|
| 1435 |
uname(&un); |
| 1436 |
|
| 1437 |
if (strncmp(un.version, "V2", 2) == 0) { |
| 1438 |
printf ("i386-sequent-ptx2\n"); exit (0); |
| 1439 |
} |
| 1440 |
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ |
| 1441 |
printf ("i386-sequent-ptx1\n"); exit (0); |
| 1442 |
} |
| 1443 |
printf ("i386-sequent-ptx\n"); exit (0); |
| 1444 |
|
| 1445 |
#endif |
| 1446 |
|
| 1447 |
#if defined (vax) |
| 1448 |
# if !defined (ultrix) |
| 1449 |
# include <sys/param.h> |
| 1450 |
# if defined (BSD) |
| 1451 |
# if BSD == 43 |
| 1452 |
printf ("vax-dec-bsd4.3\n"); exit (0); |
| 1453 |
# else |
| 1454 |
# if BSD == 199006 |
| 1455 |
printf ("vax-dec-bsd4.3reno\n"); exit (0); |
| 1456 |
# else |
| 1457 |
printf ("vax-dec-bsd\n"); exit (0); |
| 1458 |
# endif |
| 1459 |
# endif |
| 1460 |
# else |
| 1461 |
printf ("vax-dec-bsd\n"); exit (0); |
| 1462 |
# endif |
| 1463 |
# else |
| 1464 |
printf ("vax-dec-ultrix\n"); exit (0); |
| 1465 |
# endif |
| 1466 |
#endif |
| 1467 |
|
| 1468 |
#if defined (alliant) && defined (i860) |
| 1469 |
printf ("i860-alliant-bsd\n"); exit (0); |
| 1470 |
#endif |
| 1471 |
|
| 1472 |
exit (1); |
| 1473 |
} |
| 1474 |
EOF |
| 1475 |
|
| 1476 |
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && |
| 1477 |
{ echo "$SYSTEM_NAME"; exit; } |
| 1478 |
|
| 1479 |
# Apollos put the system type in the environment. |
| 1480 |
|
| 1481 |
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } |
| 1482 |
|
| 1483 |
# Convex versions that predate uname can use getsysinfo(1) |
| 1484 |
|
| 1485 |
if [ -x /usr/convex/getsysinfo ] |
| 1486 |
then |
| 1487 |
case `getsysinfo -f cpu_type` in |
| 1488 |
c1*) |
| 1489 |
echo c1-convex-bsd |
| 1490 |
exit ;; |
| 1491 |
c2*) |
| 1492 |
if getsysinfo -f scalar_acc |
| 1493 |
then echo c32-convex-bsd |
| 1494 |
else echo c2-convex-bsd |
| 1495 |
fi |
| 1496 |
exit ;; |
1416 |
exit ;; |
| 1497 |
c34*) |
1417 |
esac |
| 1498 |
echo c34-convex-bsd |
|
|
| 1499 |
exit ;; |
| 1500 |
c38*) |
| 1501 |
echo c38-convex-bsd |
| 1502 |
exit ;; |
| 1503 |
c4*) |
| 1504 |
echo c4-convex-bsd |
| 1505 |
exit ;; |
| 1506 |
esac |
| 1507 |
fi |
| 1508 |
|
1418 |
|
| 1509 |
cat >&2 <<EOF |
1419 |
cat >&2 <<EOF |
| 1510 |
$0: unable to guess system type |
1420 |
$0: unable to guess system type |
|
Lines 1513-1521
Link Here
|
| 1513 |
the operating system you are using. It is advised that you |
1423 |
the operating system you are using. It is advised that you |
| 1514 |
download the most up to date version of the config scripts from |
1424 |
download the most up to date version of the config scripts from |
| 1515 |
|
1425 |
|
| 1516 |
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD |
1426 |
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess |
| 1517 |
and |
1427 |
and |
| 1518 |
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD |
1428 |
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub |
| 1519 |
|
1429 |
|
| 1520 |
If the version you run ($0) is already up to date, please |
1430 |
If the version you run ($0) is already up to date, please |
| 1521 |
send the following data and any information you think might be |
1431 |
send the following data and any information you think might be |