0 | 0 |
#! /bin/sh
|
1 | 1 |
# Attempt to guess a canonical system name.
|
2 | |
# Copyright 1992-2013 Free Software Foundation, Inc.
|
3 | |
|
4 | |
timestamp='2013-06-10'
|
|
2 |
# Copyright 1992-2016 Free Software Foundation, Inc.
|
|
3 |
|
|
4 |
timestamp='2016-10-02'
|
5 | 5 |
|
6 | 6 |
# This file is free software; you can redistribute it and/or modify it
|
7 | 7 |
# under the terms of the GNU General Public License as published by
|
|
23 | 23 |
# program. This Exception is an additional permission under section 7
|
24 | 24 |
# of the GNU General Public License, version 3 ("GPLv3").
|
25 | 25 |
#
|
26 | |
# Originally written by Per Bothner.
|
|
26 |
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
27 | 27 |
#
|
28 | 28 |
# You can get the latest version of this script from:
|
29 | |
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
|
29 |
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
30 | 30 |
#
|
31 | |
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
|
31 |
# Please send patches to <config-patches@gnu.org>.
|
32 | 32 |
|
33 | 33 |
|
34 | 34 |
me=`echo "$0" | sed -e 's,.*/,,'`
|
|
49 | 49 |
GNU config.guess ($timestamp)
|
50 | 50 |
|
51 | 51 |
Originally written by Per Bothner.
|
52 | |
Copyright 1992-2013 Free Software Foundation, Inc.
|
|
52 |
Copyright 1992-2016 Free Software Foundation, Inc.
|
53 | 53 |
|
54 | 54 |
This is free software; see the source for copying conditions. There is NO
|
55 | 55 |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
148 | 148 |
LIBC=gnu
|
149 | 149 |
#endif
|
150 | 150 |
EOF
|
151 | |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
|
151 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
152 | 152 |
;;
|
153 | 153 |
esac
|
154 | 154 |
|
|
167 | 167 |
# Note: NetBSD doesn't particularly care about the vendor
|
168 | 168 |
# portion of the name. We always set it to "unknown".
|
169 | 169 |
sysctl="sysctl -n hw.machine_arch"
|
170 | |
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
171 | |
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
|
170 |
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
|
|
171 |
/sbin/$sysctl 2>/dev/null || \
|
|
172 |
/usr/sbin/$sysctl 2>/dev/null || \
|
|
173 |
echo unknown)`
|
172 | 174 |
case "${UNAME_MACHINE_ARCH}" in
|
173 | 175 |
armeb) machine=armeb-unknown ;;
|
174 | 176 |
arm*) machine=arm-unknown ;;
|
175 | 177 |
sh3el) machine=shl-unknown ;;
|
176 | 178 |
sh3eb) machine=sh-unknown ;;
|
177 | 179 |
sh5el) machine=sh5le-unknown ;;
|
|
180 |
earmv*)
|
|
181 |
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
|
|
182 |
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
|
|
183 |
machine=${arch}${endian}-unknown
|
|
184 |
;;
|
178 | 185 |
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
179 | 186 |
esac
|
180 | 187 |
# The Operating System including object format, if it has switched
|
181 | |
# to ELF recently, or will in the future.
|
|
188 |
# to ELF recently (or will in the future) and ABI.
|
182 | 189 |
case "${UNAME_MACHINE_ARCH}" in
|
|
190 |
earm*)
|
|
191 |
os=netbsdelf
|
|
192 |
;;
|
183 | 193 |
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
184 | 194 |
eval $set_cc_for_build
|
185 | 195 |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
196 | 206 |
os=netbsd
|
197 | 207 |
;;
|
198 | 208 |
esac
|
|
209 |
# Determine ABI tags.
|
|
210 |
case "${UNAME_MACHINE_ARCH}" in
|
|
211 |
earm*)
|
|
212 |
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
|
|
213 |
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
|
|
214 |
;;
|
|
215 |
esac
|
199 | 216 |
# The OS release
|
200 | 217 |
# Debian GNU/NetBSD machines have a different userland, and
|
201 | 218 |
# thus, need a distinct triplet. However, they do not need
|
|
206 | 223 |
release='-gnu'
|
207 | 224 |
;;
|
208 | 225 |
*)
|
209 | |
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
|
226 |
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
|
210 | 227 |
;;
|
211 | 228 |
esac
|
212 | 229 |
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
213 | 230 |
# contains redundant information, the shorter form:
|
214 | 231 |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
215 | |
echo "${machine}-${os}${release}"
|
|
232 |
echo "${machine}-${os}${release}${abi}"
|
216 | 233 |
exit ;;
|
217 | 234 |
*:Bitrig:*:*)
|
218 | 235 |
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
|
222 | 239 |
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
223 | 240 |
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
224 | 241 |
exit ;;
|
|
242 |
*:LibertyBSD:*:*)
|
|
243 |
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
|
|
244 |
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
|
|
245 |
exit ;;
|
225 | 246 |
*:ekkoBSD:*:*)
|
226 | 247 |
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
227 | 248 |
exit ;;
|
|
233 | 254 |
exit ;;
|
234 | 255 |
*:MirBSD:*:*)
|
235 | 256 |
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
|
257 |
exit ;;
|
|
258 |
*:Sortix:*:*)
|
|
259 |
echo ${UNAME_MACHINE}-unknown-sortix
|
236 | 260 |
exit ;;
|
237 | 261 |
alpha:OSF1:*:*)
|
238 | 262 |
case $UNAME_RELEASE in
|
|
250 | 274 |
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
251 | 275 |
case "$ALPHA_CPU_TYPE" in
|
252 | 276 |
"EV4 (21064)")
|
253 | |
UNAME_MACHINE="alpha" ;;
|
|
277 |
UNAME_MACHINE=alpha ;;
|
254 | 278 |
"EV4.5 (21064)")
|
255 | |
UNAME_MACHINE="alpha" ;;
|
|
279 |
UNAME_MACHINE=alpha ;;
|
256 | 280 |
"LCA4 (21066/21068)")
|
257 | |
UNAME_MACHINE="alpha" ;;
|
|
281 |
UNAME_MACHINE=alpha ;;
|
258 | 282 |
"EV5 (21164)")
|
259 | |
UNAME_MACHINE="alphaev5" ;;
|
|
283 |
UNAME_MACHINE=alphaev5 ;;
|
260 | 284 |
"EV5.6 (21164A)")
|
261 | |
UNAME_MACHINE="alphaev56" ;;
|
|
285 |
UNAME_MACHINE=alphaev56 ;;
|
262 | 286 |
"EV5.6 (21164PC)")
|
263 | |
UNAME_MACHINE="alphapca56" ;;
|
|
287 |
UNAME_MACHINE=alphapca56 ;;
|
264 | 288 |
"EV5.7 (21164PC)")
|
265 | |
UNAME_MACHINE="alphapca57" ;;
|
|
289 |
UNAME_MACHINE=alphapca57 ;;
|
266 | 290 |
"EV6 (21264)")
|
267 | |
UNAME_MACHINE="alphaev6" ;;
|
|
291 |
UNAME_MACHINE=alphaev6 ;;
|
268 | 292 |
"EV6.7 (21264A)")
|
269 | |
UNAME_MACHINE="alphaev67" ;;
|
|
293 |
UNAME_MACHINE=alphaev67 ;;
|
270 | 294 |
"EV6.8CB (21264C)")
|
271 | |
UNAME_MACHINE="alphaev68" ;;
|
|
295 |
UNAME_MACHINE=alphaev68 ;;
|
272 | 296 |
"EV6.8AL (21264B)")
|
273 | |
UNAME_MACHINE="alphaev68" ;;
|
|
297 |
UNAME_MACHINE=alphaev68 ;;
|
274 | 298 |
"EV6.8CX (21264D)")
|
275 | |
UNAME_MACHINE="alphaev68" ;;
|
|
299 |
UNAME_MACHINE=alphaev68 ;;
|
276 | 300 |
"EV6.9A (21264/EV69A)")
|
277 | |
UNAME_MACHINE="alphaev69" ;;
|
|
301 |
UNAME_MACHINE=alphaev69 ;;
|
278 | 302 |
"EV7 (21364)")
|
279 | |
UNAME_MACHINE="alphaev7" ;;
|
|
303 |
UNAME_MACHINE=alphaev7 ;;
|
280 | 304 |
"EV7.9 (21364A)")
|
281 | |
UNAME_MACHINE="alphaev79" ;;
|
|
305 |
UNAME_MACHINE=alphaev79 ;;
|
282 | 306 |
esac
|
283 | 307 |
# A Pn.n version is a patched version.
|
284 | 308 |
# A Vn.n version is a released version.
|
285 | 309 |
# A Tn.n version is a released field test version.
|
286 | 310 |
# A Xn.n version is an unreleased experimental baselevel.
|
287 | 311 |
# 1.2 uses "1.2" for uname -r.
|
288 | |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
|
312 |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
289 | 313 |
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
290 | 314 |
exitcode=$?
|
291 | 315 |
trap '' 0
|
|
358 | 382 |
exit ;;
|
359 | 383 |
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
360 | 384 |
eval $set_cc_for_build
|
361 | |
SUN_ARCH="i386"
|
|
385 |
SUN_ARCH=i386
|
362 | 386 |
# If there is a compiler, see if it is configured for 64-bit objects.
|
363 | 387 |
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
364 | 388 |
# This test works for both compilers.
|
365 | |
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
|
389 |
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
366 | 390 |
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
367 | |
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
391 |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
368 | 392 |
grep IS_64BIT_ARCH >/dev/null
|
369 | 393 |
then
|
370 | |
SUN_ARCH="x86_64"
|
|
394 |
SUN_ARCH=x86_64
|
371 | 395 |
fi
|
372 | 396 |
fi
|
373 | 397 |
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
|
392 | 416 |
exit ;;
|
393 | 417 |
sun*:*:4.2BSD:*)
|
394 | 418 |
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
395 | |
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
|
419 |
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
|
396 | 420 |
case "`/bin/arch`" in
|
397 | 421 |
sun3)
|
398 | 422 |
echo m68k-sun-sunos${UNAME_RELEASE}
|
|
578 | 602 |
else
|
579 | 603 |
IBM_ARCH=powerpc
|
580 | 604 |
fi
|
581 | |
if [ -x /usr/bin/oslevel ] ; then
|
582 | |
IBM_REV=`/usr/bin/oslevel`
|
|
605 |
if [ -x /usr/bin/lslpp ] ; then
|
|
606 |
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
|
|
607 |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
|
583 | 608 |
else
|
584 | 609 |
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
585 | 610 |
fi
|
|
616 | 641 |
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
617 | 642 |
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
618 | 643 |
case "${sc_cpu_version}" in
|
619 | |
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
620 | |
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
|
644 |
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
|
|
645 |
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
|
621 | 646 |
532) # CPU_PA_RISC2_0
|
622 | 647 |
case "${sc_kernel_bits}" in
|
623 | |
32) HP_ARCH="hppa2.0n" ;;
|
624 | |
64) HP_ARCH="hppa2.0w" ;;
|
625 | |
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
|
648 |
32) HP_ARCH=hppa2.0n ;;
|
|
649 |
64) HP_ARCH=hppa2.0w ;;
|
|
650 |
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
|
626 | 651 |
esac ;;
|
627 | 652 |
esac
|
628 | 653 |
fi
|
|
661 | 686 |
exit (0);
|
662 | 687 |
}
|
663 | 688 |
EOF
|
664 | |
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
|
689 |
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
665 | 690 |
test -z "$HP_ARCH" && HP_ARCH=hppa
|
666 | 691 |
fi ;;
|
667 | 692 |
esac
|
668 | |
if [ ${HP_ARCH} = "hppa2.0w" ]
|
|
693 |
if [ ${HP_ARCH} = hppa2.0w ]
|
669 | 694 |
then
|
670 | 695 |
eval $set_cc_for_build
|
671 | 696 |
|
|
678 | 703 |
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
|
679 | 704 |
# => hppa64-hp-hpux11.23
|
680 | 705 |
|
681 | |
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
|
706 |
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
|
682 | 707 |
grep -q __LP64__
|
683 | 708 |
then
|
684 | |
HP_ARCH="hppa2.0w"
|
|
709 |
HP_ARCH=hppa2.0w
|
685 | 710 |
else
|
686 | |
HP_ARCH="hppa64"
|
|
711 |
HP_ARCH=hppa64
|
687 | 712 |
fi
|
688 | 713 |
fi
|
689 | 714 |
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
|
788 | 813 |
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
789 | 814 |
exit ;;
|
790 | 815 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
791 | |
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
792 | |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
|
816 |
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
|
817 |
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
793 | 818 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
794 | 819 |
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
795 | 820 |
exit ;;
|
796 | 821 |
5000:UNIX_System_V:4.*:*)
|
797 | |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
798 | |
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
|
822 |
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
|
823 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
|
799 | 824 |
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
800 | 825 |
exit ;;
|
801 | 826 |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
|
825 | 850 |
*:MINGW*:*)
|
826 | 851 |
echo ${UNAME_MACHINE}-pc-mingw32
|
827 | 852 |
exit ;;
|
828 | |
i*:MSYS*:*)
|
|
853 |
*:MSYS*:*)
|
829 | 854 |
echo ${UNAME_MACHINE}-pc-msys
|
830 | 855 |
exit ;;
|
831 | 856 |
i*:windows32*:*)
|
|
877 | 902 |
exit ;;
|
878 | 903 |
*:GNU/*:*:*)
|
879 | 904 |
# other systems with GNU libc and userland
|
880 | |
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
|
905 |
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
881 | 906 |
exit ;;
|
882 | 907 |
i*86:Minix:*:*)
|
883 | 908 |
echo ${UNAME_MACHINE}-pc-minix
|
|
900 | 925 |
EV68*) UNAME_MACHINE=alphaev68 ;;
|
901 | 926 |
esac
|
902 | 927 |
objdump --private-headers /bin/sh | grep -q ld.so.1
|
903 | |
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
|
928 |
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
|
904 | 929 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
905 | 930 |
exit ;;
|
906 | 931 |
arc:Linux:*:* | arceb:Linux:*:*)
|
|
931 | 956 |
crisv32:Linux:*:*)
|
932 | 957 |
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
933 | 958 |
exit ;;
|
|
959 |
e2k:Linux:*:*)
|
|
960 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
961 |
exit ;;
|
934 | 962 |
frv:Linux:*:*)
|
935 | 963 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
936 | 964 |
exit ;;
|
|
941 | 969 |
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
942 | 970 |
exit ;;
|
943 | 971 |
ia64:Linux:*:*)
|
|
972 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
973 |
exit ;;
|
|
974 |
k1om:Linux:*:*)
|
944 | 975 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
945 | 976 |
exit ;;
|
946 | 977 |
m32r*:Linux:*:*)
|
|
968 | 999 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
969 | 1000 |
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
970 | 1001 |
;;
|
971 | |
or1k:Linux:*:*)
|
972 | |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
973 | |
exit ;;
|
974 | |
or32:Linux:*:*)
|
|
1002 |
mips64el:Linux:*:*)
|
|
1003 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
1004 |
exit ;;
|
|
1005 |
openrisc*:Linux:*:*)
|
|
1006 |
echo or1k-unknown-linux-${LIBC}
|
|
1007 |
exit ;;
|
|
1008 |
or32:Linux:*:* | or1k*:Linux:*:*)
|
975 | 1009 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
976 | 1010 |
exit ;;
|
977 | 1011 |
padre:Linux:*:*)
|
|
1000 | 1034 |
ppcle:Linux:*:*)
|
1001 | 1035 |
echo powerpcle-unknown-linux-${LIBC}
|
1002 | 1036 |
exit ;;
|
|
1037 |
riscv32:Linux:*:* | riscv64:Linux:*:*)
|
|
1038 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
1039 |
exit ;;
|
1003 | 1040 |
s390:Linux:*:* | s390x:Linux:*:*)
|
1004 | 1041 |
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
1005 | 1042 |
exit ;;
|
|
1019 | 1056 |
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
1020 | 1057 |
exit ;;
|
1021 | 1058 |
x86_64:Linux:*:*)
|
1022 | |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
1059 |
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
1023 | 1060 |
exit ;;
|
1024 | 1061 |
xtensa*:Linux:*:*)
|
1025 | 1062 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
1098 | 1135 |
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
1099 | 1136 |
# the processor, so we play safe by assuming i586.
|
1100 | 1137 |
# Note: whatever this is, it MUST be the same as what config.sub
|
1101 | |
# prints for the "djgpp" host, or else GDB configury will decide that
|
|
1138 |
# prints for the "djgpp" host, or else GDB configure will decide that
|
1102 | 1139 |
# this is a cross-build.
|
1103 | 1140 |
echo i586-pc-msdosdjgpp
|
1104 | 1141 |
exit ;;
|
|
1247 | 1284 |
SX-8R:SUPER-UX:*:*)
|
1248 | 1285 |
echo sx8r-nec-superux${UNAME_RELEASE}
|
1249 | 1286 |
exit ;;
|
|
1287 |
SX-ACE:SUPER-UX:*:*)
|
|
1288 |
echo sxace-nec-superux${UNAME_RELEASE}
|
|
1289 |
exit ;;
|
1250 | 1290 |
Power*:Rhapsody:*:*)
|
1251 | 1291 |
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
1252 | 1292 |
exit ;;
|
|
1259 | 1299 |
if test "$UNAME_PROCESSOR" = unknown ; then
|
1260 | 1300 |
UNAME_PROCESSOR=powerpc
|
1261 | 1301 |
fi
|
1262 | |
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
1263 | |
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
1264 | |
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
1265 | |
grep IS_64BIT_ARCH >/dev/null
|
1266 | |
then
|
1267 | |
case $UNAME_PROCESSOR in
|
1268 | |
i386) UNAME_PROCESSOR=x86_64 ;;
|
1269 | |
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
1270 | |
esac
|
|
1302 |
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
|
1303 |
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
|
1304 |
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
|
1305 |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
1306 |
grep IS_64BIT_ARCH >/dev/null
|
|
1307 |
then
|
|
1308 |
case $UNAME_PROCESSOR in
|
|
1309 |
i386) UNAME_PROCESSOR=x86_64 ;;
|
|
1310 |
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
|
1311 |
esac
|
|
1312 |
fi
|
1271 | 1313 |
fi
|
|
1314 |
elif test "$UNAME_PROCESSOR" = i386 ; then
|
|
1315 |
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
|
1316 |
# that puts up a graphical alert prompting to install
|
|
1317 |
# developer tools. Any system running Mac OS X 10.7 or
|
|
1318 |
# later (Darwin 11 and later) is required to have a 64-bit
|
|
1319 |
# processor. This is not true of the ARM version of Darwin
|
|
1320 |
# that Apple uses in portable devices.
|
|
1321 |
UNAME_PROCESSOR=x86_64
|
1272 | 1322 |
fi
|
1273 | 1323 |
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
1274 | 1324 |
exit ;;
|
1275 | 1325 |
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
1276 | 1326 |
UNAME_PROCESSOR=`uname -p`
|
1277 | |
if test "$UNAME_PROCESSOR" = "x86"; then
|
|
1327 |
if test "$UNAME_PROCESSOR" = x86; then
|
1278 | 1328 |
UNAME_PROCESSOR=i386
|
1279 | 1329 |
UNAME_MACHINE=pc
|
1280 | 1330 |
fi
|
|
1305 | 1355 |
# "uname -m" is not consistent, so use $cputype instead. 386
|
1306 | 1356 |
# is converted to i386 for consistency with other x86
|
1307 | 1357 |
# operating systems.
|
1308 | |
if test "$cputype" = "386"; then
|
|
1358 |
if test "$cputype" = 386; then
|
1309 | 1359 |
UNAME_MACHINE=i386
|
1310 | 1360 |
else
|
1311 | 1361 |
UNAME_MACHINE="$cputype"
|
|
1347 | 1397 |
echo i386-pc-xenix
|
1348 | 1398 |
exit ;;
|
1349 | 1399 |
i*86:skyos:*:*)
|
1350 | |
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
|
|
1400 |
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
|
1351 | 1401 |
exit ;;
|
1352 | 1402 |
i*86:rdos:*:*)
|
1353 | 1403 |
echo ${UNAME_MACHINE}-pc-rdos
|
|
1358 | 1408 |
x86_64:VMkernel:*:*)
|
1359 | 1409 |
echo ${UNAME_MACHINE}-unknown-esx
|
1360 | 1410 |
exit ;;
|
|
1411 |
amd64:Isilon\ OneFS:*:*)
|
|
1412 |
echo x86_64-unknown-onefs
|
|
1413 |
exit ;;
|
1361 | 1414 |
esac
|
1362 | |
|
1363 | |
eval $set_cc_for_build
|
1364 | |
cat >$dummy.c <<EOF
|
1365 | |
#ifdef _SEQUENT_
|
1366 | |
# include <sys/types.h>
|
1367 | |
# include <sys/utsname.h>
|
1368 | |
#endif
|
1369 | |
main ()
|
1370 | |
{
|
1371 | |
#if defined (sony)
|
1372 | |
#if defined (MIPSEB)
|
1373 | |
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
1374 | |
I don't know.... */
|
1375 | |
printf ("mips-sony-bsd\n"); exit (0);
|
1376 | |
#else
|
1377 | |
#include <sys/param.h>
|
1378 | |
printf ("m68k-sony-newsos%s\n",
|
1379 | |
#ifdef NEWSOS4
|
1380 | |
"4"
|
1381 | |
#else
|
1382 | |
""
|
1383 | |
#endif
|
1384 | |
); exit (0);
|
1385 | |
#endif
|
1386 | |
#endif
|
1387 | |
|
1388 | |
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
1389 | |
printf ("arm-acorn-riscix\n"); exit (0);
|
1390 | |
#endif
|
1391 | |
|
1392 | |
#if defined (hp300) && !defined (hpux)
|
1393 | |
printf ("m68k-hp-bsd\n"); exit (0);
|
1394 | |
#endif
|
1395 | |
|
1396 | |
#if defined (NeXT)
|
1397 | |
#if !defined (__ARCHITECTURE__)
|
1398 | |
#define __ARCHITECTURE__ "m68k"
|
1399 | |
#endif
|
1400 | |
int version;
|
1401 | |
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
1402 | |
if (version < 4)
|
1403 | |
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
1404 | |
else
|
1405 | |
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
1406 | |
exit (0);
|
1407 | |
#endif
|
1408 | |
|
1409 | |
#if defined (MULTIMAX) || defined (n16)
|
1410 | |
#if defined (UMAXV)
|
1411 | |
printf ("ns32k-encore-sysv\n"); exit (0);
|
1412 | |
#else
|
1413 | |
#if defined (CMU)
|
1414 | |
printf ("ns32k-encore-mach\n"); exit (0);
|
1415 | |
#else
|
1416 | |
printf ("ns32k-encore-bsd\n"); exit (0);
|
1417 | |
#endif
|
1418 | |
#endif
|
1419 | |
#endif
|
1420 | |
|
1421 | |
#if defined (__386BSD__)
|
1422 | |
printf ("i386-pc-bsd\n"); exit (0);
|
1423 | |
#endif
|
1424 | |
|
1425 | |
#if defined (sequent)
|
1426 | |
#if defined (i386)
|
1427 | |
printf ("i386-sequent-dynix\n"); exit (0);
|
1428 | |
#endif
|
1429 | |
#if defined (ns32000)
|
1430 | |
printf ("ns32k-sequent-dynix\n"); exit (0);
|
1431 | |
#endif
|
1432 | |
#endif
|
1433 | |
|
1434 | |
#if defined (_SEQUENT_)
|
1435 | |
struct utsname un;
|
1436 | |
|
1437 | |
uname(&un);
|
1438 | |
|
1439 | |
if (strncmp(un.version, "V2", 2) == 0) {
|
1440 | |
printf ("i386-sequent-ptx2\n"); exit (0);
|
1441 | |
}
|
1442 | |
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
1443 | |
printf ("i386-sequent-ptx1\n"); exit (0);
|
1444 | |
}
|
1445 | |
printf ("i386-sequent-ptx\n"); exit (0);
|
1446 | |
|
1447 | |
#endif
|
1448 | |
|
1449 | |
#if defined (vax)
|
1450 | |
# if !defined (ultrix)
|
1451 | |
# include <sys/param.h>
|
1452 | |
# if defined (BSD)
|
1453 | |
# if BSD == 43
|
1454 | |
printf ("vax-dec-bsd4.3\n"); exit (0);
|
1455 | |
# else
|
1456 | |
# if BSD == 199006
|
1457 | |
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
1458 | |
# else
|
1459 | |
printf ("vax-dec-bsd\n"); exit (0);
|
1460 | |
# endif
|
1461 | |
# endif
|
1462 | |
# else
|
1463 | |
printf ("vax-dec-bsd\n"); exit (0);
|
1464 | |
# endif
|
1465 | |
# else
|
1466 | |
printf ("vax-dec-ultrix\n"); exit (0);
|
1467 | |
# endif
|
1468 | |
#endif
|
1469 | |
|
1470 | |
#if defined (alliant) && defined (i860)
|
1471 | |
printf ("i860-alliant-bsd\n"); exit (0);
|
1472 | |
#endif
|
1473 | |
|
1474 | |
exit (1);
|
1475 | |
}
|
1476 | |
EOF
|
1477 | |
|
1478 | |
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
|
1479 | |
{ echo "$SYSTEM_NAME"; exit; }
|
1480 | |
|
1481 | |
# Apollos put the system type in the environment.
|
1482 | |
|
1483 | |
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
|
1484 | |
|
1485 | |
# Convex versions that predate uname can use getsysinfo(1)
|
1486 | |
|
1487 | |
if [ -x /usr/convex/getsysinfo ]
|
1488 | |
then
|
1489 | |
case `getsysinfo -f cpu_type` in
|
1490 | |
c1*)
|
1491 | |
echo c1-convex-bsd
|
1492 | |
exit ;;
|
1493 | |
c2*)
|
1494 | |
if getsysinfo -f scalar_acc
|
1495 | |
then echo c32-convex-bsd
|
1496 | |
else echo c2-convex-bsd
|
1497 | |
fi
|
1498 | |
exit ;;
|
1499 | |
c34*)
|
1500 | |
echo c34-convex-bsd
|
1501 | |
exit ;;
|
1502 | |
c38*)
|
1503 | |
echo c38-convex-bsd
|
1504 | |
exit ;;
|
1505 | |
c4*)
|
1506 | |
echo c4-convex-bsd
|
1507 | |
exit ;;
|
1508 | |
esac
|
1509 | |
fi
|
1510 | 1415 |
|
1511 | 1416 |
cat >&2 <<EOF
|
1512 | 1417 |
$0: unable to guess system type
|
1513 | 1418 |
|
1514 | |
This script, last modified $timestamp, has failed to recognize
|
1515 | |
the operating system you are using. It is advised that you
|
1516 | |
download the most up to date version of the config scripts from
|
1517 | |
|
1518 | |
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
|
1419 |
This script (version $timestamp), has failed to recognize the
|
|
1420 |
operating system you are using. If your script is old, overwrite
|
|
1421 |
config.guess and config.sub with the latest versions from:
|
|
1422 |
|
|
1423 |
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
1519 | 1424 |
and
|
1520 | |
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
1521 | |
|
1522 | |
If the version you run ($0) is already up to date, please
|
1523 | |
send the following data and any information you think might be
|
1524 | |
pertinent to <config-patches@gnu.org> in order to provide the needed
|
1525 | |
information to handle your system.
|
|
1425 |
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
|
1426 |
|
|
1427 |
If $0 has already been updated, send the following data and any
|
|
1428 |
information you think might be pertinent to config-patches@gnu.org to
|
|
1429 |
provide the necessary information to handle your system.
|
1526 | 1430 |
|
1527 | 1431 |
config.guess timestamp = $timestamp
|
1528 | 1432 |
|