Mercurial > dropbear
comparison config.guess @ 1813:b63f1e803f70
Update config.sub and config.guess to latest
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 31 Mar 2021 23:21:30 +0800 |
parents | b3196c46f780 |
children | 315dbcef7293 |
comparison
equal
deleted
inserted
replaced
1812:552bb9b4f16a | 1813:b63f1e803f70 |
---|---|
1 #! /bin/sh | 1 #! /bin/sh |
2 # Attempt to guess a canonical system name. | 2 # Attempt to guess a canonical system name. |
3 # Copyright 1992-2019 Free Software Foundation, Inc. | 3 # Copyright 1992-2021 Free Software Foundation, Inc. |
4 | 4 |
5 timestamp='2019-03-04' | 5 timestamp='2021-01-25' |
6 | 6 |
7 # This file is free software; you can redistribute it and/or modify it | 7 # This file is free software; you can redistribute it and/or modify it |
8 # under the terms of the GNU General Public License as published by | 8 # under the terms of the GNU General Public License as published by |
9 # the Free Software Foundation; either version 3 of the License, or | 9 # the Free Software Foundation; either version 3 of the License, or |
10 # (at your option) any later version. | 10 # (at your option) any later version. |
25 # of the GNU General Public License, version 3 ("GPLv3"). | 25 # of the GNU General Public License, version 3 ("GPLv3"). |
26 # | 26 # |
27 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. | 27 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
28 # | 28 # |
29 # You can get the latest version of this script from: | 29 # You can get the latest version of this script from: |
30 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | 30 # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
31 # | 31 # |
32 # Please send patches to <[email protected]>. | 32 # Please send patches to <[email protected]>. |
33 | 33 |
34 | 34 |
35 me=`echo "$0" | sed -e 's,.*/,,'` | 35 me=$(echo "$0" | sed -e 's,.*/,,') |
36 | 36 |
37 usage="\ | 37 usage="\ |
38 Usage: $0 [OPTION] | 38 Usage: $0 [OPTION] |
39 | 39 |
40 Output the configuration name of the system \`$me' is run on. | 40 Output the configuration name of the system \`$me' is run on. |
48 | 48 |
49 version="\ | 49 version="\ |
50 GNU config.guess ($timestamp) | 50 GNU config.guess ($timestamp) |
51 | 51 |
52 Originally written by Per Bothner. | 52 Originally written by Per Bothner. |
53 Copyright 1992-2019 Free Software Foundation, Inc. | 53 Copyright 1992-2021 Free Software Foundation, Inc. |
54 | 54 |
55 This is free software; see the source for copying conditions. There is NO | 55 This is free software; see the source for copying conditions. There is NO |
56 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | 56 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
57 | 57 |
58 help=" | 58 help=" |
97 tmp= | 97 tmp= |
98 # shellcheck disable=SC2172 | 98 # shellcheck disable=SC2172 |
99 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 | 99 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 |
100 | 100 |
101 set_cc_for_build() { | 101 set_cc_for_build() { |
102 # prevent multiple calls if $tmp is already set | |
103 test "$tmp" && return 0 | |
102 : "${TMPDIR=/tmp}" | 104 : "${TMPDIR=/tmp}" |
103 # shellcheck disable=SC2039 | 105 # shellcheck disable=SC2039 |
104 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | 106 { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || |
105 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || | 107 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || |
106 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || | 108 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || |
107 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } | 109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } |
108 dummy=$tmp/dummy | 110 dummy=$tmp/dummy |
109 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in | 111 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in |
127 # ([email protected] 1994-08-24) | 129 # ([email protected] 1994-08-24) |
128 if test -f /.attbin/uname ; then | 130 if test -f /.attbin/uname ; then |
129 PATH=$PATH:/.attbin ; export PATH | 131 PATH=$PATH:/.attbin ; export PATH |
130 fi | 132 fi |
131 | 133 |
132 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | 134 UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown |
133 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | 135 UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown |
134 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | 136 UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown |
135 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | 137 UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown |
136 | 138 |
137 case "$UNAME_SYSTEM" in | 139 case "$UNAME_SYSTEM" in |
138 Linux|GNU|GNU/*) | 140 Linux|GNU|GNU/*) |
139 # If the system lacks a compiler, then just pick glibc. | 141 LIBC=unknown |
140 # We could probably try harder. | |
141 LIBC=gnu | |
142 | 142 |
143 set_cc_for_build | 143 set_cc_for_build |
144 cat <<-EOF > "$dummy.c" | 144 cat <<-EOF > "$dummy.c" |
145 #include <features.h> | 145 #include <features.h> |
146 #if defined(__UCLIBC__) | 146 #if defined(__UCLIBC__) |
147 LIBC=uclibc | 147 LIBC=uclibc |
148 #elif defined(__dietlibc__) | 148 #elif defined(__dietlibc__) |
149 LIBC=dietlibc | 149 LIBC=dietlibc |
150 #elif defined(__GLIBC__) | |
151 LIBC=gnu | |
150 #else | 152 #else |
151 LIBC=gnu | 153 #include <stdarg.h> |
154 /* First heuristic to detect musl libc. */ | |
155 #ifdef __DEFINED_va_list | |
156 LIBC=musl | |
157 #endif | |
152 #endif | 158 #endif |
153 EOF | 159 EOF |
154 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" | 160 eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" |
155 | 161 |
156 # If ldd exists, use it to detect musl libc. | 162 # Second heuristic to detect musl libc. |
157 if command -v ldd >/dev/null && \ | 163 if [ "$LIBC" = unknown ] && |
158 ldd --version 2>&1 | grep -q ^musl | 164 command -v ldd >/dev/null && |
159 then | 165 ldd --version 2>&1 | grep -q ^musl; then |
160 LIBC=musl | 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 | |
161 fi | 173 fi |
162 ;; | 174 ;; |
163 esac | 175 esac |
164 | 176 |
165 # Note: order is significant - the case branches are not exclusive. | 177 # Note: order is significant - the case branches are not exclusive. |
174 # compatibility and a consistent mechanism for selecting the | 186 # compatibility and a consistent mechanism for selecting the |
175 # object file format. | 187 # object file format. |
176 # | 188 # |
177 # Note: NetBSD doesn't particularly care about the vendor | 189 # Note: NetBSD doesn't particularly care about the vendor |
178 # portion of the name. We always set it to "unknown". | 190 # portion of the name. We always set it to "unknown". |
179 sysctl="sysctl -n hw.machine_arch" | 191 UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ |
180 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ | 192 /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
181 "/sbin/$sysctl" 2>/dev/null || \ | 193 /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
182 "/usr/sbin/$sysctl" 2>/dev/null || \ | 194 echo unknown)) |
183 echo unknown)` | |
184 case "$UNAME_MACHINE_ARCH" in | 195 case "$UNAME_MACHINE_ARCH" in |
196 aarch64eb) machine=aarch64_be-unknown ;; | |
185 armeb) machine=armeb-unknown ;; | 197 armeb) machine=armeb-unknown ;; |
186 arm*) machine=arm-unknown ;; | 198 arm*) machine=arm-unknown ;; |
187 sh3el) machine=shl-unknown ;; | 199 sh3el) machine=shl-unknown ;; |
188 sh3eb) machine=sh-unknown ;; | 200 sh3eb) machine=sh-unknown ;; |
189 sh5el) machine=sh5le-unknown ;; | 201 sh5el) machine=sh5le-unknown ;; |
190 earmv*) | 202 earmv*) |
191 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` | 203 arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') |
192 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` | 204 endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') |
193 machine="${arch}${endian}"-unknown | 205 machine="${arch}${endian}"-unknown |
194 ;; | 206 ;; |
195 *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | 207 *) machine="$UNAME_MACHINE_ARCH"-unknown ;; |
196 esac | 208 esac |
197 # The Operating System including object format, if it has switched | 209 # The Operating System including object format, if it has switched |
218 esac | 230 esac |
219 # Determine ABI tags. | 231 # Determine ABI tags. |
220 case "$UNAME_MACHINE_ARCH" in | 232 case "$UNAME_MACHINE_ARCH" in |
221 earm*) | 233 earm*) |
222 expr='s/^earmv[0-9]/-eabi/;s/eb$//' | 234 expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
223 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` | 235 abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") |
224 ;; | 236 ;; |
225 esac | 237 esac |
226 # The OS release | 238 # The OS release |
227 # Debian GNU/NetBSD machines have a different userland, and | 239 # Debian GNU/NetBSD machines have a different userland, and |
228 # thus, need a distinct triplet. However, they do not need | 240 # thus, need a distinct triplet. However, they do not need |
231 case "$UNAME_VERSION" in | 243 case "$UNAME_VERSION" in |
232 Debian*) | 244 Debian*) |
233 release='-gnu' | 245 release='-gnu' |
234 ;; | 246 ;; |
235 *) | 247 *) |
236 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` | 248 release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) |
237 ;; | 249 ;; |
238 esac | 250 esac |
239 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | 251 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
240 # contains redundant information, the shorter form: | 252 # contains redundant information, the shorter form: |
241 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | 253 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
242 echo "$machine-${os}${release}${abi-}" | 254 echo "$machine-${os}${release}${abi-}" |
243 exit ;; | 255 exit ;; |
244 *:Bitrig:*:*) | 256 *:Bitrig:*:*) |
245 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` | 257 UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') |
246 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | 258 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" |
247 exit ;; | 259 exit ;; |
248 *:OpenBSD:*:*) | 260 *:OpenBSD:*:*) |
249 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` | 261 UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') |
250 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | 262 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" |
251 exit ;; | 263 exit ;; |
252 *:LibertyBSD:*:*) | 264 *:LibertyBSD:*:*) |
253 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` | 265 UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') |
254 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | 266 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" |
255 exit ;; | 267 exit ;; |
256 *:MidnightBSD:*:*) | 268 *:MidnightBSD:*:*) |
257 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | 269 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" |
258 exit ;; | 270 exit ;; |
260 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | 272 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" |
261 exit ;; | 273 exit ;; |
262 *:SolidBSD:*:*) | 274 *:SolidBSD:*:*) |
263 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | 275 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" |
264 exit ;; | 276 exit ;; |
277 *:OS108:*:*) | |
278 echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" | |
279 exit ;; | |
265 macppc:MirBSD:*:*) | 280 macppc:MirBSD:*:*) |
266 echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | 281 echo powerpc-unknown-mirbsd"$UNAME_RELEASE" |
267 exit ;; | 282 exit ;; |
268 *:MirBSD:*:*) | 283 *:MirBSD:*:*) |
269 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | 284 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" |
270 exit ;; | 285 exit ;; |
271 *:Sortix:*:*) | 286 *:Sortix:*:*) |
272 echo "$UNAME_MACHINE"-unknown-sortix | 287 echo "$UNAME_MACHINE"-unknown-sortix |
273 exit ;; | 288 exit ;; |
289 *:Twizzler:*:*) | |
290 echo "$UNAME_MACHINE"-unknown-twizzler | |
291 exit ;; | |
274 *:Redox:*:*) | 292 *:Redox:*:*) |
275 echo "$UNAME_MACHINE"-unknown-redox | 293 echo "$UNAME_MACHINE"-unknown-redox |
276 exit ;; | 294 exit ;; |
277 mips:OSF1:*.*) | 295 mips:OSF1:*.*) |
278 echo mips-dec-osf1 | 296 echo mips-dec-osf1 |
279 exit ;; | 297 exit ;; |
280 alpha:OSF1:*:*) | 298 alpha:OSF1:*:*) |
281 case $UNAME_RELEASE in | 299 case $UNAME_RELEASE in |
282 *4.0) | 300 *4.0) |
283 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | 301 UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') |
284 ;; | 302 ;; |
285 *5.*) | 303 *5.*) |
286 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | 304 UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') |
287 ;; | 305 ;; |
288 esac | 306 esac |
289 # According to Compaq, /usr/sbin/psrinfo has been available on | 307 # According to Compaq, /usr/sbin/psrinfo has been available on |
290 # OSF/1 and Tru64 systems produced since 1995. I hope that | 308 # OSF/1 and Tru64 systems produced since 1995. I hope that |
291 # covers most systems running today. This code pipes the CPU | 309 # covers most systems running today. This code pipes the CPU |
292 # types through head -n 1, so we only detect the type of CPU 0. | 310 # types through head -n 1, so we only detect the type of CPU 0. |
293 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | 311 ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) |
294 case "$ALPHA_CPU_TYPE" in | 312 case "$ALPHA_CPU_TYPE" in |
295 "EV4 (21064)") | 313 "EV4 (21064)") |
296 UNAME_MACHINE=alpha ;; | 314 UNAME_MACHINE=alpha ;; |
297 "EV4.5 (21064)") | 315 "EV4.5 (21064)") |
298 UNAME_MACHINE=alpha ;; | 316 UNAME_MACHINE=alpha ;; |
326 # A Pn.n version is a patched version. | 344 # A Pn.n version is a patched version. |
327 # A Vn.n version is a released version. | 345 # A Vn.n version is a released version. |
328 # A Tn.n version is a released field test version. | 346 # A Tn.n version is a released field test version. |
329 # A Xn.n version is an unreleased experimental baselevel. | 347 # A Xn.n version is an unreleased experimental baselevel. |
330 # 1.2 uses "1.2" for uname -r. | 348 # 1.2 uses "1.2" for uname -r. |
331 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" | 349 echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" |
332 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | 350 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
333 exitcode=$? | 351 exitcode=$? |
334 trap '' 0 | 352 trap '' 0 |
335 exit $exitcode ;; | 353 exit $exitcode ;; |
336 Amiga*:UNIX_System_V:4.0:*) | 354 Amiga*:UNIX_System_V:4.0:*) |
360 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | 378 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
361 echo hppa1.1-hitachi-hiuxmpp | 379 echo hppa1.1-hitachi-hiuxmpp |
362 exit ;; | 380 exit ;; |
363 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | 381 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
364 # [email protected] (Earle F. Ake) contributed MIS and NILE. | 382 # [email protected] (Earle F. Ake) contributed MIS and NILE. |
365 if test "`(/bin/universe) 2>/dev/null`" = att ; then | 383 if test "$( (/bin/universe) 2>/dev/null)" = att ; then |
366 echo pyramid-pyramid-sysv3 | 384 echo pyramid-pyramid-sysv3 |
367 else | 385 else |
368 echo pyramid-pyramid-bsd | 386 echo pyramid-pyramid-bsd |
369 fi | 387 fi |
370 exit ;; | 388 exit ;; |
373 exit ;; | 391 exit ;; |
374 DRS?6000:unix:4.0:6*) | 392 DRS?6000:unix:4.0:6*) |
375 echo sparc-icl-nx6 | 393 echo sparc-icl-nx6 |
376 exit ;; | 394 exit ;; |
377 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | 395 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
378 case `/usr/bin/uname -p` in | 396 case $(/usr/bin/uname -p) in |
379 sparc) echo sparc-icl-nx7; exit ;; | 397 sparc) echo sparc-icl-nx7; exit ;; |
380 esac ;; | 398 esac ;; |
381 s390x:SunOS:*:*) | 399 s390x:SunOS:*:*) |
382 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | 400 echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" |
383 exit ;; | 401 exit ;; |
384 sun4H:SunOS:5.*:*) | 402 sun4H:SunOS:5.*:*) |
385 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | 403 echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" |
386 exit ;; | 404 exit ;; |
387 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | 405 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
388 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | 406 echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" |
389 exit ;; | 407 exit ;; |
390 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | 408 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
391 echo i386-pc-auroraux"$UNAME_RELEASE" | 409 echo i386-pc-auroraux"$UNAME_RELEASE" |
392 exit ;; | 410 exit ;; |
393 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | 411 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
394 set_cc_for_build | 412 set_cc_for_build |
395 SUN_ARCH=i386 | 413 SUN_ARCH=i386 |
396 # If there is a compiler, see if it is configured for 64-bit objects. | 414 # If there is a compiler, see if it is configured for 64-bit objects. |
397 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | 415 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
398 # This test works for both compilers. | 416 # This test works for both compilers. |
399 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | 417 if test "$CC_FOR_BUILD" != no_compiler_found; then |
400 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | 418 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
401 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | 419 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
402 grep IS_64BIT_ARCH >/dev/null | 420 grep IS_64BIT_ARCH >/dev/null |
403 then | 421 then |
404 SUN_ARCH=x86_64 | 422 SUN_ARCH=x86_64 |
405 fi | 423 fi |
406 fi | 424 fi |
407 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | 425 echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" |
408 exit ;; | 426 exit ;; |
409 sun4*:SunOS:6*:*) | 427 sun4*:SunOS:6*:*) |
410 # According to config.sub, this is the proper way to canonicalize | 428 # According to config.sub, this is the proper way to canonicalize |
411 # SunOS6. Hard to guess exactly what SunOS6 will be like, but | 429 # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
412 # it's likely to be more like Solaris than SunOS4. | 430 # it's likely to be more like Solaris than SunOS4. |
413 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | 431 echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" |
414 exit ;; | 432 exit ;; |
415 sun4*:SunOS:*:*) | 433 sun4*:SunOS:*:*) |
416 case "`/usr/bin/arch -k`" in | 434 case "$(/usr/bin/arch -k)" in |
417 Series*|S4*) | 435 Series*|S4*) |
418 UNAME_RELEASE=`uname -v` | 436 UNAME_RELEASE=$(uname -v) |
419 ;; | 437 ;; |
420 esac | 438 esac |
421 # Japanese Language versions have a version number like `4.1.3-JL'. | 439 # Japanese Language versions have a version number like `4.1.3-JL'. |
422 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" | 440 echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" |
423 exit ;; | 441 exit ;; |
424 sun3*:SunOS:*:*) | 442 sun3*:SunOS:*:*) |
425 echo m68k-sun-sunos"$UNAME_RELEASE" | 443 echo m68k-sun-sunos"$UNAME_RELEASE" |
426 exit ;; | 444 exit ;; |
427 sun*:*:4.2BSD:*) | 445 sun*:*:4.2BSD:*) |
428 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | 446 UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) |
429 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 | 447 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
430 case "`/bin/arch`" in | 448 case "$(/bin/arch)" in |
431 sun3) | 449 sun3) |
432 echo m68k-sun-sunos"$UNAME_RELEASE" | 450 echo m68k-sun-sunos"$UNAME_RELEASE" |
433 ;; | 451 ;; |
434 sun4) | 452 sun4) |
435 echo sparc-sun-sunos"$UNAME_RELEASE" | 453 echo sparc-sun-sunos"$UNAME_RELEASE" |
505 #endif | 523 #endif |
506 exit (-1); | 524 exit (-1); |
507 } | 525 } |
508 EOF | 526 EOF |
509 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && | 527 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && |
510 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && | 528 dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && |
511 SYSTEM_NAME=`"$dummy" "$dummyarg"` && | 529 SYSTEM_NAME=$("$dummy" "$dummyarg") && |
512 { echo "$SYSTEM_NAME"; exit; } | 530 { echo "$SYSTEM_NAME"; exit; } |
513 echo mips-mips-riscos"$UNAME_RELEASE" | 531 echo mips-mips-riscos"$UNAME_RELEASE" |
514 exit ;; | 532 exit ;; |
515 Motorola:PowerMAX_OS:*:*) | 533 Motorola:PowerMAX_OS:*:*) |
516 echo powerpc-motorola-powermax | 534 echo powerpc-motorola-powermax |
533 m88k:*:3*:R3*) | 551 m88k:*:3*:R3*) |
534 echo m88k-motorola-sysv3 | 552 echo m88k-motorola-sysv3 |
535 exit ;; | 553 exit ;; |
536 AViiON:dgux:*:*) | 554 AViiON:dgux:*:*) |
537 # DG/UX returns AViiON for all architectures | 555 # DG/UX returns AViiON for all architectures |
538 UNAME_PROCESSOR=`/usr/bin/uname -p` | 556 UNAME_PROCESSOR=$(/usr/bin/uname -p) |
539 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] | 557 if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 |
540 then | 558 then |
541 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ | 559 if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ |
542 [ "$TARGET_BINARY_INTERFACE"x = x ] | 560 test "$TARGET_BINARY_INTERFACE"x = x |
543 then | 561 then |
544 echo m88k-dg-dgux"$UNAME_RELEASE" | 562 echo m88k-dg-dgux"$UNAME_RELEASE" |
545 else | 563 else |
546 echo m88k-dg-dguxbcs"$UNAME_RELEASE" | 564 echo m88k-dg-dguxbcs"$UNAME_RELEASE" |
547 fi | 565 fi |
561 exit ;; | 579 exit ;; |
562 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | 580 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
563 echo m68k-tektronix-bsd | 581 echo m68k-tektronix-bsd |
564 exit ;; | 582 exit ;; |
565 *:IRIX*:*:*) | 583 *:IRIX*:*:*) |
566 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" | 584 echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" |
567 exit ;; | 585 exit ;; |
568 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | 586 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
569 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | 587 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
570 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | 588 exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' |
571 i*86:AIX:*:*) | 589 i*86:AIX:*:*) |
572 echo i386-ibm-aix | 590 echo i386-ibm-aix |
573 exit ;; | 591 exit ;; |
574 ia64:AIX:*:*) | 592 ia64:AIX:*:*) |
575 if [ -x /usr/bin/oslevel ] ; then | 593 if test -x /usr/bin/oslevel ; then |
576 IBM_REV=`/usr/bin/oslevel` | 594 IBM_REV=$(/usr/bin/oslevel) |
577 else | 595 else |
578 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | 596 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" |
579 fi | 597 fi |
580 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | 598 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" |
581 exit ;; | 599 exit ;; |
591 exit(1); | 609 exit(1); |
592 puts("powerpc-ibm-aix3.2.5"); | 610 puts("powerpc-ibm-aix3.2.5"); |
593 exit(0); | 611 exit(0); |
594 } | 612 } |
595 EOF | 613 EOF |
596 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` | 614 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") |
597 then | 615 then |
598 echo "$SYSTEM_NAME" | 616 echo "$SYSTEM_NAME" |
599 else | 617 else |
600 echo rs6000-ibm-aix3.2.5 | 618 echo rs6000-ibm-aix3.2.5 |
601 fi | 619 fi |
604 else | 622 else |
605 echo rs6000-ibm-aix3.2 | 623 echo rs6000-ibm-aix3.2 |
606 fi | 624 fi |
607 exit ;; | 625 exit ;; |
608 *:AIX:*:[4567]) | 626 *:AIX:*:[4567]) |
609 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` | 627 IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') |
610 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then | 628 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
611 IBM_ARCH=rs6000 | 629 IBM_ARCH=rs6000 |
612 else | 630 else |
613 IBM_ARCH=powerpc | 631 IBM_ARCH=powerpc |
614 fi | 632 fi |
615 if [ -x /usr/bin/lslpp ] ; then | 633 if test -x /usr/bin/lslpp ; then |
616 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | | 634 IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | |
617 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` | 635 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) |
618 else | 636 else |
619 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | 637 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" |
620 fi | 638 fi |
621 echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | 639 echo "$IBM_ARCH"-ibm-aix"$IBM_REV" |
622 exit ;; | 640 exit ;; |
640 exit ;; | 658 exit ;; |
641 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | 659 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
642 echo m68k-hp-bsd4.4 | 660 echo m68k-hp-bsd4.4 |
643 exit ;; | 661 exit ;; |
644 9000/[34678]??:HP-UX:*:*) | 662 9000/[34678]??:HP-UX:*:*) |
645 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | 663 HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') |
646 case "$UNAME_MACHINE" in | 664 case "$UNAME_MACHINE" in |
647 9000/31?) HP_ARCH=m68000 ;; | 665 9000/31?) HP_ARCH=m68000 ;; |
648 9000/[34]??) HP_ARCH=m68k ;; | 666 9000/[34]??) HP_ARCH=m68k ;; |
649 9000/[678][0-9][0-9]) | 667 9000/[678][0-9][0-9]) |
650 if [ -x /usr/bin/getconf ]; then | 668 if test -x /usr/bin/getconf; then |
651 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | 669 sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) |
652 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | 670 sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) |
653 case "$sc_cpu_version" in | 671 case "$sc_cpu_version" in |
654 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 | 672 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
655 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 | 673 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
656 532) # CPU_PA_RISC2_0 | 674 532) # CPU_PA_RISC2_0 |
657 case "$sc_kernel_bits" in | 675 case "$sc_kernel_bits" in |
659 64) HP_ARCH=hppa2.0w ;; | 677 64) HP_ARCH=hppa2.0w ;; |
660 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 | 678 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
661 esac ;; | 679 esac ;; |
662 esac | 680 esac |
663 fi | 681 fi |
664 if [ "$HP_ARCH" = "" ]; then | 682 if test "$HP_ARCH" = ""; then |
665 set_cc_for_build | 683 set_cc_for_build |
666 sed 's/^ //' << EOF > "$dummy.c" | 684 sed 's/^ //' << EOF > "$dummy.c" |
667 | 685 |
668 #define _HPUX_SOURCE | 686 #define _HPUX_SOURCE |
669 #include <stdlib.h> | 687 #include <stdlib.h> |
694 default: puts ("hppa1.0"); break; | 712 default: puts ("hppa1.0"); break; |
695 } | 713 } |
696 exit (0); | 714 exit (0); |
697 } | 715 } |
698 EOF | 716 EOF |
699 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` | 717 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") |
700 test -z "$HP_ARCH" && HP_ARCH=hppa | 718 test -z "$HP_ARCH" && HP_ARCH=hppa |
701 fi ;; | 719 fi ;; |
702 esac | 720 esac |
703 if [ "$HP_ARCH" = hppa2.0w ] | 721 if test "$HP_ARCH" = hppa2.0w |
704 then | 722 then |
705 set_cc_for_build | 723 set_cc_for_build |
706 | 724 |
707 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating | 725 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
708 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler | 726 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
722 fi | 740 fi |
723 fi | 741 fi |
724 echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | 742 echo "$HP_ARCH"-hp-hpux"$HPUX_REV" |
725 exit ;; | 743 exit ;; |
726 ia64:HP-UX:*:*) | 744 ia64:HP-UX:*:*) |
727 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | 745 HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') |
728 echo ia64-hp-hpux"$HPUX_REV" | 746 echo ia64-hp-hpux"$HPUX_REV" |
729 exit ;; | 747 exit ;; |
730 3050*:HI-UX:*:*) | 748 3050*:HI-UX:*:*) |
731 set_cc_for_build | 749 set_cc_for_build |
732 sed 's/^ //' << EOF > "$dummy.c" | 750 sed 's/^ //' << EOF > "$dummy.c" |
752 puts ("m68k-hitachi-hiuxwe2"); | 770 puts ("m68k-hitachi-hiuxwe2"); |
753 else puts ("unknown-hitachi-hiuxwe2"); | 771 else puts ("unknown-hitachi-hiuxwe2"); |
754 exit (0); | 772 exit (0); |
755 } | 773 } |
756 EOF | 774 EOF |
757 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && | 775 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && |
758 { echo "$SYSTEM_NAME"; exit; } | 776 { echo "$SYSTEM_NAME"; exit; } |
759 echo unknown-hitachi-hiuxwe2 | 777 echo unknown-hitachi-hiuxwe2 |
760 exit ;; | 778 exit ;; |
761 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) | 779 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
762 echo hppa1.1-hp-bsd | 780 echo hppa1.1-hp-bsd |
772 exit ;; | 790 exit ;; |
773 hp8??:OSF1:*:*) | 791 hp8??:OSF1:*:*) |
774 echo hppa1.0-hp-osf | 792 echo hppa1.0-hp-osf |
775 exit ;; | 793 exit ;; |
776 i*86:OSF1:*:*) | 794 i*86:OSF1:*:*) |
777 if [ -x /usr/sbin/sysversion ] ; then | 795 if test -x /usr/sbin/sysversion ; then |
778 echo "$UNAME_MACHINE"-unknown-osf1mk | 796 echo "$UNAME_MACHINE"-unknown-osf1mk |
779 else | 797 else |
780 echo "$UNAME_MACHINE"-unknown-osf1 | 798 echo "$UNAME_MACHINE"-unknown-osf1 |
781 fi | 799 fi |
782 exit ;; | 800 exit ;; |
821 exit ;; | 839 exit ;; |
822 *:UNICOS/mp:*:*) | 840 *:UNICOS/mp:*:*) |
823 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | 841 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
824 exit ;; | 842 exit ;; |
825 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | 843 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
826 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` | 844 FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) |
827 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` | 845 FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') |
828 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` | 846 FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') |
829 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 847 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
830 exit ;; | 848 exit ;; |
831 5000:UNIX_System_V:4.*:*) | 849 5000:UNIX_System_V:4.*:*) |
832 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` | 850 FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') |
833 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` | 851 FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') |
834 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 852 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
835 exit ;; | 853 exit ;; |
836 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | 854 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
837 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | 855 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" |
838 exit ;; | 856 exit ;; |
841 exit ;; | 859 exit ;; |
842 *:BSD/OS:*:*) | 860 *:BSD/OS:*:*) |
843 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | 861 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" |
844 exit ;; | 862 exit ;; |
845 arm:FreeBSD:*:*) | 863 arm:FreeBSD:*:*) |
846 UNAME_PROCESSOR=`uname -p` | 864 UNAME_PROCESSOR=$(uname -p) |
847 set_cc_for_build | 865 set_cc_for_build |
848 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | 866 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
849 | grep -q __ARM_PCS_VFP | 867 | grep -q __ARM_PCS_VFP |
850 then | 868 then |
851 echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi | 869 echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi |
852 else | 870 else |
853 echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf | 871 echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf |
854 fi | 872 fi |
855 exit ;; | 873 exit ;; |
856 *:FreeBSD:*:*) | 874 *:FreeBSD:*:*) |
857 UNAME_PROCESSOR=`/usr/bin/uname -p` | 875 UNAME_PROCESSOR=$(/usr/bin/uname -p) |
858 case "$UNAME_PROCESSOR" in | 876 case "$UNAME_PROCESSOR" in |
859 amd64) | 877 amd64) |
860 UNAME_PROCESSOR=x86_64 ;; | 878 UNAME_PROCESSOR=x86_64 ;; |
861 i386) | 879 i386) |
862 UNAME_PROCESSOR=i586 ;; | 880 UNAME_PROCESSOR=i586 ;; |
863 esac | 881 esac |
864 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | 882 echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" |
865 exit ;; | 883 exit ;; |
866 i*:CYGWIN*:*) | 884 i*:CYGWIN*:*) |
867 echo "$UNAME_MACHINE"-pc-cygwin | 885 echo "$UNAME_MACHINE"-pc-cygwin |
868 exit ;; | 886 exit ;; |
869 *:MINGW64*:*) | 887 *:MINGW64*:*) |
895 exit ;; | 913 exit ;; |
896 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) | 914 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
897 echo x86_64-pc-cygwin | 915 echo x86_64-pc-cygwin |
898 exit ;; | 916 exit ;; |
899 prep*:SunOS:5.*:*) | 917 prep*:SunOS:5.*:*) |
900 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | 918 echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" |
901 exit ;; | 919 exit ;; |
902 *:GNU:*:*) | 920 *:GNU:*:*) |
903 # the GNU system | 921 # the GNU system |
904 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" | 922 echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" |
905 exit ;; | 923 exit ;; |
906 *:GNU/*:*:*) | 924 *:GNU/*:*:*) |
907 # other systems with GNU libc and userland | 925 # other systems with GNU libc and userland |
908 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" | 926 echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" |
909 exit ;; | 927 exit ;; |
910 *:Minix:*:*) | 928 *:Minix:*:*) |
911 echo "$UNAME_MACHINE"-unknown-minix | 929 echo "$UNAME_MACHINE"-unknown-minix |
912 exit ;; | 930 exit ;; |
913 aarch64:Linux:*:*) | 931 aarch64:Linux:*:*) |
916 aarch64_be:Linux:*:*) | 934 aarch64_be:Linux:*:*) |
917 UNAME_MACHINE=aarch64_be | 935 UNAME_MACHINE=aarch64_be |
918 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 936 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
919 exit ;; | 937 exit ;; |
920 alpha:Linux:*:*) | 938 alpha:Linux:*:*) |
921 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | 939 case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in |
922 EV5) UNAME_MACHINE=alphaev5 ;; | 940 EV5) UNAME_MACHINE=alphaev5 ;; |
923 EV56) UNAME_MACHINE=alphaev56 ;; | 941 EV56) UNAME_MACHINE=alphaev56 ;; |
924 PCA56) UNAME_MACHINE=alphapca56 ;; | 942 PCA56) UNAME_MACHINE=alphapca56 ;; |
925 PCA57) UNAME_MACHINE=alphapca56 ;; | 943 PCA57) UNAME_MACHINE=alphapca56 ;; |
926 EV6) UNAME_MACHINE=alphaev6 ;; | 944 EV6) UNAME_MACHINE=alphaev6 ;; |
973 exit ;; | 991 exit ;; |
974 ia64:Linux:*:*) | 992 ia64:Linux:*:*) |
975 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 993 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
976 exit ;; | 994 exit ;; |
977 k1om:Linux:*:*) | 995 k1om:Linux:*:*) |
996 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
997 exit ;; | |
998 loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) | |
978 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 999 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
979 exit ;; | 1000 exit ;; |
980 m32r*:Linux:*:*) | 1001 m32r*:Linux:*:*) |
981 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1002 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
982 exit ;; | 1003 exit ;; |
1025 #else | 1046 #else |
1026 MIPS_ENDIAN= | 1047 MIPS_ENDIAN= |
1027 #endif | 1048 #endif |
1028 #endif | 1049 #endif |
1029 EOF | 1050 EOF |
1030 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" | 1051 eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" |
1031 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } | 1052 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } |
1032 ;; | 1053 ;; |
1033 mips64el:Linux:*:*) | 1054 mips64el:Linux:*:*) |
1034 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1035 exit ;; | 1056 exit ;; |
1045 parisc64:Linux:*:* | hppa64:Linux:*:*) | 1066 parisc64:Linux:*:* | hppa64:Linux:*:*) |
1046 echo hppa64-unknown-linux-"$LIBC" | 1067 echo hppa64-unknown-linux-"$LIBC" |
1047 exit ;; | 1068 exit ;; |
1048 parisc:Linux:*:* | hppa:Linux:*:*) | 1069 parisc:Linux:*:* | hppa:Linux:*:*) |
1049 # Look for CPU level | 1070 # Look for CPU level |
1050 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | 1071 case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in |
1051 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; | 1072 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; |
1052 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; | 1073 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; |
1053 *) echo hppa-unknown-linux-"$LIBC" ;; | 1074 *) echo hppa-unknown-linux-"$LIBC" ;; |
1054 esac | 1075 esac |
1055 exit ;; | 1076 exit ;; |
1063 echo powerpc64le-unknown-linux-"$LIBC" | 1084 echo powerpc64le-unknown-linux-"$LIBC" |
1064 exit ;; | 1085 exit ;; |
1065 ppcle:Linux:*:*) | 1086 ppcle:Linux:*:*) |
1066 echo powerpcle-unknown-linux-"$LIBC" | 1087 echo powerpcle-unknown-linux-"$LIBC" |
1067 exit ;; | 1088 exit ;; |
1068 riscv32:Linux:*:* | riscv64:Linux:*:*) | 1089 riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) |
1069 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1090 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1070 exit ;; | 1091 exit ;; |
1071 s390:Linux:*:* | s390x:Linux:*:*) | 1092 s390:Linux:*:* | s390x:Linux:*:*) |
1072 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | 1093 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" |
1073 exit ;; | 1094 exit ;; |
1085 exit ;; | 1106 exit ;; |
1086 vax:Linux:*:*) | 1107 vax:Linux:*:*) |
1087 echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | 1108 echo "$UNAME_MACHINE"-dec-linux-"$LIBC" |
1088 exit ;; | 1109 exit ;; |
1089 x86_64:Linux:*:*) | 1110 x86_64:Linux:*:*) |
1090 echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | 1111 set_cc_for_build |
1112 LIBCABI=$LIBC | |
1113 if test "$CC_FOR_BUILD" != no_compiler_found; then | |
1114 if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ | |
1115 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1116 grep IS_X32 >/dev/null | |
1117 then | |
1118 LIBCABI="$LIBC"x32 | |
1119 fi | |
1120 fi | |
1121 echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" | |
1091 exit ;; | 1122 exit ;; |
1092 xtensa*:Linux:*:*) | 1123 xtensa*:Linux:*:*) |
1093 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | 1124 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1094 exit ;; | 1125 exit ;; |
1095 i*86:DYNIX/ptx:4*:*) | 1126 i*86:DYNIX/ptx:4*:*) |
1125 exit ;; | 1156 exit ;; |
1126 i*86:*DOS:*:*) | 1157 i*86:*DOS:*:*) |
1127 echo "$UNAME_MACHINE"-pc-msdosdjgpp | 1158 echo "$UNAME_MACHINE"-pc-msdosdjgpp |
1128 exit ;; | 1159 exit ;; |
1129 i*86:*:4.*:*) | 1160 i*86:*:4.*:*) |
1130 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` | 1161 UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') |
1131 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | 1162 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1132 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | 1163 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" |
1133 else | 1164 else |
1134 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | 1165 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" |
1135 fi | 1166 fi |
1136 exit ;; | 1167 exit ;; |
1137 i*86:*:5:[678]*) | 1168 i*86:*:5:[678]*) |
1138 # UnixWare 7.x, OpenUNIX and OpenServer 6. | 1169 # UnixWare 7.x, OpenUNIX and OpenServer 6. |
1139 case `/bin/uname -X | grep "^Machine"` in | 1170 case $(/bin/uname -X | grep "^Machine") in |
1140 *486*) UNAME_MACHINE=i486 ;; | 1171 *486*) UNAME_MACHINE=i486 ;; |
1141 *Pentium) UNAME_MACHINE=i586 ;; | 1172 *Pentium) UNAME_MACHINE=i586 ;; |
1142 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | 1173 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1143 esac | 1174 esac |
1144 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" | 1175 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" |
1145 exit ;; | 1176 exit ;; |
1146 i*86:*:3.2:*) | 1177 i*86:*:3.2:*) |
1147 if test -f /usr/options/cb.name; then | 1178 if test -f /usr/options/cb.name; then |
1148 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | 1179 UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name) |
1149 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | 1180 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" |
1150 elif /bin/uname -X 2>/dev/null >/dev/null ; then | 1181 elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1151 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` | 1182 UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) |
1152 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | 1183 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1153 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | 1184 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
1154 && UNAME_MACHINE=i586 | 1185 && UNAME_MACHINE=i586 |
1155 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | 1186 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
1156 && UNAME_MACHINE=i686 | 1187 && UNAME_MACHINE=i686 |
1196 M68*:*:R3V[5678]*:*) | 1227 M68*:*:R3V[5678]*:*) |
1197 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; | 1228 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
1198 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) | 1229 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) |
1199 OS_REL='' | 1230 OS_REL='' |
1200 test -r /etc/.relid \ | 1231 test -r /etc/.relid \ |
1201 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | 1232 && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) |
1202 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 1233 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1203 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | 1234 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } |
1204 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | 1235 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1205 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | 1236 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
1206 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | 1237 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1207 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 1238 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1208 && { echo i486-ncr-sysv4; exit; } ;; | 1239 && { echo i486-ncr-sysv4; exit; } ;; |
1209 NCR*:*:4.2:* | MPRAS*:*:4.2:*) | 1240 NCR*:*:4.2:* | MPRAS*:*:4.2:*) |
1210 OS_REL='.3' | 1241 OS_REL='.3' |
1211 test -r /etc/.relid \ | 1242 test -r /etc/.relid \ |
1212 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | 1243 && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) |
1213 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 1244 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1214 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | 1245 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } |
1215 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | 1246 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1216 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } | 1247 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } |
1217 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | 1248 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
1240 RM*:SINIX-*:*:*) | 1271 RM*:SINIX-*:*:*) |
1241 echo mips-sni-sysv4 | 1272 echo mips-sni-sysv4 |
1242 exit ;; | 1273 exit ;; |
1243 *:SINIX-*:*:*) | 1274 *:SINIX-*:*:*) |
1244 if uname -p 2>/dev/null >/dev/null ; then | 1275 if uname -p 2>/dev/null >/dev/null ; then |
1245 UNAME_MACHINE=`(uname -p) 2>/dev/null` | 1276 UNAME_MACHINE=$( (uname -p) 2>/dev/null) |
1246 echo "$UNAME_MACHINE"-sni-sysv4 | 1277 echo "$UNAME_MACHINE"-sni-sysv4 |
1247 else | 1278 else |
1248 echo ns32k-sni-sysv | 1279 echo ns32k-sni-sysv |
1249 fi | 1280 fi |
1250 exit ;; | 1281 exit ;; |
1274 exit ;; | 1305 exit ;; |
1275 news*:NEWS-OS:6*:*) | 1306 news*:NEWS-OS:6*:*) |
1276 echo mips-sony-newsos6 | 1307 echo mips-sony-newsos6 |
1277 exit ;; | 1308 exit ;; |
1278 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | 1309 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1279 if [ -d /usr/nec ]; then | 1310 if test -d /usr/nec; then |
1280 echo mips-nec-sysv"$UNAME_RELEASE" | 1311 echo mips-nec-sysv"$UNAME_RELEASE" |
1281 else | 1312 else |
1282 echo mips-unknown-sysv"$UNAME_RELEASE" | 1313 echo mips-unknown-sysv"$UNAME_RELEASE" |
1283 fi | 1314 fi |
1284 exit ;; | 1315 exit ;; |
1322 echo powerpc-apple-rhapsody"$UNAME_RELEASE" | 1353 echo powerpc-apple-rhapsody"$UNAME_RELEASE" |
1323 exit ;; | 1354 exit ;; |
1324 *:Rhapsody:*:*) | 1355 *:Rhapsody:*:*) |
1325 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | 1356 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" |
1326 exit ;; | 1357 exit ;; |
1358 arm64:Darwin:*:*) | |
1359 echo aarch64-apple-darwin"$UNAME_RELEASE" | |
1360 exit ;; | |
1327 *:Darwin:*:*) | 1361 *:Darwin:*:*) |
1328 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | 1362 UNAME_PROCESSOR=$(uname -p) |
1329 set_cc_for_build | 1363 case $UNAME_PROCESSOR in |
1330 if test "$UNAME_PROCESSOR" = unknown ; then | 1364 unknown) UNAME_PROCESSOR=powerpc ;; |
1331 UNAME_PROCESSOR=powerpc | 1365 esac |
1332 fi | 1366 if command -v xcode-select > /dev/null 2> /dev/null && \ |
1333 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then | 1367 ! xcode-select --print-path > /dev/null 2> /dev/null ; then |
1334 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | 1368 # Avoid executing cc if there is no toolchain installed as |
1335 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | 1369 # cc will be a stub that puts up a graphical alert |
1336 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | 1370 # prompting the user to install developer tools. |
1337 grep IS_64BIT_ARCH >/dev/null | 1371 CC_FOR_BUILD=no_compiler_found |
1338 then | 1372 else |
1339 case $UNAME_PROCESSOR in | 1373 set_cc_for_build |
1340 i386) UNAME_PROCESSOR=x86_64 ;; | 1374 fi |
1341 powerpc) UNAME_PROCESSOR=powerpc64 ;; | 1375 if test "$CC_FOR_BUILD" != no_compiler_found; then |
1342 esac | 1376 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
1343 fi | 1377 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
1344 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | 1378 grep IS_64BIT_ARCH >/dev/null |
1345 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | 1379 then |
1346 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | 1380 case $UNAME_PROCESSOR in |
1347 grep IS_PPC >/dev/null | 1381 i386) UNAME_PROCESSOR=x86_64 ;; |
1348 then | 1382 powerpc) UNAME_PROCESSOR=powerpc64 ;; |
1349 UNAME_PROCESSOR=powerpc | 1383 esac |
1350 fi | 1384 fi |
1385 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
1386 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
1387 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1388 grep IS_PPC >/dev/null | |
1389 then | |
1390 UNAME_PROCESSOR=powerpc | |
1351 fi | 1391 fi |
1352 elif test "$UNAME_PROCESSOR" = i386 ; then | 1392 elif test "$UNAME_PROCESSOR" = i386 ; then |
1353 # Avoid executing cc on OS X 10.9, as it ships with a stub | 1393 # uname -m returns i386 or x86_64 |
1354 # that puts up a graphical alert prompting to install | 1394 UNAME_PROCESSOR=$UNAME_MACHINE |
1355 # developer tools. Any system running Mac OS X 10.7 or | |
1356 # later (Darwin 11 and later) is required to have a 64-bit | |
1357 # processor. This is not true of the ARM version of Darwin | |
1358 # that Apple uses in portable devices. | |
1359 UNAME_PROCESSOR=x86_64 | |
1360 fi | 1395 fi |
1361 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" | 1396 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" |
1362 exit ;; | 1397 exit ;; |
1363 *:procnto*:*:* | *:QNX:[0123456789]*:*) | 1398 *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1364 UNAME_PROCESSOR=`uname -p` | 1399 UNAME_PROCESSOR=$(uname -p) |
1365 if test "$UNAME_PROCESSOR" = x86; then | 1400 if test "$UNAME_PROCESSOR" = x86; then |
1366 UNAME_PROCESSOR=i386 | 1401 UNAME_PROCESSOR=i386 |
1367 UNAME_MACHINE=pc | 1402 UNAME_MACHINE=pc |
1368 fi | 1403 fi |
1369 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | 1404 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" |
1427 exit ;; | 1462 exit ;; |
1428 SEI:*:*:SEIUX) | 1463 SEI:*:*:SEIUX) |
1429 echo mips-sei-seiux"$UNAME_RELEASE" | 1464 echo mips-sei-seiux"$UNAME_RELEASE" |
1430 exit ;; | 1465 exit ;; |
1431 *:DragonFly:*:*) | 1466 *:DragonFly:*:*) |
1432 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | 1467 echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" |
1433 exit ;; | 1468 exit ;; |
1434 *:*VMS:*:*) | 1469 *:*VMS:*:*) |
1435 UNAME_MACHINE=`(uname -p) 2>/dev/null` | 1470 UNAME_MACHINE=$( (uname -p) 2>/dev/null) |
1436 case "$UNAME_MACHINE" in | 1471 case "$UNAME_MACHINE" in |
1437 A*) echo alpha-dec-vms ; exit ;; | 1472 A*) echo alpha-dec-vms ; exit ;; |
1438 I*) echo ia64-dec-vms ; exit ;; | 1473 I*) echo ia64-dec-vms ; exit ;; |
1439 V*) echo vax-dec-vms ; exit ;; | 1474 V*) echo vax-dec-vms ; exit ;; |
1440 esac ;; | 1475 esac ;; |
1441 *:XENIX:*:SysV) | 1476 *:XENIX:*:SysV) |
1442 echo i386-pc-xenix | 1477 echo i386-pc-xenix |
1443 exit ;; | 1478 exit ;; |
1444 i*86:skyos:*:*) | 1479 i*86:skyos:*:*) |
1445 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" | 1480 echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" |
1446 exit ;; | 1481 exit ;; |
1447 i*86:rdos:*:*) | 1482 i*86:rdos:*:*) |
1448 echo "$UNAME_MACHINE"-pc-rdos | 1483 echo "$UNAME_MACHINE"-pc-rdos |
1449 exit ;; | 1484 exit ;; |
1450 i*86:AROS:*:*) | 1485 *:AROS:*:*) |
1451 echo "$UNAME_MACHINE"-pc-aros | 1486 echo "$UNAME_MACHINE"-unknown-aros |
1452 exit ;; | 1487 exit ;; |
1453 x86_64:VMkernel:*:*) | 1488 x86_64:VMkernel:*:*) |
1454 echo "$UNAME_MACHINE"-unknown-esx | 1489 echo "$UNAME_MACHINE"-unknown-esx |
1455 exit ;; | 1490 exit ;; |
1456 amd64:Isilon\ OneFS:*:*) | 1491 amd64:Isilon\ OneFS:*:*) |
1465 set_cc_for_build | 1500 set_cc_for_build |
1466 cat > "$dummy.c" <<EOF | 1501 cat > "$dummy.c" <<EOF |
1467 #ifdef _SEQUENT_ | 1502 #ifdef _SEQUENT_ |
1468 #include <sys/types.h> | 1503 #include <sys/types.h> |
1469 #include <sys/utsname.h> | 1504 #include <sys/utsname.h> |
1505 #endif | |
1506 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1507 #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1508 #include <signal.h> | |
1509 #if defined(_SIZE_T_) || defined(SIGLOST) | |
1510 #include <sys/utsname.h> | |
1511 #endif | |
1512 #endif | |
1470 #endif | 1513 #endif |
1471 main () | 1514 main () |
1472 { | 1515 { |
1473 #if defined (sony) | 1516 #if defined (sony) |
1474 #if defined (MIPSEB) | 1517 #if defined (MIPSEB) |
1490 #if defined (NeXT) | 1533 #if defined (NeXT) |
1491 #if !defined (__ARCHITECTURE__) | 1534 #if !defined (__ARCHITECTURE__) |
1492 #define __ARCHITECTURE__ "m68k" | 1535 #define __ARCHITECTURE__ "m68k" |
1493 #endif | 1536 #endif |
1494 int version; | 1537 int version; |
1495 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | 1538 version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); |
1496 if (version < 4) | 1539 if (version < 4) |
1497 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | 1540 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
1498 else | 1541 else |
1499 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | 1542 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
1500 exit (0); | 1543 exit (0); |
1553 #endif | 1596 #endif |
1554 #else | 1597 #else |
1555 printf ("vax-dec-bsd\n"); exit (0); | 1598 printf ("vax-dec-bsd\n"); exit (0); |
1556 #endif | 1599 #endif |
1557 #else | 1600 #else |
1601 #if defined(_SIZE_T_) || defined(SIGLOST) | |
1602 struct utsname un; | |
1603 uname (&un); | |
1604 printf ("vax-dec-ultrix%s\n", un.release); exit (0); | |
1605 #else | |
1558 printf ("vax-dec-ultrix\n"); exit (0); | 1606 printf ("vax-dec-ultrix\n"); exit (0); |
1607 #endif | |
1559 #endif | 1608 #endif |
1560 #endif | 1609 #endif |
1561 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | 1610 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) |
1562 #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | 1611 #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) |
1563 #include <signal.h> | 1612 #if defined(_SIZE_T_) || defined(SIGLOST) |
1564 #if defined(_SIZE_T_) /* >= ULTRIX4 */ | 1613 struct utsname *un; |
1565 printf ("mips-dec-ultrix4\n"); exit (0); | 1614 uname (&un); |
1615 printf ("mips-dec-ultrix%s\n", un.release); exit (0); | |
1566 #else | 1616 #else |
1567 #if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST) | 1617 printf ("mips-dec-ultrix\n"); exit (0); |
1568 printf ("mips-dec-ultrix3\n"); exit (0); | |
1569 #endif | |
1570 #endif | 1618 #endif |
1571 #endif | 1619 #endif |
1572 #endif | 1620 #endif |
1573 | 1621 |
1574 #if defined (alliant) && defined (i860) | 1622 #if defined (alliant) && defined (i860) |
1577 | 1625 |
1578 exit (1); | 1626 exit (1); |
1579 } | 1627 } |
1580 EOF | 1628 EOF |
1581 | 1629 |
1582 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && | 1630 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && |
1583 { echo "$SYSTEM_NAME"; exit; } | 1631 { echo "$SYSTEM_NAME"; exit; } |
1584 | 1632 |
1585 # Apollos put the system type in the environment. | 1633 # Apollos put the system type in the environment. |
1586 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } | 1634 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } |
1587 | 1635 |
1602 | 1650 |
1603 This script (version $timestamp), has failed to recognize the | 1651 This script (version $timestamp), has failed to recognize the |
1604 operating system you are using. If your script is old, overwrite *all* | 1652 operating system you are using. If your script is old, overwrite *all* |
1605 copies of config.guess and config.sub with the latest versions from: | 1653 copies of config.guess and config.sub with the latest versions from: |
1606 | 1654 |
1607 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | 1655 https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
1608 and | 1656 and |
1609 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | 1657 https://git.savannah.gnu.org/cgit/config.git/plain/config.sub |
1658 EOF | |
1659 | |
1660 year=$(echo $timestamp | sed 's,-.*,,') | |
1661 # shellcheck disable=SC2003 | |
1662 if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then | |
1663 cat >&2 <<EOF | |
1610 | 1664 |
1611 If $0 has already been updated, send the following data and any | 1665 If $0 has already been updated, send the following data and any |
1612 information you think might be pertinent to [email protected] to | 1666 information you think might be pertinent to [email protected] to |
1613 provide the necessary information to handle your system. | 1667 provide the necessary information to handle your system. |
1614 | 1668 |
1615 config.guess timestamp = $timestamp | 1669 config.guess timestamp = $timestamp |
1616 | 1670 |
1617 uname -m = `(uname -m) 2>/dev/null || echo unknown` | 1671 uname -m = $( (uname -m) 2>/dev/null || echo unknown) |
1618 uname -r = `(uname -r) 2>/dev/null || echo unknown` | 1672 uname -r = $( (uname -r) 2>/dev/null || echo unknown) |
1619 uname -s = `(uname -s) 2>/dev/null || echo unknown` | 1673 uname -s = $( (uname -s) 2>/dev/null || echo unknown) |
1620 uname -v = `(uname -v) 2>/dev/null || echo unknown` | 1674 uname -v = $( (uname -v) 2>/dev/null || echo unknown) |
1621 | 1675 |
1622 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` | 1676 /usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) |
1623 /bin/uname -X = `(/bin/uname -X) 2>/dev/null` | 1677 /bin/uname -X = $( (/bin/uname -X) 2>/dev/null) |
1624 | 1678 |
1625 hostinfo = `(hostinfo) 2>/dev/null` | 1679 hostinfo = $( (hostinfo) 2>/dev/null) |
1626 /bin/universe = `(/bin/universe) 2>/dev/null` | 1680 /bin/universe = $( (/bin/universe) 2>/dev/null) |
1627 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` | 1681 /usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) |
1628 /bin/arch = `(/bin/arch) 2>/dev/null` | 1682 /bin/arch = $( (/bin/arch) 2>/dev/null) |
1629 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` | 1683 /usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) |
1630 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` | 1684 /usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) |
1631 | 1685 |
1632 UNAME_MACHINE = "$UNAME_MACHINE" | 1686 UNAME_MACHINE = "$UNAME_MACHINE" |
1633 UNAME_RELEASE = "$UNAME_RELEASE" | 1687 UNAME_RELEASE = "$UNAME_RELEASE" |
1634 UNAME_SYSTEM = "$UNAME_SYSTEM" | 1688 UNAME_SYSTEM = "$UNAME_SYSTEM" |
1635 UNAME_VERSION = "$UNAME_VERSION" | 1689 UNAME_VERSION = "$UNAME_VERSION" |
1636 EOF | 1690 EOF |
1691 fi | |
1637 | 1692 |
1638 exit 1 | 1693 exit 1 |
1639 | 1694 |
1640 # Local variables: | 1695 # Local variables: |
1641 # eval: (add-hook 'before-save-hook 'time-stamp) | 1696 # eval: (add-hook 'before-save-hook 'time-stamp) |