0 | 0 |
#! /bin/sh
|
1 | 1 |
# Attempt to guess a canonical system name.
|
2 | |
# Copyright 1992-2018 Free Software Foundation, Inc.
|
3 | |
|
4 | |
timestamp='2018-02-24'
|
|
2 |
# Copyright 1992-2022 Free Software Foundation, Inc.
|
|
3 |
|
|
4 |
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
|
5 |
|
|
6 |
timestamp='2022-01-09'
|
5 | 7 |
|
6 | 8 |
# This file is free software; you can redistribute it and/or modify it
|
7 | 9 |
# under the terms of the GNU General Public License as published by
|
8 | |
# the Free Software Foundation; either version 3 of the License, or
|
|
10 |
# the Free Software Foundation, either version 3 of the License, or
|
9 | 11 |
# (at your option) any later version.
|
10 | 12 |
#
|
11 | 13 |
# This program is distributed in the hope that it will be useful, but
|
|
26 | 28 |
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
27 | 29 |
#
|
28 | 30 |
# You can get the latest version of this script from:
|
29 | |
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
|
31 |
# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
|
30 | 32 |
#
|
31 | 33 |
# Please send patches to <config-patches@gnu.org>.
|
|
34 |
|
|
35 |
|
|
36 |
# The "shellcheck disable" line above the timestamp inhibits complaints
|
|
37 |
# about features and limitations of the classic Bourne shell that were
|
|
38 |
# superseded or lifted in POSIX. However, this script identifies a wide
|
|
39 |
# variety of pre-POSIX systems that do not have POSIX shells at all, and
|
|
40 |
# even some reasonably current systems (Solaris 10 as case-in-point) still
|
|
41 |
# have a pre-POSIX /bin/sh.
|
32 | 42 |
|
33 | 43 |
|
34 | 44 |
me=`echo "$0" | sed -e 's,.*/,,'`
|
|
49 | 59 |
GNU config.guess ($timestamp)
|
50 | 60 |
|
51 | 61 |
Originally written by Per Bothner.
|
52 | |
Copyright 1992-2018 Free Software Foundation, Inc.
|
|
62 |
Copyright 1992-2022 Free Software Foundation, Inc.
|
53 | 63 |
|
54 | 64 |
This is free software; see the source for copying conditions. There is NO
|
55 | 65 |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
83 | 93 |
exit 1
|
84 | 94 |
fi
|
85 | 95 |
|
86 | |
trap 'exit 1' 1 2 15
|
|
96 |
# Just in case it came from the environment.
|
|
97 |
GUESS=
|
87 | 98 |
|
88 | 99 |
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
89 | 100 |
# compiler to aid in system detection is discouraged as it requires
|
|
95 | 106 |
|
96 | 107 |
# Portable tmp directory creation inspired by the Autoconf team.
|
97 | 108 |
|
98 | |
set_cc_for_build='
|
99 | |
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
100 | |
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
101 | |
: ${TMPDIR=/tmp} ;
|
102 | |
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
103 | |
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
104 | |
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
105 | |
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
106 | |
dummy=$tmp/dummy ;
|
107 | |
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
108 | |
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
109 | |
,,) echo "int x;" > "$dummy.c" ;
|
110 | |
for c in cc gcc c89 c99 ; do
|
111 | |
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
112 | |
CC_FOR_BUILD="$c"; break ;
|
113 | |
fi ;
|
114 | |
done ;
|
115 | |
if test x"$CC_FOR_BUILD" = x ; then
|
116 | |
CC_FOR_BUILD=no_compiler_found ;
|
117 | |
fi
|
118 | |
;;
|
119 | |
,,*) CC_FOR_BUILD=$CC ;;
|
120 | |
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
121 | |
esac ; set_cc_for_build= ;'
|
|
109 |
tmp=
|
|
110 |
# shellcheck disable=SC2172
|
|
111 |
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
|
|
112 |
|
|
113 |
set_cc_for_build() {
|
|
114 |
# prevent multiple calls if $tmp is already set
|
|
115 |
test "$tmp" && return 0
|
|
116 |
: "${TMPDIR=/tmp}"
|
|
117 |
# shellcheck disable=SC2039,SC3028
|
|
118 |
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
|
119 |
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
|
|
120 |
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
|
121 |
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
|
|
122 |
dummy=$tmp/dummy
|
|
123 |
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
|
124 |
,,) echo "int x;" > "$dummy.c"
|
|
125 |
for driver in cc gcc c89 c99 ; do
|
|
126 |
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
|
127 |
CC_FOR_BUILD=$driver
|
|
128 |
break
|
|
129 |
fi
|
|
130 |
done
|
|
131 |
if test x"$CC_FOR_BUILD" = x ; then
|
|
132 |
CC_FOR_BUILD=no_compiler_found
|
|
133 |
fi
|
|
134 |
;;
|
|
135 |
,,*) CC_FOR_BUILD=$CC ;;
|
|
136 |
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
|
137 |
esac
|
|
138 |
}
|
122 | 139 |
|
123 | 140 |
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
124 | 141 |
# (ghazi@noc.rutgers.edu 1994-08-24)
|
125 | |
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
|
142 |
if test -f /.attbin/uname ; then
|
126 | 143 |
PATH=$PATH:/.attbin ; export PATH
|
127 | 144 |
fi
|
128 | 145 |
|
129 | 146 |
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
130 | 147 |
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
131 | |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
|
148 |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
132 | 149 |
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
133 | 150 |
|
134 | |
case "$UNAME_SYSTEM" in
|
|
151 |
case $UNAME_SYSTEM in
|
135 | 152 |
Linux|GNU|GNU/*)
|
136 | |
# If the system lacks a compiler, then just pick glibc.
|
137 | |
# We could probably try harder.
|
138 | |
LIBC=gnu
|
139 | |
|
140 | |
eval "$set_cc_for_build"
|
|
153 |
LIBC=unknown
|
|
154 |
|
|
155 |
set_cc_for_build
|
141 | 156 |
cat <<-EOF > "$dummy.c"
|
142 | 157 |
#include <features.h>
|
143 | 158 |
#if defined(__UCLIBC__)
|
144 | 159 |
LIBC=uclibc
|
145 | 160 |
#elif defined(__dietlibc__)
|
146 | 161 |
LIBC=dietlibc
|
|
162 |
#elif defined(__GLIBC__)
|
|
163 |
LIBC=gnu
|
147 | 164 |
#else
|
148 | |
LIBC=gnu
|
|
165 |
#include <stdarg.h>
|
|
166 |
/* First heuristic to detect musl libc. */
|
|
167 |
#ifdef __DEFINED_va_list
|
|
168 |
LIBC=musl
|
|
169 |
#endif
|
149 | 170 |
#endif
|
150 | 171 |
EOF
|
151 | |
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
|
152 | |
|
153 | |
# If ldd exists, use it to detect musl libc.
|
154 | |
if command -v ldd >/dev/null && \
|
155 | |
ldd --version 2>&1 | grep -q ^musl
|
156 | |
then
|
157 | |
LIBC=musl
|
|
172 |
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
|
173 |
eval "$cc_set_libc"
|
|
174 |
|
|
175 |
# Second heuristic to detect musl libc.
|
|
176 |
if [ "$LIBC" = unknown ] &&
|
|
177 |
command -v ldd >/dev/null &&
|
|
178 |
ldd --version 2>&1 | grep -q ^musl; then
|
|
179 |
LIBC=musl
|
|
180 |
fi
|
|
181 |
|
|
182 |
# If the system lacks a compiler, then just pick glibc.
|
|
183 |
# We could probably try harder.
|
|
184 |
if [ "$LIBC" = unknown ]; then
|
|
185 |
LIBC=gnu
|
158 | 186 |
fi
|
159 | 187 |
;;
|
160 | 188 |
esac
|
161 | 189 |
|
162 | 190 |
# Note: order is significant - the case branches are not exclusive.
|
163 | 191 |
|
164 | |
case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
192 |
case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
165 | 193 |
*:NetBSD:*:*)
|
166 | 194 |
# NetBSD (nbsd) targets should (where applicable) match one or
|
167 | 195 |
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
|
|
173 | 201 |
#
|
174 | 202 |
# Note: NetBSD doesn't particularly care about the vendor
|
175 | 203 |
# portion of the name. We always set it to "unknown".
|
176 | |
sysctl="sysctl -n hw.machine_arch"
|
177 | 204 |
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
|
178 | |
"/sbin/$sysctl" 2>/dev/null || \
|
179 | |
"/usr/sbin/$sysctl" 2>/dev/null || \
|
|
205 |
/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
|
|
206 |
/usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
|
180 | 207 |
echo unknown)`
|
181 | |
case "$UNAME_MACHINE_ARCH" in
|
|
208 |
case $UNAME_MACHINE_ARCH in
|
|
209 |
aarch64eb) machine=aarch64_be-unknown ;;
|
182 | 210 |
armeb) machine=armeb-unknown ;;
|
183 | 211 |
arm*) machine=arm-unknown ;;
|
184 | 212 |
sh3el) machine=shl-unknown ;;
|
|
187 | 215 |
earmv*)
|
188 | 216 |
arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
|
189 | 217 |
endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
|
190 | |
machine="${arch}${endian}"-unknown
|
|
218 |
machine=${arch}${endian}-unknown
|
191 | 219 |
;;
|
192 | |
*) machine="$UNAME_MACHINE_ARCH"-unknown ;;
|
|
220 |
*) machine=$UNAME_MACHINE_ARCH-unknown ;;
|
193 | 221 |
esac
|
194 | 222 |
# The Operating System including object format, if it has switched
|
195 | 223 |
# to ELF recently (or will in the future) and ABI.
|
196 | |
case "$UNAME_MACHINE_ARCH" in
|
|
224 |
case $UNAME_MACHINE_ARCH in
|
197 | 225 |
earm*)
|
198 | 226 |
os=netbsdelf
|
199 | 227 |
;;
|
200 | 228 |
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
201 | |
eval "$set_cc_for_build"
|
|
229 |
set_cc_for_build
|
202 | 230 |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
203 | 231 |
| grep -q __ELF__
|
204 | 232 |
then
|
|
214 | 242 |
;;
|
215 | 243 |
esac
|
216 | 244 |
# Determine ABI tags.
|
217 | |
case "$UNAME_MACHINE_ARCH" in
|
|
245 |
case $UNAME_MACHINE_ARCH in
|
218 | 246 |
earm*)
|
219 | 247 |
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
|
220 | 248 |
abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
|
|
225 | 253 |
# thus, need a distinct triplet. However, they do not need
|
226 | 254 |
# kernel version information, so it can be replaced with a
|
227 | 255 |
# suitable tag, in the style of linux-gnu.
|
228 | |
case "$UNAME_VERSION" in
|
|
256 |
case $UNAME_VERSION in
|
229 | 257 |
Debian*)
|
230 | 258 |
release='-gnu'
|
231 | 259 |
;;
|
|
236 | 264 |
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
237 | 265 |
# contains redundant information, the shorter form:
|
238 | 266 |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
239 | |
echo "$machine-${os}${release}${abi}"
|
240 | |
exit ;;
|
|
267 |
GUESS=$machine-${os}${release}${abi-}
|
|
268 |
;;
|
241 | 269 |
*:Bitrig:*:*)
|
242 | 270 |
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
243 | |
echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
|
244 | |
exit ;;
|
|
271 |
GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
|
|
272 |
;;
|
245 | 273 |
*:OpenBSD:*:*)
|
246 | 274 |
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
247 | |
echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
|
248 | |
exit ;;
|
|
275 |
GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
|
|
276 |
;;
|
|
277 |
*:SecBSD:*:*)
|
|
278 |
UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
|
|
279 |
GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
|
|
280 |
;;
|
249 | 281 |
*:LibertyBSD:*:*)
|
250 | 282 |
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
|
251 | |
echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
|
252 | |
exit ;;
|
|
283 |
GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
|
|
284 |
;;
|
253 | 285 |
*:MidnightBSD:*:*)
|
254 | |
echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
|
255 | |
exit ;;
|
|
286 |
GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
|
|
287 |
;;
|
256 | 288 |
*:ekkoBSD:*:*)
|
257 | |
echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
|
258 | |
exit ;;
|
|
289 |
GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
|
|
290 |
;;
|
259 | 291 |
*:SolidBSD:*:*)
|
260 | |
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
|
261 | |
exit ;;
|
|
292 |
GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
|
|
293 |
;;
|
|
294 |
*:OS108:*:*)
|
|
295 |
GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
|
|
296 |
;;
|
262 | 297 |
macppc:MirBSD:*:*)
|
263 | |
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
|
264 | |
exit ;;
|
|
298 |
GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
|
|
299 |
;;
|
265 | 300 |
*:MirBSD:*:*)
|
266 | |
echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
|
267 | |
exit ;;
|
|
301 |
GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
|
|
302 |
;;
|
268 | 303 |
*:Sortix:*:*)
|
269 | |
echo "$UNAME_MACHINE"-unknown-sortix
|
270 | |
exit ;;
|
|
304 |
GUESS=$UNAME_MACHINE-unknown-sortix
|
|
305 |
;;
|
|
306 |
*:Twizzler:*:*)
|
|
307 |
GUESS=$UNAME_MACHINE-unknown-twizzler
|
|
308 |
;;
|
271 | 309 |
*:Redox:*:*)
|
272 | |
echo "$UNAME_MACHINE"-unknown-redox
|
273 | |
exit ;;
|
|
310 |
GUESS=$UNAME_MACHINE-unknown-redox
|
|
311 |
;;
|
274 | 312 |
mips:OSF1:*.*)
|
275 | |
echo mips-dec-osf1
|
276 | |
exit ;;
|
|
313 |
GUESS=mips-dec-osf1
|
|
314 |
;;
|
277 | 315 |
alpha:OSF1:*:*)
|
|
316 |
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
|
317 |
trap '' 0
|
278 | 318 |
case $UNAME_RELEASE in
|
279 | 319 |
*4.0)
|
280 | 320 |
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
|
288 | 328 |
# covers most systems running today. This code pipes the CPU
|
289 | 329 |
# types through head -n 1, so we only detect the type of CPU 0.
|
290 | 330 |
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
291 | |
case "$ALPHA_CPU_TYPE" in
|
|
331 |
case $ALPHA_CPU_TYPE in
|
292 | 332 |
"EV4 (21064)")
|
293 | 333 |
UNAME_MACHINE=alpha ;;
|
294 | 334 |
"EV4.5 (21064)")
|
|
325 | 365 |
# A Tn.n version is a released field test version.
|
326 | 366 |
# A Xn.n version is an unreleased experimental baselevel.
|
327 | 367 |
# 1.2 uses "1.2" for uname -r.
|
328 | |
echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
|
329 | |
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
330 | |
exitcode=$?
|
331 | |
trap '' 0
|
332 | |
exit $exitcode ;;
|
|
368 |
OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
|
369 |
GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
|
|
370 |
;;
|
333 | 371 |
Amiga*:UNIX_System_V:4.0:*)
|
334 | |
echo m68k-unknown-sysv4
|
335 | |
exit ;;
|
|
372 |
GUESS=m68k-unknown-sysv4
|
|
373 |
;;
|
336 | 374 |
*:[Aa]miga[Oo][Ss]:*:*)
|
337 | |
echo "$UNAME_MACHINE"-unknown-amigaos
|
338 | |
exit ;;
|
|
375 |
GUESS=$UNAME_MACHINE-unknown-amigaos
|
|
376 |
;;
|
339 | 377 |
*:[Mm]orph[Oo][Ss]:*:*)
|
340 | |
echo "$UNAME_MACHINE"-unknown-morphos
|
341 | |
exit ;;
|
|
378 |
GUESS=$UNAME_MACHINE-unknown-morphos
|
|
379 |
;;
|
342 | 380 |
*:OS/390:*:*)
|
343 | |
echo i370-ibm-openedition
|
344 | |
exit ;;
|
|
381 |
GUESS=i370-ibm-openedition
|
|
382 |
;;
|
345 | 383 |
*:z/VM:*:*)
|
346 | |
echo s390-ibm-zvmoe
|
347 | |
exit ;;
|
|
384 |
GUESS=s390-ibm-zvmoe
|
|
385 |
;;
|
348 | 386 |
*:OS400:*:*)
|
349 | |
echo powerpc-ibm-os400
|
350 | |
exit ;;
|
|
387 |
GUESS=powerpc-ibm-os400
|
|
388 |
;;
|
351 | 389 |
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
352 | |
echo arm-acorn-riscix"$UNAME_RELEASE"
|
353 | |
exit ;;
|
|
390 |
GUESS=arm-acorn-riscix$UNAME_RELEASE
|
|
391 |
;;
|
354 | 392 |
arm*:riscos:*:*|arm*:RISCOS:*:*)
|
355 | |
echo arm-unknown-riscos
|
356 | |
exit ;;
|
|
393 |
GUESS=arm-unknown-riscos
|
|
394 |
;;
|
357 | 395 |
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
358 | |
echo hppa1.1-hitachi-hiuxmpp
|
359 | |
exit ;;
|
|
396 |
GUESS=hppa1.1-hitachi-hiuxmpp
|
|
397 |
;;
|
360 | 398 |
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
|
361 | 399 |
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
362 | |
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
363 | |
echo pyramid-pyramid-sysv3
|
364 | |
else
|
365 | |
echo pyramid-pyramid-bsd
|
366 | |
fi
|
367 | |
exit ;;
|
|
400 |
case `(/bin/universe) 2>/dev/null` in
|
|
401 |
att) GUESS=pyramid-pyramid-sysv3 ;;
|
|
402 |
*) GUESS=pyramid-pyramid-bsd ;;
|
|
403 |
esac
|
|
404 |
;;
|
368 | 405 |
NILE*:*:*:dcosx)
|
369 | |
echo pyramid-pyramid-svr4
|
370 | |
exit ;;
|
|
406 |
GUESS=pyramid-pyramid-svr4
|
|
407 |
;;
|
371 | 408 |
DRS?6000:unix:4.0:6*)
|
372 | |
echo sparc-icl-nx6
|
373 | |
exit ;;
|
|
409 |
GUESS=sparc-icl-nx6
|
|
410 |
;;
|
374 | 411 |
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
|
375 | 412 |
case `/usr/bin/uname -p` in
|
376 | |
sparc) echo sparc-icl-nx7; exit ;;
|
377 | |
esac ;;
|
|
413 |
sparc) GUESS=sparc-icl-nx7 ;;
|
|
414 |
esac
|
|
415 |
;;
|
378 | 416 |
s390x:SunOS:*:*)
|
379 | |
echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
|
380 | |
exit ;;
|
|
417 |
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
418 |
GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
|
|
419 |
;;
|
381 | 420 |
sun4H:SunOS:5.*:*)
|
382 | |
echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
383 | |
exit ;;
|
|
421 |
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
422 |
GUESS=sparc-hal-solaris2$SUN_REL
|
|
423 |
;;
|
384 | 424 |
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
385 | |
echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
|
386 | |
exit ;;
|
|
425 |
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
426 |
GUESS=sparc-sun-solaris2$SUN_REL
|
|
427 |
;;
|
387 | 428 |
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
|
388 | |
echo i386-pc-auroraux"$UNAME_RELEASE"
|
389 | |
exit ;;
|
|
429 |
GUESS=i386-pc-auroraux$UNAME_RELEASE
|
|
430 |
;;
|
390 | 431 |
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
391 | |
eval "$set_cc_for_build"
|
|
432 |
set_cc_for_build
|
392 | 433 |
SUN_ARCH=i386
|
393 | 434 |
# If there is a compiler, see if it is configured for 64-bit objects.
|
394 | 435 |
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
395 | 436 |
# This test works for both compilers.
|
396 | |
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
|
437 |
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
397 | 438 |
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
398 | |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
439 |
(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
|
399 | 440 |
grep IS_64BIT_ARCH >/dev/null
|
400 | 441 |
then
|
401 | 442 |
SUN_ARCH=x86_64
|
402 | 443 |
fi
|
403 | 444 |
fi
|
404 | |
echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
405 | |
exit ;;
|
|
445 |
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
446 |
GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
|
|
447 |
;;
|
406 | 448 |
sun4*:SunOS:6*:*)
|
407 | 449 |
# According to config.sub, this is the proper way to canonicalize
|
408 | 450 |
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
409 | 451 |
# it's likely to be more like Solaris than SunOS4.
|
410 | |
echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
411 | |
exit ;;
|
|
452 |
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
453 |
GUESS=sparc-sun-solaris3$SUN_REL
|
|
454 |
;;
|
412 | 455 |
sun4*:SunOS:*:*)
|
413 | |
case "`/usr/bin/arch -k`" in
|
|
456 |
case `/usr/bin/arch -k` in
|
414 | 457 |
Series*|S4*)
|
415 | 458 |
UNAME_RELEASE=`uname -v`
|
416 | 459 |
;;
|
417 | 460 |
esac
|
418 | 461 |
# Japanese Language versions have a version number like `4.1.3-JL'.
|
419 | |
echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
|
420 | |
exit ;;
|
|
462 |
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
|
463 |
GUESS=sparc-sun-sunos$SUN_REL
|
|
464 |
;;
|
421 | 465 |
sun3*:SunOS:*:*)
|
422 | |
echo m68k-sun-sunos"$UNAME_RELEASE"
|
423 | |
exit ;;
|
|
466 |
GUESS=m68k-sun-sunos$UNAME_RELEASE
|
|
467 |
;;
|
424 | 468 |
sun*:*:4.2BSD:*)
|
425 | 469 |
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
426 | 470 |
test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
|
427 | |
case "`/bin/arch`" in
|
|
471 |
case `/bin/arch` in
|
428 | 472 |
sun3)
|
429 | |
echo m68k-sun-sunos"$UNAME_RELEASE"
|
|
473 |
GUESS=m68k-sun-sunos$UNAME_RELEASE
|
430 | 474 |
;;
|
431 | 475 |
sun4)
|
432 | |
echo sparc-sun-sunos"$UNAME_RELEASE"
|
|
476 |
GUESS=sparc-sun-sunos$UNAME_RELEASE
|
433 | 477 |
;;
|
434 | 478 |
esac
|
435 | |
exit ;;
|
|
479 |
;;
|
436 | 480 |
aushp:SunOS:*:*)
|
437 | |
echo sparc-auspex-sunos"$UNAME_RELEASE"
|
438 | |
exit ;;
|
|
481 |
GUESS=sparc-auspex-sunos$UNAME_RELEASE
|
|
482 |
;;
|
439 | 483 |
# The situation for MiNT is a little confusing. The machine name
|
440 | 484 |
# can be virtually everything (everything which is not
|
441 | 485 |
# "atarist" or "atariste" at least should have a processor
|
|
445 | 489 |
# MiNT. But MiNT is downward compatible to TOS, so this should
|
446 | 490 |
# be no problem.
|
447 | 491 |
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
448 | |
echo m68k-atari-mint"$UNAME_RELEASE"
|
449 | |
exit ;;
|
|
492 |
GUESS=m68k-atari-mint$UNAME_RELEASE
|
|
493 |
;;
|
450 | 494 |
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
451 | |
echo m68k-atari-mint"$UNAME_RELEASE"
|
452 | |
exit ;;
|
|
495 |
GUESS=m68k-atari-mint$UNAME_RELEASE
|
|
496 |
;;
|
453 | 497 |
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
454 | |
echo m68k-atari-mint"$UNAME_RELEASE"
|
455 | |
exit ;;
|
|
498 |
GUESS=m68k-atari-mint$UNAME_RELEASE
|
|
499 |
;;
|
456 | 500 |
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
457 | |
echo m68k-milan-mint"$UNAME_RELEASE"
|
458 | |
exit ;;
|
|
501 |
GUESS=m68k-milan-mint$UNAME_RELEASE
|
|
502 |
;;
|
459 | 503 |
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
460 | |
echo m68k-hades-mint"$UNAME_RELEASE"
|
461 | |
exit ;;
|
|
504 |
GUESS=m68k-hades-mint$UNAME_RELEASE
|
|
505 |
;;
|
462 | 506 |
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
463 | |
echo m68k-unknown-mint"$UNAME_RELEASE"
|
464 | |
exit ;;
|
|
507 |
GUESS=m68k-unknown-mint$UNAME_RELEASE
|
|
508 |
;;
|
465 | 509 |
m68k:machten:*:*)
|
466 | |
echo m68k-apple-machten"$UNAME_RELEASE"
|
467 | |
exit ;;
|
|
510 |
GUESS=m68k-apple-machten$UNAME_RELEASE
|
|
511 |
;;
|
468 | 512 |
powerpc:machten:*:*)
|
469 | |
echo powerpc-apple-machten"$UNAME_RELEASE"
|
470 | |
exit ;;
|
|
513 |
GUESS=powerpc-apple-machten$UNAME_RELEASE
|
|
514 |
;;
|
471 | 515 |
RISC*:Mach:*:*)
|
472 | |
echo mips-dec-mach_bsd4.3
|
473 | |
exit ;;
|
|
516 |
GUESS=mips-dec-mach_bsd4.3
|
|
517 |
;;
|
474 | 518 |
RISC*:ULTRIX:*:*)
|
475 | |
echo mips-dec-ultrix"$UNAME_RELEASE"
|
476 | |
exit ;;
|
|
519 |
GUESS=mips-dec-ultrix$UNAME_RELEASE
|
|
520 |
;;
|
477 | 521 |
VAX*:ULTRIX*:*:*)
|
478 | |
echo vax-dec-ultrix"$UNAME_RELEASE"
|
479 | |
exit ;;
|
|
522 |
GUESS=vax-dec-ultrix$UNAME_RELEASE
|
|
523 |
;;
|
480 | 524 |
2020:CLIX:*:* | 2430:CLIX:*:*)
|
481 | |
echo clipper-intergraph-clix"$UNAME_RELEASE"
|
482 | |
exit ;;
|
|
525 |
GUESS=clipper-intergraph-clix$UNAME_RELEASE
|
|
526 |
;;
|
483 | 527 |
mips:*:*:UMIPS | mips:*:*:RISCos)
|
484 | |
eval "$set_cc_for_build"
|
|
528 |
set_cc_for_build
|
485 | 529 |
sed 's/^ //' << EOF > "$dummy.c"
|
486 | 530 |
#ifdef __cplusplus
|
487 | 531 |
#include <stdio.h> /* for printf() prototype */
|
|
507 | 551 |
dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
|
508 | 552 |
SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
|
509 | 553 |
{ echo "$SYSTEM_NAME"; exit; }
|
510 | |
echo mips-mips-riscos"$UNAME_RELEASE"
|
511 | |
exit ;;
|
|
554 |
GUESS=mips-mips-riscos$UNAME_RELEASE
|
|
555 |
;;
|
512 | 556 |
Motorola:PowerMAX_OS:*:*)
|
513 | |
echo powerpc-motorola-powermax
|
514 | |
exit ;;
|
|
557 |
GUESS=powerpc-motorola-powermax
|
|
558 |
;;
|
515 | 559 |
Motorola:*:4.3:PL8-*)
|
516 | |
echo powerpc-harris-powermax
|
517 | |
exit ;;
|
|
560 |
GUESS=powerpc-harris-powermax
|
|
561 |
;;
|
518 | 562 |
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
519 | |
echo powerpc-harris-powermax
|
520 | |
exit ;;
|
|
563 |
GUESS=powerpc-harris-powermax
|
|
564 |
;;
|
521 | 565 |
Night_Hawk:Power_UNIX:*:*)
|
522 | |
echo powerpc-harris-powerunix
|
523 | |
exit ;;
|
|
566 |
GUESS=powerpc-harris-powerunix
|
|
567 |
;;
|
524 | 568 |
m88k:CX/UX:7*:*)
|
525 | |
echo m88k-harris-cxux7
|
526 | |
exit ;;
|
|
569 |
GUESS=m88k-harris-cxux7
|
|
570 |
;;
|
527 | 571 |
m88k:*:4*:R4*)
|
528 | |
echo m88k-motorola-sysv4
|
529 | |
exit ;;
|
|
572 |
GUESS=m88k-motorola-sysv4
|
|
573 |
;;
|
530 | 574 |
m88k:*:3*:R3*)
|
531 | |
echo m88k-motorola-sysv3
|
532 | |
exit ;;
|
|
575 |
GUESS=m88k-motorola-sysv3
|
|
576 |
;;
|
533 | 577 |
AViiON:dgux:*:*)
|
534 | 578 |
# DG/UX returns AViiON for all architectures
|
535 | 579 |
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
536 | |
if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
|
|
580 |
if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
|
537 | 581 |
then
|
538 | |
if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
|
539 | |
[ "$TARGET_BINARY_INTERFACE"x = x ]
|
|
582 |
if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
|
|
583 |
test "$TARGET_BINARY_INTERFACE"x = x
|
540 | 584 |
then
|
541 | |
echo m88k-dg-dgux"$UNAME_RELEASE"
|
|
585 |
GUESS=m88k-dg-dgux$UNAME_RELEASE
|
542 | 586 |
else
|
543 | |
echo m88k-dg-dguxbcs"$UNAME_RELEASE"
|
|
587 |
GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
|
544 | 588 |
fi
|
545 | 589 |
else
|
546 | |
echo i586-dg-dgux"$UNAME_RELEASE"
|
547 | |
fi
|
548 | |
exit ;;
|
|
590 |
GUESS=i586-dg-dgux$UNAME_RELEASE
|
|
591 |
fi
|
|
592 |
;;
|
549 | 593 |
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
550 | |
echo m88k-dolphin-sysv3
|
551 | |
exit ;;
|
|
594 |
GUESS=m88k-dolphin-sysv3
|
|
595 |
;;
|
552 | 596 |
M88*:*:R3*:*)
|
553 | 597 |
# Delta 88k system running SVR3
|
554 | |
echo m88k-motorola-sysv3
|
555 | |
exit ;;
|
|
598 |
GUESS=m88k-motorola-sysv3
|
|
599 |
;;
|
556 | 600 |
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
|
557 | |
echo m88k-tektronix-sysv3
|
558 | |
exit ;;
|
|
601 |
GUESS=m88k-tektronix-sysv3
|
|
602 |
;;
|
559 | 603 |
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
|
560 | |
echo m68k-tektronix-bsd
|
561 | |
exit ;;
|
|
604 |
GUESS=m68k-tektronix-bsd
|
|
605 |
;;
|
562 | 606 |
*:IRIX*:*:*)
|
563 | |
echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
|
564 | |
exit ;;
|
|
607 |
IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
|
|
608 |
GUESS=mips-sgi-irix$IRIX_REL
|
|
609 |
;;
|
565 | 610 |
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
|
566 | |
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
567 | |
exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
|
611 |
GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
|
612 |
;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
568 | 613 |
i*86:AIX:*:*)
|
569 | |
echo i386-ibm-aix
|
570 | |
exit ;;
|
|
614 |
GUESS=i386-ibm-aix
|
|
615 |
;;
|
571 | 616 |
ia64:AIX:*:*)
|
572 | |
if [ -x /usr/bin/oslevel ] ; then
|
|
617 |
if test -x /usr/bin/oslevel ; then
|
573 | 618 |
IBM_REV=`/usr/bin/oslevel`
|
574 | 619 |
else
|
575 | |
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
|
576 | |
fi
|
577 | |
echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
|
578 | |
exit ;;
|
|
620 |
IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
|
|
621 |
fi
|
|
622 |
GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
|
|
623 |
;;
|
579 | 624 |
*:AIX:2:3)
|
580 | 625 |
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
581 | |
eval "$set_cc_for_build"
|
|
626 |
set_cc_for_build
|
582 | 627 |
sed 's/^ //' << EOF > "$dummy.c"
|
583 | 628 |
#include <sys/systemcfg.h>
|
584 | 629 |
|
|
592 | 637 |
EOF
|
593 | 638 |
if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
|
594 | 639 |
then
|
595 | |
echo "$SYSTEM_NAME"
|
|
640 |
GUESS=$SYSTEM_NAME
|
596 | 641 |
else
|
597 | |
echo rs6000-ibm-aix3.2.5
|
|
642 |
GUESS=rs6000-ibm-aix3.2.5
|
598 | 643 |
fi
|
599 | 644 |
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
600 | |
echo rs6000-ibm-aix3.2.4
|
|
645 |
GUESS=rs6000-ibm-aix3.2.4
|
601 | 646 |
else
|
602 | |
echo rs6000-ibm-aix3.2
|
603 | |
fi
|
604 | |
exit ;;
|
|
647 |
GUESS=rs6000-ibm-aix3.2
|
|
648 |
fi
|
|
649 |
;;
|
605 | 650 |
*:AIX:*:[4567])
|
606 | 651 |
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
607 | 652 |
if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
|
|
609 | 654 |
else
|
610 | 655 |
IBM_ARCH=powerpc
|
611 | 656 |
fi
|
612 | |
if [ -x /usr/bin/lslpp ] ; then
|
613 | |
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
|
|
657 |
if test -x /usr/bin/lslpp ; then
|
|
658 |
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
|
614 | 659 |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
|
615 | 660 |
else
|
616 | |
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
|
617 | |
fi
|
618 | |
echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
|
619 | |
exit ;;
|
|
661 |
IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
|
|
662 |
fi
|
|
663 |
GUESS=$IBM_ARCH-ibm-aix$IBM_REV
|
|
664 |
;;
|
620 | 665 |
*:AIX:*:*)
|
621 | |
echo rs6000-ibm-aix
|
622 | |
exit ;;
|
|
666 |
GUESS=rs6000-ibm-aix
|
|
667 |
;;
|
623 | 668 |
ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
|
624 | |
echo romp-ibm-bsd4.4
|
625 | |
exit ;;
|
|
669 |
GUESS=romp-ibm-bsd4.4
|
|
670 |
;;
|
626 | 671 |
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
|
627 | |
echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
|
628 | |
exit ;; # report: romp-ibm BSD 4.3
|
|
672 |
GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
|
|
673 |
;; # report: romp-ibm BSD 4.3
|
629 | 674 |
*:BOSX:*:*)
|
630 | |
echo rs6000-bull-bosx
|
631 | |
exit ;;
|
|
675 |
GUESS=rs6000-bull-bosx
|
|
676 |
;;
|
632 | 677 |
DPX/2?00:B.O.S.:*:*)
|
633 | |
echo m68k-bull-sysv3
|
634 | |
exit ;;
|
|
678 |
GUESS=m68k-bull-sysv3
|
|
679 |
;;
|
635 | 680 |
9000/[34]??:4.3bsd:1.*:*)
|
636 | |
echo m68k-hp-bsd
|
637 | |
exit ;;
|
|
681 |
GUESS=m68k-hp-bsd
|
|
682 |
;;
|
638 | 683 |
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
639 | |
echo m68k-hp-bsd4.4
|
640 | |
exit ;;
|
|
684 |
GUESS=m68k-hp-bsd4.4
|
|
685 |
;;
|
641 | 686 |
9000/[34678]??:HP-UX:*:*)
|
642 | |
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
|
643 | |
case "$UNAME_MACHINE" in
|
|
687 |
HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
|
|
688 |
case $UNAME_MACHINE in
|
644 | 689 |
9000/31?) HP_ARCH=m68000 ;;
|
645 | 690 |
9000/[34]??) HP_ARCH=m68k ;;
|
646 | 691 |
9000/[678][0-9][0-9])
|
647 | |
if [ -x /usr/bin/getconf ]; then
|
|
692 |
if test -x /usr/bin/getconf; then
|
648 | 693 |
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
649 | 694 |
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
650 | |
case "$sc_cpu_version" in
|
|
695 |
case $sc_cpu_version in
|
651 | 696 |
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
|
652 | 697 |
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
|
653 | 698 |
532) # CPU_PA_RISC2_0
|
654 | |
case "$sc_kernel_bits" in
|
|
699 |
case $sc_kernel_bits in
|
655 | 700 |
32) HP_ARCH=hppa2.0n ;;
|
656 | 701 |
64) HP_ARCH=hppa2.0w ;;
|
657 | 702 |
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
|
658 | 703 |
esac ;;
|
659 | 704 |
esac
|
660 | 705 |
fi
|
661 | |
if [ "$HP_ARCH" = "" ]; then
|
662 | |
eval "$set_cc_for_build"
|
|
706 |
if test "$HP_ARCH" = ""; then
|
|
707 |
set_cc_for_build
|
663 | 708 |
sed 's/^ //' << EOF > "$dummy.c"
|
664 | 709 |
|
665 | 710 |
#define _HPUX_SOURCE
|
|
697 | 742 |
test -z "$HP_ARCH" && HP_ARCH=hppa
|
698 | 743 |
fi ;;
|
699 | 744 |
esac
|
700 | |
if [ "$HP_ARCH" = hppa2.0w ]
|
|
745 |
if test "$HP_ARCH" = hppa2.0w
|
701 | 746 |
then
|
702 | |
eval "$set_cc_for_build"
|
|
747 |
set_cc_for_build
|
703 | 748 |
|
704 | 749 |
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
|
705 | 750 |
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
|
|
718 | 763 |
HP_ARCH=hppa64
|
719 | 764 |
fi
|
720 | 765 |
fi
|
721 | |
echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
|
722 | |
exit ;;
|
|
766 |
GUESS=$HP_ARCH-hp-hpux$HPUX_REV
|
|
767 |
;;
|
723 | 768 |
ia64:HP-UX:*:*)
|
724 | |
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
|
725 | |
echo ia64-hp-hpux"$HPUX_REV"
|
726 | |
exit ;;
|
|
769 |
HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
|
|
770 |
GUESS=ia64-hp-hpux$HPUX_REV
|
|
771 |
;;
|
727 | 772 |
3050*:HI-UX:*:*)
|
728 | |
eval "$set_cc_for_build"
|
|
773 |
set_cc_for_build
|
729 | 774 |
sed 's/^ //' << EOF > "$dummy.c"
|
730 | 775 |
#include <unistd.h>
|
731 | 776 |
int
|
|
753 | 798 |
EOF
|
754 | 799 |
$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
|
755 | 800 |
{ echo "$SYSTEM_NAME"; exit; }
|
756 | |
echo unknown-hitachi-hiuxwe2
|
757 | |
exit ;;
|
|
801 |
GUESS=unknown-hitachi-hiuxwe2
|
|
802 |
;;
|
758 | 803 |
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
|
759 | |
echo hppa1.1-hp-bsd
|
760 | |
exit ;;
|
|
804 |
GUESS=hppa1.1-hp-bsd
|
|
805 |
;;
|
761 | 806 |
9000/8??:4.3bsd:*:*)
|
762 | |
echo hppa1.0-hp-bsd
|
763 | |
exit ;;
|
|
807 |
GUESS=hppa1.0-hp-bsd
|
|
808 |
;;
|
764 | 809 |
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
|
765 | |
echo hppa1.0-hp-mpeix
|
766 | |
exit ;;
|
|
810 |
GUESS=hppa1.0-hp-mpeix
|
|
811 |
;;
|
767 | 812 |
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
|
768 | |
echo hppa1.1-hp-osf
|
769 | |
exit ;;
|
|
813 |
GUESS=hppa1.1-hp-osf
|
|
814 |
;;
|
770 | 815 |
hp8??:OSF1:*:*)
|
771 | |
echo hppa1.0-hp-osf
|
772 | |
exit ;;
|
|
816 |
GUESS=hppa1.0-hp-osf
|
|
817 |
;;
|
773 | 818 |
i*86:OSF1:*:*)
|
774 | |
if [ -x /usr/sbin/sysversion ] ; then
|
775 | |
echo "$UNAME_MACHINE"-unknown-osf1mk
|
|
819 |
if test -x /usr/sbin/sysversion ; then
|
|
820 |
GUESS=$UNAME_MACHINE-unknown-osf1mk
|
776 | 821 |
else
|
777 | |
echo "$UNAME_MACHINE"-unknown-osf1
|
778 | |
fi
|
779 | |
exit ;;
|
|
822 |
GUESS=$UNAME_MACHINE-unknown-osf1
|
|
823 |
fi
|
|
824 |
;;
|
780 | 825 |
parisc*:Lites*:*:*)
|
781 | |
echo hppa1.1-hp-lites
|
782 | |
exit ;;
|
|
826 |
GUESS=hppa1.1-hp-lites
|
|
827 |
;;
|
783 | 828 |
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
784 | |
echo c1-convex-bsd
|
785 | |
exit ;;
|
|
829 |
GUESS=c1-convex-bsd
|
|
830 |
;;
|
786 | 831 |
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
787 | 832 |
if getsysinfo -f scalar_acc
|
788 | 833 |
then echo c32-convex-bsd
|
|
790 | 835 |
fi
|
791 | 836 |
exit ;;
|
792 | 837 |
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
793 | |
echo c34-convex-bsd
|
794 | |
exit ;;
|
|
838 |
GUESS=c34-convex-bsd
|
|
839 |
;;
|
795 | 840 |
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
796 | |
echo c38-convex-bsd
|
797 | |
exit ;;
|
|
841 |
GUESS=c38-convex-bsd
|
|
842 |
;;
|
798 | 843 |
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
799 | |
echo c4-convex-bsd
|
800 | |
exit ;;
|
|
844 |
GUESS=c4-convex-bsd
|
|
845 |
;;
|
801 | 846 |
CRAY*Y-MP:*:*:*)
|
802 | |
echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
|
803 | |
exit ;;
|
|
847 |
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
848 |
GUESS=ymp-cray-unicos$CRAY_REL
|
|
849 |
;;
|
804 | 850 |
CRAY*[A-Z]90:*:*:*)
|
805 | 851 |
echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
|
806 | 852 |
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
|
|
808 | 854 |
-e 's/\.[^.]*$/.X/'
|
809 | 855 |
exit ;;
|
810 | 856 |
CRAY*TS:*:*:*)
|
811 | |
echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
|
812 | |
exit ;;
|
|
857 |
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
858 |
GUESS=t90-cray-unicos$CRAY_REL
|
|
859 |
;;
|
813 | 860 |
CRAY*T3E:*:*:*)
|
814 | |
echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
|
815 | |
exit ;;
|
|
861 |
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
862 |
GUESS=alphaev5-cray-unicosmk$CRAY_REL
|
|
863 |
;;
|
816 | 864 |
CRAY*SV1:*:*:*)
|
817 | |
echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
|
818 | |
exit ;;
|
|
865 |
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
866 |
GUESS=sv1-cray-unicos$CRAY_REL
|
|
867 |
;;
|
819 | 868 |
*:UNICOS/mp:*:*)
|
820 | |
echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
|
821 | |
exit ;;
|
|
869 |
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
870 |
GUESS=craynv-cray-unicosmp$CRAY_REL
|
|
871 |
;;
|
822 | 872 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
823 | 873 |
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
824 | 874 |
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
825 | 875 |
FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
|
826 | |
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
827 | |
exit ;;
|
|
876 |
GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
|
|
877 |
;;
|
828 | 878 |
5000:UNIX_System_V:4.*:*)
|
829 | 879 |
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
830 | 880 |
FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
|
831 | |
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
832 | |
exit ;;
|
|
881 |
GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
|
|
882 |
;;
|
833 | 883 |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
834 | |
echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
|
835 | |
exit ;;
|
|
884 |
GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
|
|
885 |
;;
|
836 | 886 |
sparc*:BSD/OS:*:*)
|
837 | |
echo sparc-unknown-bsdi"$UNAME_RELEASE"
|
838 | |
exit ;;
|
|
887 |
GUESS=sparc-unknown-bsdi$UNAME_RELEASE
|
|
888 |
;;
|
839 | 889 |
*:BSD/OS:*:*)
|
840 | |
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
|
841 | |
exit ;;
|
|
890 |
GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
|
|
891 |
;;
|
|
892 |
arm:FreeBSD:*:*)
|
|
893 |
UNAME_PROCESSOR=`uname -p`
|
|
894 |
set_cc_for_build
|
|
895 |
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
896 |
| grep -q __ARM_PCS_VFP
|
|
897 |
then
|
|
898 |
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
899 |
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
|
|
900 |
else
|
|
901 |
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
902 |
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
|
|
903 |
fi
|
|
904 |
;;
|
842 | 905 |
*:FreeBSD:*:*)
|
843 | 906 |
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
844 | |
case "$UNAME_PROCESSOR" in
|
|
907 |
case $UNAME_PROCESSOR in
|
845 | 908 |
amd64)
|
846 | 909 |
UNAME_PROCESSOR=x86_64 ;;
|
847 | 910 |
i386)
|
848 | 911 |
UNAME_PROCESSOR=i586 ;;
|
849 | 912 |
esac
|
850 | |
echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
|
851 | |
exit ;;
|
|
913 |
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
914 |
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
|
|
915 |
;;
|
852 | 916 |
i*:CYGWIN*:*)
|
853 | |
echo "$UNAME_MACHINE"-pc-cygwin
|
854 | |
exit ;;
|
|
917 |
GUESS=$UNAME_MACHINE-pc-cygwin
|
|
918 |
;;
|
855 | 919 |
*:MINGW64*:*)
|
856 | |
echo "$UNAME_MACHINE"-pc-mingw64
|
857 | |
exit ;;
|
|
920 |
GUESS=$UNAME_MACHINE-pc-mingw64
|
|
921 |
;;
|
858 | 922 |
*:MINGW*:*)
|
859 | |
echo "$UNAME_MACHINE"-pc-mingw32
|
860 | |
exit ;;
|
|
923 |
GUESS=$UNAME_MACHINE-pc-mingw32
|
|
924 |
;;
|
861 | 925 |
*:MSYS*:*)
|
862 | |
echo "$UNAME_MACHINE"-pc-msys
|
863 | |
exit ;;
|
|
926 |
GUESS=$UNAME_MACHINE-pc-msys
|
|
927 |
;;
|
864 | 928 |
i*:PW*:*)
|
865 | |
echo "$UNAME_MACHINE"-pc-pw32
|
866 | |
exit ;;
|
|
929 |
GUESS=$UNAME_MACHINE-pc-pw32
|
|
930 |
;;
|
|
931 |
*:SerenityOS:*:*)
|
|
932 |
GUESS=$UNAME_MACHINE-pc-serenity
|
|
933 |
;;
|
867 | 934 |
*:Interix*:*)
|
868 | |
case "$UNAME_MACHINE" in
|
|
935 |
case $UNAME_MACHINE in
|
869 | 936 |
x86)
|
870 | |
echo i586-pc-interix"$UNAME_RELEASE"
|
871 | |
exit ;;
|
|
937 |
GUESS=i586-pc-interix$UNAME_RELEASE
|
|
938 |
;;
|
872 | 939 |
authenticamd | genuineintel | EM64T)
|
873 | |
echo x86_64-unknown-interix"$UNAME_RELEASE"
|
874 | |
exit ;;
|
|
940 |
GUESS=x86_64-unknown-interix$UNAME_RELEASE
|
|
941 |
;;
|
875 | 942 |
IA64)
|
876 | |
echo ia64-unknown-interix"$UNAME_RELEASE"
|
877 | |
exit ;;
|
|
943 |
GUESS=ia64-unknown-interix$UNAME_RELEASE
|
|
944 |
;;
|
878 | 945 |
esac ;;
|
879 | 946 |
i*:UWIN*:*)
|
880 | |
echo "$UNAME_MACHINE"-pc-uwin
|
881 | |
exit ;;
|
|
947 |
GUESS=$UNAME_MACHINE-pc-uwin
|
|
948 |
;;
|
882 | 949 |
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
883 | |
echo x86_64-unknown-cygwin
|
884 | |
exit ;;
|
|
950 |
GUESS=x86_64-pc-cygwin
|
|
951 |
;;
|
885 | 952 |
prep*:SunOS:5.*:*)
|
886 | |
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
887 | |
exit ;;
|
|
953 |
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
954 |
GUESS=powerpcle-unknown-solaris2$SUN_REL
|
|
955 |
;;
|
888 | 956 |
*:GNU:*:*)
|
889 | 957 |
# the GNU system
|
890 | |
echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
|
891 | |
exit ;;
|
|
958 |
GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
|
|
959 |
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
|
|
960 |
GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
|
|
961 |
;;
|
892 | 962 |
*:GNU/*:*:*)
|
893 | 963 |
# other systems with GNU libc and userland
|
894 | |
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
895 | |
exit ;;
|
896 | |
i*86:Minix:*:*)
|
897 | |
echo "$UNAME_MACHINE"-pc-minix
|
898 | |
exit ;;
|
|
964 |
GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
|
|
965 |
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
966 |
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
|
967 |
;;
|
|
968 |
*:Minix:*:*)
|
|
969 |
GUESS=$UNAME_MACHINE-unknown-minix
|
|
970 |
;;
|
899 | 971 |
aarch64:Linux:*:*)
|
900 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
901 | |
exit ;;
|
|
972 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
973 |
;;
|
902 | 974 |
aarch64_be:Linux:*:*)
|
903 | 975 |
UNAME_MACHINE=aarch64_be
|
904 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
905 | |
exit ;;
|
|
976 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
977 |
;;
|
906 | 978 |
alpha:Linux:*:*)
|
907 | |
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
|
979 |
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
908 | 980 |
EV5) UNAME_MACHINE=alphaev5 ;;
|
909 | 981 |
EV56) UNAME_MACHINE=alphaev56 ;;
|
910 | 982 |
PCA56) UNAME_MACHINE=alphapca56 ;;
|
|
915 | 987 |
esac
|
916 | 988 |
objdump --private-headers /bin/sh | grep -q ld.so.1
|
917 | 989 |
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
|
918 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
919 | |
exit ;;
|
920 | |
arc:Linux:*:* | arceb:Linux:*:*)
|
921 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
922 | |
exit ;;
|
|
990 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
991 |
;;
|
|
992 |
arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
|
|
993 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
994 |
;;
|
923 | 995 |
arm*:Linux:*:*)
|
924 | |
eval "$set_cc_for_build"
|
|
996 |
set_cc_for_build
|
925 | 997 |
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
926 | 998 |
| grep -q __ARM_EABI__
|
927 | 999 |
then
|
928 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
|
1000 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
929 | 1001 |
else
|
930 | 1002 |
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
931 | 1003 |
| grep -q __ARM_PCS_VFP
|
932 | 1004 |
then
|
933 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
|
|
1005 |
GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
|
934 | 1006 |
else
|
935 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
|
|
1007 |
GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
|
936 | 1008 |
fi
|
937 | 1009 |
fi
|
938 | |
exit ;;
|
|
1010 |
;;
|
939 | 1011 |
avr32*:Linux:*:*)
|
940 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
941 | |
exit ;;
|
|
1012 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1013 |
;;
|
942 | 1014 |
cris:Linux:*:*)
|
943 | |
echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
|
944 | |
exit ;;
|
|
1015 |
GUESS=$UNAME_MACHINE-axis-linux-$LIBC
|
|
1016 |
;;
|
945 | 1017 |
crisv32:Linux:*:*)
|
946 | |
echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
|
947 | |
exit ;;
|
|
1018 |
GUESS=$UNAME_MACHINE-axis-linux-$LIBC
|
|
1019 |
;;
|
948 | 1020 |
e2k:Linux:*:*)
|
949 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
950 | |
exit ;;
|
|
1021 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1022 |
;;
|
951 | 1023 |
frv:Linux:*:*)
|
952 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
953 | |
exit ;;
|
|
1024 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1025 |
;;
|
954 | 1026 |
hexagon:Linux:*:*)
|
955 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
956 | |
exit ;;
|
|
1027 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1028 |
;;
|
957 | 1029 |
i*86:Linux:*:*)
|
958 | |
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
|
959 | |
exit ;;
|
|
1030 |
GUESS=$UNAME_MACHINE-pc-linux-$LIBC
|
|
1031 |
;;
|
960 | 1032 |
ia64:Linux:*:*)
|
961 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
962 | |
exit ;;
|
|
1033 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1034 |
;;
|
963 | 1035 |
k1om:Linux:*:*)
|
964 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
965 | |
exit ;;
|
|
1036 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1037 |
;;
|
|
1038 |
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
|
|
1039 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1040 |
;;
|
966 | 1041 |
m32r*:Linux:*:*)
|
967 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
968 | |
exit ;;
|
|
1042 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1043 |
;;
|
969 | 1044 |
m68*:Linux:*:*)
|
970 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
971 | |
exit ;;
|
|
1045 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1046 |
;;
|
972 | 1047 |
mips:Linux:*:* | mips64:Linux:*:*)
|
973 | |
eval "$set_cc_for_build"
|
|
1048 |
set_cc_for_build
|
|
1049 |
IS_GLIBC=0
|
|
1050 |
test x"${LIBC}" = xgnu && IS_GLIBC=1
|
974 | 1051 |
sed 's/^ //' << EOF > "$dummy.c"
|
975 | 1052 |
#undef CPU
|
976 | |
#undef ${UNAME_MACHINE}
|
977 | |
#undef ${UNAME_MACHINE}el
|
|
1053 |
#undef mips
|
|
1054 |
#undef mipsel
|
|
1055 |
#undef mips64
|
|
1056 |
#undef mips64el
|
|
1057 |
#if ${IS_GLIBC} && defined(_ABI64)
|
|
1058 |
LIBCABI=gnuabi64
|
|
1059 |
#else
|
|
1060 |
#if ${IS_GLIBC} && defined(_ABIN32)
|
|
1061 |
LIBCABI=gnuabin32
|
|
1062 |
#else
|
|
1063 |
LIBCABI=${LIBC}
|
|
1064 |
#endif
|
|
1065 |
#endif
|
|
1066 |
|
|
1067 |
#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
|
|
1068 |
CPU=mipsisa64r6
|
|
1069 |
#else
|
|
1070 |
#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
|
|
1071 |
CPU=mipsisa32r6
|
|
1072 |
#else
|
|
1073 |
#if defined(__mips64)
|
|
1074 |
CPU=mips64
|
|
1075 |
#else
|
|
1076 |
CPU=mips
|
|
1077 |
#endif
|
|
1078 |
#endif
|
|
1079 |
#endif
|
|
1080 |
|
978 | 1081 |
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
979 | |
CPU=${UNAME_MACHINE}el
|
|
1082 |
MIPS_ENDIAN=el
|
980 | 1083 |
#else
|
981 | 1084 |
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
982 | |
CPU=${UNAME_MACHINE}
|
|
1085 |
MIPS_ENDIAN=
|
983 | 1086 |
#else
|
984 | |
CPU=
|
|
1087 |
MIPS_ENDIAN=
|
985 | 1088 |
#endif
|
986 | 1089 |
#endif
|
987 | 1090 |
EOF
|
988 | |
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
|
989 | |
test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
|
|
1091 |
cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
|
|
1092 |
eval "$cc_set_vars"
|
|
1093 |
test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
|
990 | 1094 |
;;
|
991 | 1095 |
mips64el:Linux:*:*)
|
992 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
993 | |
exit ;;
|
|
1096 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1097 |
;;
|
994 | 1098 |
openrisc*:Linux:*:*)
|
995 | |
echo or1k-unknown-linux-"$LIBC"
|
996 | |
exit ;;
|
|
1099 |
GUESS=or1k-unknown-linux-$LIBC
|
|
1100 |
;;
|
997 | 1101 |
or32:Linux:*:* | or1k*:Linux:*:*)
|
998 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
999 | |
exit ;;
|
|
1102 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1103 |
;;
|
1000 | 1104 |
padre:Linux:*:*)
|
1001 | |
echo sparc-unknown-linux-"$LIBC"
|
1002 | |
exit ;;
|
|
1105 |
GUESS=sparc-unknown-linux-$LIBC
|
|
1106 |
;;
|
1003 | 1107 |
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
1004 | |
echo hppa64-unknown-linux-"$LIBC"
|
1005 | |
exit ;;
|
|
1108 |
GUESS=hppa64-unknown-linux-$LIBC
|
|
1109 |
;;
|
1006 | 1110 |
parisc:Linux:*:* | hppa:Linux:*:*)
|
1007 | 1111 |
# Look for CPU level
|
1008 | 1112 |
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
1009 | |
PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
|
1010 | |
PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
|
1011 | |
*) echo hppa-unknown-linux-"$LIBC" ;;
|
|
1113 |
PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
|
|
1114 |
PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
|
|
1115 |
*) GUESS=hppa-unknown-linux-$LIBC ;;
|
1012 | 1116 |
esac
|
1013 | |
exit ;;
|
|
1117 |
;;
|
1014 | 1118 |
ppc64:Linux:*:*)
|
1015 | |
echo powerpc64-unknown-linux-"$LIBC"
|
1016 | |
exit ;;
|
|
1119 |
GUESS=powerpc64-unknown-linux-$LIBC
|
|
1120 |
;;
|
1017 | 1121 |
ppc:Linux:*:*)
|
1018 | |
echo powerpc-unknown-linux-"$LIBC"
|
1019 | |
exit ;;
|
|
1122 |
GUESS=powerpc-unknown-linux-$LIBC
|
|
1123 |
;;
|
1020 | 1124 |
ppc64le:Linux:*:*)
|
1021 | |
echo powerpc64le-unknown-linux-"$LIBC"
|
1022 | |
exit ;;
|
|
1125 |
GUESS=powerpc64le-unknown-linux-$LIBC
|
|
1126 |
;;
|
1023 | 1127 |
ppcle:Linux:*:*)
|
1024 | |
echo powerpcle-unknown-linux-"$LIBC"
|
1025 | |
exit ;;
|
1026 | |
riscv32:Linux:*:* | riscv64:Linux:*:*)
|
1027 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
1028 | |
exit ;;
|
|
1128 |
GUESS=powerpcle-unknown-linux-$LIBC
|
|
1129 |
;;
|
|
1130 |
riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
|
|
1131 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1132 |
;;
|
1029 | 1133 |
s390:Linux:*:* | s390x:Linux:*:*)
|
1030 | |
echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
|
1031 | |
exit ;;
|
|
1134 |
GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
|
|
1135 |
;;
|
1032 | 1136 |
sh64*:Linux:*:*)
|
1033 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
1034 | |
exit ;;
|
|
1137 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1138 |
;;
|
1035 | 1139 |
sh*:Linux:*:*)
|
1036 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
1037 | |
exit ;;
|
|
1140 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1141 |
;;
|
1038 | 1142 |
sparc:Linux:*:* | sparc64:Linux:*:*)
|
1039 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
1040 | |
exit ;;
|
|
1143 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1144 |
;;
|
1041 | 1145 |
tile*:Linux:*:*)
|
1042 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
1043 | |
exit ;;
|
|
1146 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1147 |
;;
|
1044 | 1148 |
vax:Linux:*:*)
|
1045 | |
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
|
1046 | |
exit ;;
|
|
1149 |
GUESS=$UNAME_MACHINE-dec-linux-$LIBC
|
|
1150 |
;;
|
1047 | 1151 |
x86_64:Linux:*:*)
|
1048 | |
if objdump -f /bin/sh | grep -q elf32-x86-64; then
|
1049 | |
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
|
1050 | |
else
|
1051 | |
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
|
1052 | |
fi
|
1053 | |
exit ;;
|
|
1152 |
set_cc_for_build
|
|
1153 |
LIBCABI=$LIBC
|
|
1154 |
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
|
1155 |
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
|
|
1156 |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
1157 |
grep IS_X32 >/dev/null
|
|
1158 |
then
|
|
1159 |
LIBCABI=${LIBC}x32
|
|
1160 |
fi
|
|
1161 |
fi
|
|
1162 |
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
|
|
1163 |
;;
|
1054 | 1164 |
xtensa*:Linux:*:*)
|
1055 | |
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
1056 | |
exit ;;
|
|
1165 |
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1166 |
;;
|
1057 | 1167 |
i*86:DYNIX/ptx:4*:*)
|
1058 | 1168 |
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
1059 | 1169 |
# earlier versions are messed up and put the nodename in both
|
1060 | 1170 |
# sysname and nodename.
|
1061 | |
echo i386-sequent-sysv4
|
1062 | |
exit ;;
|
|
1171 |
GUESS=i386-sequent-sysv4
|
|
1172 |
;;
|
1063 | 1173 |
i*86:UNIX_SV:4.2MP:2.*)
|
1064 | 1174 |
# Unixware is an offshoot of SVR4, but it has its own version
|
1065 | 1175 |
# number series starting with 2...
|
1066 | 1176 |
# I am not positive that other SVR4 systems won't match this,
|
1067 | 1177 |
# I just have to hope. -- rms.
|
1068 | 1178 |
# Use sysv4.2uw... so that sysv4* matches it.
|
1069 | |
echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
|
1070 | |
exit ;;
|
|
1179 |
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
|
1180 |
;;
|
1071 | 1181 |
i*86:OS/2:*:*)
|
1072 | 1182 |
# If we were able to find `uname', then EMX Unix compatibility
|
1073 | 1183 |
# is probably installed.
|
1074 | |
echo "$UNAME_MACHINE"-pc-os2-emx
|
1075 | |
exit ;;
|
|
1184 |
GUESS=$UNAME_MACHINE-pc-os2-emx
|
|
1185 |
;;
|
1076 | 1186 |
i*86:XTS-300:*:STOP)
|
1077 | |
echo "$UNAME_MACHINE"-unknown-stop
|
1078 | |
exit ;;
|
|
1187 |
GUESS=$UNAME_MACHINE-unknown-stop
|
|
1188 |
;;
|
1079 | 1189 |
i*86:atheos:*:*)
|
1080 | |
echo "$UNAME_MACHINE"-unknown-atheos
|
1081 | |
exit ;;
|
|
1190 |
GUESS=$UNAME_MACHINE-unknown-atheos
|
|
1191 |
;;
|
1082 | 1192 |
i*86:syllable:*:*)
|
1083 | |
echo "$UNAME_MACHINE"-pc-syllable
|
1084 | |
exit ;;
|
|
1193 |
GUESS=$UNAME_MACHINE-pc-syllable
|
|
1194 |
;;
|
1085 | 1195 |
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
|
1086 | |
echo i386-unknown-lynxos"$UNAME_RELEASE"
|
1087 | |
exit ;;
|
|
1196 |
GUESS=i386-unknown-lynxos$UNAME_RELEASE
|
|
1197 |
;;
|
1088 | 1198 |
i*86:*DOS:*:*)
|
1089 | |
echo "$UNAME_MACHINE"-pc-msdosdjgpp
|
1090 | |
exit ;;
|
|
1199 |
GUESS=$UNAME_MACHINE-pc-msdosdjgpp
|
|
1200 |
;;
|
1091 | 1201 |
i*86:*:4.*:*)
|
1092 | 1202 |
UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
|
1093 | 1203 |
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
1094 | |
echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
|
|
1204 |
GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
|
1095 | 1205 |
else
|
1096 | |
echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
|
1097 | |
fi
|
1098 | |
exit ;;
|
|
1206 |
GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
|
|
1207 |
fi
|
|
1208 |
;;
|
1099 | 1209 |
i*86:*:5:[678]*)
|
1100 | 1210 |
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
1101 | 1211 |
case `/bin/uname -X | grep "^Machine"` in
|
|
1103 | 1213 |
*Pentium) UNAME_MACHINE=i586 ;;
|
1104 | 1214 |
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
|
1105 | 1215 |
esac
|
1106 | |
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
|
1107 | |
exit ;;
|
|
1216 |
GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
|
|
1217 |
;;
|
1108 | 1218 |
i*86:*:3.2:*)
|
1109 | 1219 |
if test -f /usr/options/cb.name; then
|
1110 | 1220 |
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
1111 | |
echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
|
|
1221 |
GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
|
1112 | 1222 |
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
1113 | 1223 |
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
|
1114 | 1224 |
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
|
|
1118 | 1228 |
&& UNAME_MACHINE=i686
|
1119 | 1229 |
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
|
1120 | 1230 |
&& UNAME_MACHINE=i686
|
1121 | |
echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
|
|
1231 |
GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
|
1122 | 1232 |
else
|
1123 | |
echo "$UNAME_MACHINE"-pc-sysv32
|
1124 | |
fi
|
1125 | |
exit ;;
|
|
1233 |
GUESS=$UNAME_MACHINE-pc-sysv32
|
|
1234 |
fi
|
|
1235 |
;;
|
1126 | 1236 |
pc:*:*:*)
|
1127 | 1237 |
# Left here for compatibility:
|
1128 | 1238 |
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
|
1130 | 1240 |
# Note: whatever this is, it MUST be the same as what config.sub
|
1131 | 1241 |
# prints for the "djgpp" host, or else GDB configure will decide that
|
1132 | 1242 |
# this is a cross-build.
|
1133 | |
echo i586-pc-msdosdjgpp
|
1134 | |
exit ;;
|
|
1243 |
GUESS=i586-pc-msdosdjgpp
|
|
1244 |
;;
|
1135 | 1245 |
Intel:Mach:3*:*)
|
1136 | |
echo i386-pc-mach3
|
1137 | |
exit ;;
|
|
1246 |
GUESS=i386-pc-mach3
|
|
1247 |
;;
|
1138 | 1248 |
paragon:*:*:*)
|
1139 | |
echo i860-intel-osf1
|
1140 | |
exit ;;
|
|
1249 |
GUESS=i860-intel-osf1
|
|
1250 |
;;
|
1141 | 1251 |
i860:*:4.*:*) # i860-SVR4
|
1142 | 1252 |
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
|
1143 | |
echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
|
|
1253 |
GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
|
1144 | 1254 |
else # Add other i860-SVR4 vendors below as they are discovered.
|
1145 | |
echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
|
1146 | |
fi
|
1147 | |
exit ;;
|
|
1255 |
GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
|
|
1256 |
fi
|
|
1257 |
;;
|
1148 | 1258 |
mini*:CTIX:SYS*5:*)
|
1149 | 1259 |
# "miniframe"
|
1150 | |
echo m68010-convergent-sysv
|
1151 | |
exit ;;
|
|
1260 |
GUESS=m68010-convergent-sysv
|
|
1261 |
;;
|
1152 | 1262 |
mc68k:UNIX:SYSTEM5:3.51m)
|
1153 | |
echo m68k-convergent-sysv
|
1154 | |
exit ;;
|
|
1263 |
GUESS=m68k-convergent-sysv
|
|
1264 |
;;
|
1155 | 1265 |
M680?0:D-NIX:5.3:*)
|
1156 | |
echo m68k-diab-dnix
|
1157 | |
exit ;;
|
|
1266 |
GUESS=m68k-diab-dnix
|
|
1267 |
;;
|
1158 | 1268 |
M68*:*:R3V[5678]*:*)
|
1159 | 1269 |
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
|
1160 | 1270 |
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
|
|
1179 | 1289 |
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
|
1180 | 1290 |
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
|
1181 | 1291 |
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
1182 | |
echo m68k-unknown-lynxos"$UNAME_RELEASE"
|
1183 | |
exit ;;
|
|
1292 |
GUESS=m68k-unknown-lynxos$UNAME_RELEASE
|
|
1293 |
;;
|
1184 | 1294 |
mc68030:UNIX_System_V:4.*:*)
|
1185 | |
echo m68k-atari-sysv4
|
1186 | |
exit ;;
|
|
1295 |
GUESS=m68k-atari-sysv4
|
|
1296 |
;;
|
1187 | 1297 |
TSUNAMI:LynxOS:2.*:*)
|
1188 | |
echo sparc-unknown-lynxos"$UNAME_RELEASE"
|
1189 | |
exit ;;
|
|
1298 |
GUESS=sparc-unknown-lynxos$UNAME_RELEASE
|
|
1299 |
;;
|
1190 | 1300 |
rs6000:LynxOS:2.*:*)
|
1191 | |
echo rs6000-unknown-lynxos"$UNAME_RELEASE"
|
1192 | |
exit ;;
|
|
1301 |
GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
|
|
1302 |
;;
|
1193 | 1303 |
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
|
1194 | |
echo powerpc-unknown-lynxos"$UNAME_RELEASE"
|
1195 | |
exit ;;
|
|
1304 |
GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
|
|
1305 |
;;
|
1196 | 1306 |
SM[BE]S:UNIX_SV:*:*)
|
1197 | |
echo mips-dde-sysv"$UNAME_RELEASE"
|
1198 | |
exit ;;
|
|
1307 |
GUESS=mips-dde-sysv$UNAME_RELEASE
|
|
1308 |
;;
|
1199 | 1309 |
RM*:ReliantUNIX-*:*:*)
|
1200 | |
echo mips-sni-sysv4
|
1201 | |
exit ;;
|
|
1310 |
GUESS=mips-sni-sysv4
|
|
1311 |
;;
|
1202 | 1312 |
RM*:SINIX-*:*:*)
|
1203 | |
echo mips-sni-sysv4
|
1204 | |
exit ;;
|
|
1313 |
GUESS=mips-sni-sysv4
|
|
1314 |
;;
|
1205 | 1315 |
*:SINIX-*:*:*)
|
1206 | 1316 |
if uname -p 2>/dev/null >/dev/null ; then
|
1207 | 1317 |
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
1208 | |
echo "$UNAME_MACHINE"-sni-sysv4
|
|
1318 |
GUESS=$UNAME_MACHINE-sni-sysv4
|
1209 | 1319 |
else
|
1210 | |
echo ns32k-sni-sysv
|
1211 | |
fi
|
1212 | |
exit ;;
|
|
1320 |
GUESS=ns32k-sni-sysv
|
|
1321 |
fi
|
|
1322 |
;;
|
1213 | 1323 |
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
1214 | 1324 |
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
1215 | |
echo i586-unisys-sysv4
|
1216 | |
exit ;;
|
|
1325 |
GUESS=i586-unisys-sysv4
|
|
1326 |
;;
|
1217 | 1327 |
*:UNIX_System_V:4*:FTX*)
|
1218 | 1328 |
# From Gerald Hewes <hewes@openmarket.com>.
|
1219 | 1329 |
# How about differentiating between stratus architectures? -djm
|
1220 | |
echo hppa1.1-stratus-sysv4
|
1221 | |
exit ;;
|
|
1330 |
GUESS=hppa1.1-stratus-sysv4
|
|
1331 |
;;
|
1222 | 1332 |
*:*:*:FTX*)
|
1223 | 1333 |
# From seanf@swdc.stratus.com.
|
1224 | |
echo i860-stratus-sysv4
|
1225 | |
exit ;;
|
|
1334 |
GUESS=i860-stratus-sysv4
|
|
1335 |
;;
|
1226 | 1336 |
i*86:VOS:*:*)
|
1227 | 1337 |
# From Paul.Green@stratus.com.
|
1228 | |
echo "$UNAME_MACHINE"-stratus-vos
|
1229 | |
exit ;;
|
|
1338 |
GUESS=$UNAME_MACHINE-stratus-vos
|
|
1339 |
;;
|
1230 | 1340 |
*:VOS:*:*)
|
1231 | 1341 |
# From Paul.Green@stratus.com.
|
1232 | |
echo hppa1.1-stratus-vos
|
1233 | |
exit ;;
|
|
1342 |
GUESS=hppa1.1-stratus-vos
|
|
1343 |
;;
|
1234 | 1344 |
mc68*:A/UX:*:*)
|
1235 | |
echo m68k-apple-aux"$UNAME_RELEASE"
|
1236 | |
exit ;;
|
|
1345 |
GUESS=m68k-apple-aux$UNAME_RELEASE
|
|
1346 |
;;
|
1237 | 1347 |
news*:NEWS-OS:6*:*)
|
1238 | |
echo mips-sony-newsos6
|
1239 | |
exit ;;
|
|
1348 |
GUESS=mips-sony-newsos6
|
|
1349 |
;;
|
1240 | 1350 |
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
1241 | |
if [ -d /usr/nec ]; then
|
1242 | |
echo mips-nec-sysv"$UNAME_RELEASE"
|
|
1351 |
if test -d /usr/nec; then
|
|
1352 |
GUESS=mips-nec-sysv$UNAME_RELEASE
|
1243 | 1353 |
else
|
1244 | |
echo mips-unknown-sysv"$UNAME_RELEASE"
|
1245 | |
fi
|
1246 | |
exit ;;
|
|
1354 |
GUESS=mips-unknown-sysv$UNAME_RELEASE
|
|
1355 |
fi
|
|
1356 |
;;
|
1247 | 1357 |
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
1248 | |
echo powerpc-be-beos
|
1249 | |
exit ;;
|
|
1358 |
GUESS=powerpc-be-beos
|
|
1359 |
;;
|
1250 | 1360 |
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
|
1251 | |
echo powerpc-apple-beos
|
1252 | |
exit ;;
|
|
1361 |
GUESS=powerpc-apple-beos
|
|
1362 |
;;
|
1253 | 1363 |
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
1254 | |
echo i586-pc-beos
|
1255 | |
exit ;;
|
|
1364 |
GUESS=i586-pc-beos
|
|
1365 |
;;
|
1256 | 1366 |
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
1257 | |
echo i586-pc-haiku
|
1258 | |
exit ;;
|
|
1367 |
GUESS=i586-pc-haiku
|
|
1368 |
;;
|
1259 | 1369 |
x86_64:Haiku:*:*)
|
1260 | |
echo x86_64-unknown-haiku
|
1261 | |
exit ;;
|
|
1370 |
GUESS=x86_64-unknown-haiku
|
|
1371 |
;;
|
1262 | 1372 |
SX-4:SUPER-UX:*:*)
|
1263 | |
echo sx4-nec-superux"$UNAME_RELEASE"
|
1264 | |
exit ;;
|
|
1373 |
GUESS=sx4-nec-superux$UNAME_RELEASE
|
|
1374 |
;;
|
1265 | 1375 |
SX-5:SUPER-UX:*:*)
|
1266 | |
echo sx5-nec-superux"$UNAME_RELEASE"
|
1267 | |
exit ;;
|
|
1376 |
GUESS=sx5-nec-superux$UNAME_RELEASE
|
|
1377 |
;;
|
1268 | 1378 |
SX-6:SUPER-UX:*:*)
|
1269 | |
echo sx6-nec-superux"$UNAME_RELEASE"
|
1270 | |
exit ;;
|
|
1379 |
GUESS=sx6-nec-superux$UNAME_RELEASE
|
|
1380 |
;;
|
1271 | 1381 |
SX-7:SUPER-UX:*:*)
|
1272 | |
echo sx7-nec-superux"$UNAME_RELEASE"
|
1273 | |
exit ;;
|
|
1382 |
GUESS=sx7-nec-superux$UNAME_RELEASE
|
|
1383 |
;;
|
1274 | 1384 |
SX-8:SUPER-UX:*:*)
|
1275 | |
echo sx8-nec-superux"$UNAME_RELEASE"
|
1276 | |
exit ;;
|
|
1385 |
GUESS=sx8-nec-superux$UNAME_RELEASE
|
|
1386 |
;;
|
1277 | 1387 |
SX-8R:SUPER-UX:*:*)
|
1278 | |
echo sx8r-nec-superux"$UNAME_RELEASE"
|
1279 | |
exit ;;
|
|
1388 |
GUESS=sx8r-nec-superux$UNAME_RELEASE
|
|
1389 |
;;
|
1280 | 1390 |
SX-ACE:SUPER-UX:*:*)
|
1281 | |
echo sxace-nec-superux"$UNAME_RELEASE"
|
1282 | |
exit ;;
|
|
1391 |
GUESS=sxace-nec-superux$UNAME_RELEASE
|
|
1392 |
;;
|
1283 | 1393 |
Power*:Rhapsody:*:*)
|
1284 | |
echo powerpc-apple-rhapsody"$UNAME_RELEASE"
|
1285 | |
exit ;;
|
|
1394 |
GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
|
|
1395 |
;;
|
1286 | 1396 |
*:Rhapsody:*:*)
|
1287 | |
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
|
1288 | |
exit ;;
|
|
1397 |
GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
|
|
1398 |
;;
|
|
1399 |
arm64:Darwin:*:*)
|
|
1400 |
GUESS=aarch64-apple-darwin$UNAME_RELEASE
|
|
1401 |
;;
|
1289 | 1402 |
*:Darwin:*:*)
|
1290 | |
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
1291 | |
eval "$set_cc_for_build"
|
1292 | |
if test "$UNAME_PROCESSOR" = unknown ; then
|
1293 | |
UNAME_PROCESSOR=powerpc
|
1294 | |
fi
|
1295 | |
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
|
1296 | |
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
1297 | |
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
1298 | |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
1299 | |
grep IS_64BIT_ARCH >/dev/null
|
1300 | |
then
|
1301 | |
case $UNAME_PROCESSOR in
|
1302 | |
i386) UNAME_PROCESSOR=x86_64 ;;
|
1303 | |
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
1304 | |
esac
|
1305 | |
fi
|
1306 | |
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
1307 | |
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
1308 | |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
1309 | |
grep IS_PPC >/dev/null
|
1310 | |
then
|
1311 | |
UNAME_PROCESSOR=powerpc
|
1312 | |
fi
|
|
1403 |
UNAME_PROCESSOR=`uname -p`
|
|
1404 |
case $UNAME_PROCESSOR in
|
|
1405 |
unknown) UNAME_PROCESSOR=powerpc ;;
|
|
1406 |
esac
|
|
1407 |
if command -v xcode-select > /dev/null 2> /dev/null && \
|
|
1408 |
! xcode-select --print-path > /dev/null 2> /dev/null ; then
|
|
1409 |
# Avoid executing cc if there is no toolchain installed as
|
|
1410 |
# cc will be a stub that puts up a graphical alert
|
|
1411 |
# prompting the user to install developer tools.
|
|
1412 |
CC_FOR_BUILD=no_compiler_found
|
|
1413 |
else
|
|
1414 |
set_cc_for_build
|
|
1415 |
fi
|
|
1416 |
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
|
1417 |
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
|
1418 |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
1419 |
grep IS_64BIT_ARCH >/dev/null
|
|
1420 |
then
|
|
1421 |
case $UNAME_PROCESSOR in
|
|
1422 |
i386) UNAME_PROCESSOR=x86_64 ;;
|
|
1423 |
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
|
1424 |
esac
|
|
1425 |
fi
|
|
1426 |
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
|
1427 |
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
|
1428 |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
1429 |
grep IS_PPC >/dev/null
|
|
1430 |
then
|
|
1431 |
UNAME_PROCESSOR=powerpc
|
1313 | 1432 |
fi
|
1314 | 1433 |
elif test "$UNAME_PROCESSOR" = i386 ; then
|
1315 | |
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
1316 | |
# that puts up a graphical alert prompting to install
|
1317 | |
# developer tools. Any system running Mac OS X 10.7 or
|
1318 | |
# later (Darwin 11 and later) is required to have a 64-bit
|
1319 | |
# processor. This is not true of the ARM version of Darwin
|
1320 | |
# that Apple uses in portable devices.
|
1321 | |
UNAME_PROCESSOR=x86_64
|
1322 | |
fi
|
1323 | |
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
|
1324 | |
exit ;;
|
|
1434 |
# uname -m returns i386 or x86_64
|
|
1435 |
UNAME_PROCESSOR=$UNAME_MACHINE
|
|
1436 |
fi
|
|
1437 |
GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
|
|
1438 |
;;
|
1325 | 1439 |
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
1326 | 1440 |
UNAME_PROCESSOR=`uname -p`
|
1327 | 1441 |
if test "$UNAME_PROCESSOR" = x86; then
|
1328 | 1442 |
UNAME_PROCESSOR=i386
|
1329 | 1443 |
UNAME_MACHINE=pc
|
1330 | 1444 |
fi
|
1331 | |
echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
|
1332 | |
exit ;;
|
|
1445 |
GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
|
|
1446 |
;;
|
1333 | 1447 |
*:QNX:*:4*)
|
1334 | |
echo i386-pc-qnx
|
1335 | |
exit ;;
|
|
1448 |
GUESS=i386-pc-qnx
|
|
1449 |
;;
|
1336 | 1450 |
NEO-*:NONSTOP_KERNEL:*:*)
|
1337 | |
echo neo-tandem-nsk"$UNAME_RELEASE"
|
1338 | |
exit ;;
|
|
1451 |
GUESS=neo-tandem-nsk$UNAME_RELEASE
|
|
1452 |
;;
|
1339 | 1453 |
NSE-*:NONSTOP_KERNEL:*:*)
|
1340 | |
echo nse-tandem-nsk"$UNAME_RELEASE"
|
1341 | |
exit ;;
|
|
1454 |
GUESS=nse-tandem-nsk$UNAME_RELEASE
|
|
1455 |
;;
|
1342 | 1456 |
NSR-*:NONSTOP_KERNEL:*:*)
|
1343 | |
echo nsr-tandem-nsk"$UNAME_RELEASE"
|
1344 | |
exit ;;
|
|
1457 |
GUESS=nsr-tandem-nsk$UNAME_RELEASE
|
|
1458 |
;;
|
1345 | 1459 |
NSV-*:NONSTOP_KERNEL:*:*)
|
1346 | |
echo nsv-tandem-nsk"$UNAME_RELEASE"
|
1347 | |
exit ;;
|
|
1460 |
GUESS=nsv-tandem-nsk$UNAME_RELEASE
|
|
1461 |
;;
|
1348 | 1462 |
NSX-*:NONSTOP_KERNEL:*:*)
|
1349 | |
echo nsx-tandem-nsk"$UNAME_RELEASE"
|
1350 | |
exit ;;
|
|
1463 |
GUESS=nsx-tandem-nsk$UNAME_RELEASE
|
|
1464 |
;;
|
1351 | 1465 |
*:NonStop-UX:*:*)
|
1352 | |
echo mips-compaq-nonstopux
|
1353 | |
exit ;;
|
|
1466 |
GUESS=mips-compaq-nonstopux
|
|
1467 |
;;
|
1354 | 1468 |
BS2000:POSIX*:*:*)
|
1355 | |
echo bs2000-siemens-sysv
|
1356 | |
exit ;;
|
|
1469 |
GUESS=bs2000-siemens-sysv
|
|
1470 |
;;
|
1357 | 1471 |
DS/*:UNIX_System_V:*:*)
|
1358 | |
echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
|
1359 | |
exit ;;
|
|
1472 |
GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
|
|
1473 |
;;
|
1360 | 1474 |
*:Plan9:*:*)
|
1361 | 1475 |
# "uname -m" is not consistent, so use $cputype instead. 386
|
1362 | 1476 |
# is converted to i386 for consistency with other x86
|
1363 | 1477 |
# operating systems.
|
1364 | |
if test "$cputype" = 386; then
|
|
1478 |
if test "${cputype-}" = 386; then
|
1365 | 1479 |
UNAME_MACHINE=i386
|
1366 | |
else
|
1367 | |
UNAME_MACHINE="$cputype"
|
1368 | |
fi
|
1369 | |
echo "$UNAME_MACHINE"-unknown-plan9
|
1370 | |
exit ;;
|
|
1480 |
elif test "x${cputype-}" != x; then
|
|
1481 |
UNAME_MACHINE=$cputype
|
|
1482 |
fi
|
|
1483 |
GUESS=$UNAME_MACHINE-unknown-plan9
|
|
1484 |
;;
|
1371 | 1485 |
*:TOPS-10:*:*)
|
1372 | |
echo pdp10-unknown-tops10
|
1373 | |
exit ;;
|
|
1486 |
GUESS=pdp10-unknown-tops10
|
|
1487 |
;;
|
1374 | 1488 |
*:TENEX:*:*)
|
1375 | |
echo pdp10-unknown-tenex
|
1376 | |
exit ;;
|
|
1489 |
GUESS=pdp10-unknown-tenex
|
|
1490 |
;;
|
1377 | 1491 |
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
|
1378 | |
echo pdp10-dec-tops20
|
1379 | |
exit ;;
|
|
1492 |
GUESS=pdp10-dec-tops20
|
|
1493 |
;;
|
1380 | 1494 |
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
|
1381 | |
echo pdp10-xkl-tops20
|
1382 | |
exit ;;
|
|
1495 |
GUESS=pdp10-xkl-tops20
|
|
1496 |
;;
|
1383 | 1497 |
*:TOPS-20:*:*)
|
1384 | |
echo pdp10-unknown-tops20
|
1385 | |
exit ;;
|
|
1498 |
GUESS=pdp10-unknown-tops20
|
|
1499 |
;;
|
1386 | 1500 |
*:ITS:*:*)
|
1387 | |
echo pdp10-unknown-its
|
1388 | |
exit ;;
|
|
1501 |
GUESS=pdp10-unknown-its
|
|
1502 |
;;
|
1389 | 1503 |
SEI:*:*:SEIUX)
|
1390 | |
echo mips-sei-seiux"$UNAME_RELEASE"
|
1391 | |
exit ;;
|
|
1504 |
GUESS=mips-sei-seiux$UNAME_RELEASE
|
|
1505 |
;;
|
1392 | 1506 |
*:DragonFly:*:*)
|
1393 | |
echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
|
1394 | |
exit ;;
|
|
1507 |
DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
1508 |
GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
|
|
1509 |
;;
|
1395 | 1510 |
*:*VMS:*:*)
|
1396 | 1511 |
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
1397 | |
case "$UNAME_MACHINE" in
|
1398 | |
A*) echo alpha-dec-vms ; exit ;;
|
1399 | |
I*) echo ia64-dec-vms ; exit ;;
|
1400 | |
V*) echo vax-dec-vms ; exit ;;
|
|
1512 |
case $UNAME_MACHINE in
|
|
1513 |
A*) GUESS=alpha-dec-vms ;;
|
|
1514 |
I*) GUESS=ia64-dec-vms ;;
|
|
1515 |
V*) GUESS=vax-dec-vms ;;
|
1401 | 1516 |
esac ;;
|
1402 | 1517 |
*:XENIX:*:SysV)
|
1403 | |
echo i386-pc-xenix
|
1404 | |
exit ;;
|
|
1518 |
GUESS=i386-pc-xenix
|
|
1519 |
;;
|
1405 | 1520 |
i*86:skyos:*:*)
|
1406 | |
echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
|
1407 | |
exit ;;
|
|
1521 |
SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
|
|
1522 |
GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
|
|
1523 |
;;
|
1408 | 1524 |
i*86:rdos:*:*)
|
1409 | |
echo "$UNAME_MACHINE"-pc-rdos
|
1410 | |
exit ;;
|
1411 | |
i*86:AROS:*:*)
|
1412 | |
echo "$UNAME_MACHINE"-pc-aros
|
1413 | |
exit ;;
|
|
1525 |
GUESS=$UNAME_MACHINE-pc-rdos
|
|
1526 |
;;
|
|
1527 |
i*86:Fiwix:*:*)
|
|
1528 |
GUESS=$UNAME_MACHINE-pc-fiwix
|
|
1529 |
;;
|
|
1530 |
*:AROS:*:*)
|
|
1531 |
GUESS=$UNAME_MACHINE-unknown-aros
|
|
1532 |
;;
|
1414 | 1533 |
x86_64:VMkernel:*:*)
|
1415 | |
echo "$UNAME_MACHINE"-unknown-esx
|
1416 | |
exit ;;
|
|
1534 |
GUESS=$UNAME_MACHINE-unknown-esx
|
|
1535 |
;;
|
1417 | 1536 |
amd64:Isilon\ OneFS:*:*)
|
1418 | |
echo x86_64-unknown-onefs
|
1419 | |
exit ;;
|
|
1537 |
GUESS=x86_64-unknown-onefs
|
|
1538 |
;;
|
|
1539 |
*:Unleashed:*:*)
|
|
1540 |
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
|
1541 |
;;
|
1420 | 1542 |
esac
|
1421 | 1543 |
|
|
1544 |
# Do we have a guess based on uname results?
|
|
1545 |
if test "x$GUESS" != x; then
|
|
1546 |
echo "$GUESS"
|
|
1547 |
exit
|
|
1548 |
fi
|
|
1549 |
|
|
1550 |
# No uname command or uname output not recognized.
|
|
1551 |
set_cc_for_build
|
|
1552 |
cat > "$dummy.c" <<EOF
|
|
1553 |
#ifdef _SEQUENT_
|
|
1554 |
#include <sys/types.h>
|
|
1555 |
#include <sys/utsname.h>
|
|
1556 |
#endif
|
|
1557 |
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
|
|
1558 |
#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
|
|
1559 |
#include <signal.h>
|
|
1560 |
#if defined(_SIZE_T_) || defined(SIGLOST)
|
|
1561 |
#include <sys/utsname.h>
|
|
1562 |
#endif
|
|
1563 |
#endif
|
|
1564 |
#endif
|
|
1565 |
main ()
|
|
1566 |
{
|
|
1567 |
#if defined (sony)
|
|
1568 |
#if defined (MIPSEB)
|
|
1569 |
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
|
1570 |
I don't know.... */
|
|
1571 |
printf ("mips-sony-bsd\n"); exit (0);
|
|
1572 |
#else
|
|
1573 |
#include <sys/param.h>
|
|
1574 |
printf ("m68k-sony-newsos%s\n",
|
|
1575 |
#ifdef NEWSOS4
|
|
1576 |
"4"
|
|
1577 |
#else
|
|
1578 |
""
|
|
1579 |
#endif
|
|
1580 |
); exit (0);
|
|
1581 |
#endif
|
|
1582 |
#endif
|
|
1583 |
|
|
1584 |
#if defined (NeXT)
|
|
1585 |
#if !defined (__ARCHITECTURE__)
|
|
1586 |
#define __ARCHITECTURE__ "m68k"
|
|
1587 |
#endif
|
|
1588 |
int version;
|
|
1589 |
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
|
1590 |
if (version < 4)
|
|
1591 |
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
|
1592 |
else
|
|
1593 |
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
|
1594 |
exit (0);
|
|
1595 |
#endif
|
|
1596 |
|
|
1597 |
#if defined (MULTIMAX) || defined (n16)
|
|
1598 |
#if defined (UMAXV)
|
|
1599 |
printf ("ns32k-encore-sysv\n"); exit (0);
|
|
1600 |
#else
|
|
1601 |
#if defined (CMU)
|
|
1602 |
printf ("ns32k-encore-mach\n"); exit (0);
|
|
1603 |
#else
|
|
1604 |
printf ("ns32k-encore-bsd\n"); exit (0);
|
|
1605 |
#endif
|
|
1606 |
#endif
|
|
1607 |
#endif
|
|
1608 |
|
|
1609 |
#if defined (__386BSD__)
|
|
1610 |
printf ("i386-pc-bsd\n"); exit (0);
|
|
1611 |
#endif
|
|
1612 |
|
|
1613 |
#if defined (sequent)
|
|
1614 |
#if defined (i386)
|
|
1615 |
printf ("i386-sequent-dynix\n"); exit (0);
|
|
1616 |
#endif
|
|
1617 |
#if defined (ns32000)
|
|
1618 |
printf ("ns32k-sequent-dynix\n"); exit (0);
|
|
1619 |
#endif
|
|
1620 |
#endif
|
|
1621 |
|
|
1622 |
#if defined (_SEQUENT_)
|
|
1623 |
struct utsname un;
|
|
1624 |
|
|
1625 |
uname(&un);
|
|
1626 |
if (strncmp(un.version, "V2", 2) == 0) {
|
|
1627 |
printf ("i386-sequent-ptx2\n"); exit (0);
|
|
1628 |
}
|
|
1629 |
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
|
1630 |
printf ("i386-sequent-ptx1\n"); exit (0);
|
|
1631 |
}
|
|
1632 |
printf ("i386-sequent-ptx\n"); exit (0);
|
|
1633 |
#endif
|
|
1634 |
|
|
1635 |
#if defined (vax)
|
|
1636 |
#if !defined (ultrix)
|
|
1637 |
#include <sys/param.h>
|
|
1638 |
#if defined (BSD)
|
|
1639 |
#if BSD == 43
|
|
1640 |
printf ("vax-dec-bsd4.3\n"); exit (0);
|
|
1641 |
#else
|
|
1642 |
#if BSD == 199006
|
|
1643 |
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
|
1644 |
#else
|
|
1645 |
printf ("vax-dec-bsd\n"); exit (0);
|
|
1646 |
#endif
|
|
1647 |
#endif
|
|
1648 |
#else
|
|
1649 |
printf ("vax-dec-bsd\n"); exit (0);
|
|
1650 |
#endif
|
|
1651 |
#else
|
|
1652 |
#if defined(_SIZE_T_) || defined(SIGLOST)
|
|
1653 |
struct utsname un;
|
|
1654 |
uname (&un);
|
|
1655 |
printf ("vax-dec-ultrix%s\n", un.release); exit (0);
|
|
1656 |
#else
|
|
1657 |
printf ("vax-dec-ultrix\n"); exit (0);
|
|
1658 |
#endif
|
|
1659 |
#endif
|
|
1660 |
#endif
|
|
1661 |
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
|
|
1662 |
#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
|
|
1663 |
#if defined(_SIZE_T_) || defined(SIGLOST)
|
|
1664 |
struct utsname *un;
|
|
1665 |
uname (&un);
|
|
1666 |
printf ("mips-dec-ultrix%s\n", un.release); exit (0);
|
|
1667 |
#else
|
|
1668 |
printf ("mips-dec-ultrix\n"); exit (0);
|
|
1669 |
#endif
|
|
1670 |
#endif
|
|
1671 |
#endif
|
|
1672 |
|
|
1673 |
#if defined (alliant) && defined (i860)
|
|
1674 |
printf ("i860-alliant-bsd\n"); exit (0);
|
|
1675 |
#endif
|
|
1676 |
|
|
1677 |
exit (1);
|
|
1678 |
}
|
|
1679 |
EOF
|
|
1680 |
|
|
1681 |
$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
|
|
1682 |
{ echo "$SYSTEM_NAME"; exit; }
|
|
1683 |
|
|
1684 |
# Apollos put the system type in the environment.
|
|
1685 |
test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
|
|
1686 |
|
1422 | 1687 |
echo "$0: unable to guess system type" >&2
|
1423 | 1688 |
|
1424 | |
case "$UNAME_MACHINE:$UNAME_SYSTEM" in
|
|
1689 |
case $UNAME_MACHINE:$UNAME_SYSTEM in
|
1425 | 1690 |
mips:Linux | mips64:Linux)
|
1426 | 1691 |
# If we got here on MIPS GNU/Linux, output extra information.
|
1427 | 1692 |
cat >&2 <<EOF
|
|
1438 | 1703 |
operating system you are using. If your script is old, overwrite *all*
|
1439 | 1704 |
copies of config.guess and config.sub with the latest versions from:
|
1440 | 1705 |
|
1441 | |
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
|
1706 |
https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
|
1442 | 1707 |
and
|
1443 | |
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
|
1708 |
https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
|
|
1709 |
EOF
|
|
1710 |
|
|
1711 |
our_year=`echo $timestamp | sed 's,-.*,,'`
|
|
1712 |
thisyear=`date +%Y`
|
|
1713 |
# shellcheck disable=SC2003
|
|
1714 |
script_age=`expr "$thisyear" - "$our_year"`
|
|
1715 |
if test "$script_age" -lt 3 ; then
|
|
1716 |
cat >&2 <<EOF
|
1444 | 1717 |
|
1445 | 1718 |
If $0 has already been updated, send the following data and any
|
1446 | 1719 |
information you think might be pertinent to config-patches@gnu.org to
|
|
1468 | 1741 |
UNAME_SYSTEM = "$UNAME_SYSTEM"
|
1469 | 1742 |
UNAME_VERSION = "$UNAME_VERSION"
|
1470 | 1743 |
EOF
|
|
1744 |
fi
|
1471 | 1745 |
|
1472 | 1746 |
exit 1
|
1473 | 1747 |
|
1474 | 1748 |
# Local variables:
|
1475 | |
# eval: (add-hook 'write-file-functions 'time-stamp)
|
|
1749 |
# eval: (add-hook 'before-save-hook 'time-stamp)
|
1476 | 1750 |
# time-stamp-start: "timestamp='"
|
1477 | 1751 |
# time-stamp-format: "%:y-%02m-%02d"
|
1478 | 1752 |
# time-stamp-end: "'"
|