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