0 | 0 |
#! /bin/sh
|
1 | 1 |
# Attempt to guess a canonical system name.
|
2 | |
# Copyright 1992-2016 Free Software Foundation, Inc.
|
3 | |
|
4 | |
timestamp='2016-10-02'
|
|
2 |
# Copyright 1992-2013 Free Software Foundation, Inc.
|
|
3 |
|
|
4 |
timestamp='2013-06-10'
|
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; maintained since 2000 by Ben Elliston.
|
|
26 |
# Originally written by Per Bothner.
|
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
|
|
29 |
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
30 | 30 |
#
|
31 | |
# Please send patches to <config-patches@gnu.org>.
|
|
31 |
# Please send patches with a ChangeLog entry 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-2016 Free Software Foundation, Inc.
|
|
52 |
Copyright 1992-2013 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' | sed 's, ,,g'`
|
|
151 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
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=`(uname -p 2>/dev/null || \
|
171 | |
/sbin/$sysctl 2>/dev/null || \
|
172 | |
/usr/sbin/$sysctl 2>/dev/null || \
|
173 | |
echo unknown)`
|
|
170 |
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
|
171 |
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
174 | 172 |
case "${UNAME_MACHINE_ARCH}" in
|
175 | 173 |
armeb) machine=armeb-unknown ;;
|
176 | 174 |
arm*) machine=arm-unknown ;;
|
177 | 175 |
sh3el) machine=shl-unknown ;;
|
178 | 176 |
sh3eb) machine=sh-unknown ;;
|
179 | 177 |
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 | |
;;
|
185 | 178 |
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
186 | 179 |
esac
|
187 | 180 |
# The Operating System including object format, if it has switched
|
188 | |
# to ELF recently (or will in the future) and ABI.
|
|
181 |
# to ELF recently, or will in the future.
|
189 | 182 |
case "${UNAME_MACHINE_ARCH}" in
|
190 | |
earm*)
|
191 | |
os=netbsdelf
|
192 | |
;;
|
193 | 183 |
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
194 | 184 |
eval $set_cc_for_build
|
195 | 185 |
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
206 | 196 |
os=netbsd
|
207 | 197 |
;;
|
208 | 198 |
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
|
216 | 199 |
# The OS release
|
217 | 200 |
# Debian GNU/NetBSD machines have a different userland, and
|
218 | 201 |
# thus, need a distinct triplet. However, they do not need
|
|
223 | 206 |
release='-gnu'
|
224 | 207 |
;;
|
225 | 208 |
*)
|
226 | |
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
|
|
209 |
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
227 | 210 |
;;
|
228 | 211 |
esac
|
229 | 212 |
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
230 | 213 |
# contains redundant information, the shorter form:
|
231 | 214 |
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
232 | |
echo "${machine}-${os}${release}${abi}"
|
|
215 |
echo "${machine}-${os}${release}"
|
233 | 216 |
exit ;;
|
234 | 217 |
*:Bitrig:*:*)
|
235 | 218 |
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
|
239 | 222 |
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
240 | 223 |
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
241 | 224 |
exit ;;
|
242 | |
*:LibertyBSD:*:*)
|
243 | |
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
|
244 | |
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
|
245 | |
exit ;;
|
246 | 225 |
*:ekkoBSD:*:*)
|
247 | 226 |
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
248 | 227 |
exit ;;
|
|
254 | 233 |
exit ;;
|
255 | 234 |
*:MirBSD:*:*)
|
256 | 235 |
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
257 | |
exit ;;
|
258 | |
*:Sortix:*:*)
|
259 | |
echo ${UNAME_MACHINE}-unknown-sortix
|
260 | 236 |
exit ;;
|
261 | 237 |
alpha:OSF1:*:*)
|
262 | 238 |
case $UNAME_RELEASE in
|
|
274 | 250 |
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
275 | 251 |
case "$ALPHA_CPU_TYPE" in
|
276 | 252 |
"EV4 (21064)")
|
277 | |
UNAME_MACHINE=alpha ;;
|
|
253 |
UNAME_MACHINE="alpha" ;;
|
278 | 254 |
"EV4.5 (21064)")
|
279 | |
UNAME_MACHINE=alpha ;;
|
|
255 |
UNAME_MACHINE="alpha" ;;
|
280 | 256 |
"LCA4 (21066/21068)")
|
281 | |
UNAME_MACHINE=alpha ;;
|
|
257 |
UNAME_MACHINE="alpha" ;;
|
282 | 258 |
"EV5 (21164)")
|
283 | |
UNAME_MACHINE=alphaev5 ;;
|
|
259 |
UNAME_MACHINE="alphaev5" ;;
|
284 | 260 |
"EV5.6 (21164A)")
|
285 | |
UNAME_MACHINE=alphaev56 ;;
|
|
261 |
UNAME_MACHINE="alphaev56" ;;
|
286 | 262 |
"EV5.6 (21164PC)")
|
287 | |
UNAME_MACHINE=alphapca56 ;;
|
|
263 |
UNAME_MACHINE="alphapca56" ;;
|
288 | 264 |
"EV5.7 (21164PC)")
|
289 | |
UNAME_MACHINE=alphapca57 ;;
|
|
265 |
UNAME_MACHINE="alphapca57" ;;
|
290 | 266 |
"EV6 (21264)")
|
291 | |
UNAME_MACHINE=alphaev6 ;;
|
|
267 |
UNAME_MACHINE="alphaev6" ;;
|
292 | 268 |
"EV6.7 (21264A)")
|
293 | |
UNAME_MACHINE=alphaev67 ;;
|
|
269 |
UNAME_MACHINE="alphaev67" ;;
|
294 | 270 |
"EV6.8CB (21264C)")
|
295 | |
UNAME_MACHINE=alphaev68 ;;
|
|
271 |
UNAME_MACHINE="alphaev68" ;;
|
296 | 272 |
"EV6.8AL (21264B)")
|
297 | |
UNAME_MACHINE=alphaev68 ;;
|
|
273 |
UNAME_MACHINE="alphaev68" ;;
|
298 | 274 |
"EV6.8CX (21264D)")
|
299 | |
UNAME_MACHINE=alphaev68 ;;
|
|
275 |
UNAME_MACHINE="alphaev68" ;;
|
300 | 276 |
"EV6.9A (21264/EV69A)")
|
301 | |
UNAME_MACHINE=alphaev69 ;;
|
|
277 |
UNAME_MACHINE="alphaev69" ;;
|
302 | 278 |
"EV7 (21364)")
|
303 | |
UNAME_MACHINE=alphaev7 ;;
|
|
279 |
UNAME_MACHINE="alphaev7" ;;
|
304 | 280 |
"EV7.9 (21364A)")
|
305 | |
UNAME_MACHINE=alphaev79 ;;
|
|
281 |
UNAME_MACHINE="alphaev79" ;;
|
306 | 282 |
esac
|
307 | 283 |
# A Pn.n version is a patched version.
|
308 | 284 |
# A Vn.n version is a released version.
|
309 | 285 |
# A Tn.n version is a released field test version.
|
310 | 286 |
# A Xn.n version is an unreleased experimental baselevel.
|
311 | 287 |
# 1.2 uses "1.2" for uname -r.
|
312 | |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
|
288 |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
313 | 289 |
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
314 | 290 |
exitcode=$?
|
315 | 291 |
trap '' 0
|
|
382 | 358 |
exit ;;
|
383 | 359 |
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
384 | 360 |
eval $set_cc_for_build
|
385 | |
SUN_ARCH=i386
|
|
361 |
SUN_ARCH="i386"
|
386 | 362 |
# If there is a compiler, see if it is configured for 64-bit objects.
|
387 | 363 |
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
388 | 364 |
# This test works for both compilers.
|
389 | |
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
|
365 |
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
390 | 366 |
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
391 | |
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
367 |
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
392 | 368 |
grep IS_64BIT_ARCH >/dev/null
|
393 | 369 |
then
|
394 | |
SUN_ARCH=x86_64
|
|
370 |
SUN_ARCH="x86_64"
|
395 | 371 |
fi
|
396 | 372 |
fi
|
397 | 373 |
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
|
416 | 392 |
exit ;;
|
417 | 393 |
sun*:*:4.2BSD:*)
|
418 | 394 |
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
419 | |
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
|
|
395 |
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
420 | 396 |
case "`/bin/arch`" in
|
421 | 397 |
sun3)
|
422 | 398 |
echo m68k-sun-sunos${UNAME_RELEASE}
|
|
602 | 578 |
else
|
603 | 579 |
IBM_ARCH=powerpc
|
604 | 580 |
fi
|
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/`
|
|
581 |
if [ -x /usr/bin/oslevel ] ; then
|
|
582 |
IBM_REV=`/usr/bin/oslevel`
|
608 | 583 |
else
|
609 | 584 |
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
610 | 585 |
fi
|
|
641 | 616 |
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
642 | 617 |
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
643 | 618 |
case "${sc_cpu_version}" in
|
644 | |
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
|
645 | |
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
|
|
619 |
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
|
620 |
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
646 | 621 |
532) # CPU_PA_RISC2_0
|
647 | 622 |
case "${sc_kernel_bits}" in
|
648 | |
32) HP_ARCH=hppa2.0n ;;
|
649 | |
64) HP_ARCH=hppa2.0w ;;
|
650 | |
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
|
|
623 |
32) HP_ARCH="hppa2.0n" ;;
|
|
624 |
64) HP_ARCH="hppa2.0w" ;;
|
|
625 |
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
651 | 626 |
esac ;;
|
652 | 627 |
esac
|
653 | 628 |
fi
|
|
686 | 661 |
exit (0);
|
687 | 662 |
}
|
688 | 663 |
EOF
|
689 | |
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
|
664 |
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
690 | 665 |
test -z "$HP_ARCH" && HP_ARCH=hppa
|
691 | 666 |
fi ;;
|
692 | 667 |
esac
|
693 | |
if [ ${HP_ARCH} = hppa2.0w ]
|
|
668 |
if [ ${HP_ARCH} = "hppa2.0w" ]
|
694 | 669 |
then
|
695 | 670 |
eval $set_cc_for_build
|
696 | 671 |
|
|
703 | 678 |
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
|
704 | 679 |
# => hppa64-hp-hpux11.23
|
705 | 680 |
|
706 | |
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
|
|
681 |
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
707 | 682 |
grep -q __LP64__
|
708 | 683 |
then
|
709 | |
HP_ARCH=hppa2.0w
|
|
684 |
HP_ARCH="hppa2.0w"
|
710 | 685 |
else
|
711 | |
HP_ARCH=hppa64
|
|
686 |
HP_ARCH="hppa64"
|
712 | 687 |
fi
|
713 | 688 |
fi
|
714 | 689 |
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
|
813 | 788 |
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
814 | 789 |
exit ;;
|
815 | 790 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
816 | |
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
817 | |
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
|
791 |
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
|
792 |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
818 | 793 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
819 | 794 |
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
820 | 795 |
exit ;;
|
821 | 796 |
5000:UNIX_System_V:4.*:*)
|
822 | |
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
823 | |
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
|
|
797 |
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
|
798 |
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
824 | 799 |
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
825 | 800 |
exit ;;
|
826 | 801 |
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
|
850 | 825 |
*:MINGW*:*)
|
851 | 826 |
echo ${UNAME_MACHINE}-pc-mingw32
|
852 | 827 |
exit ;;
|
853 | |
*:MSYS*:*)
|
|
828 |
i*:MSYS*:*)
|
854 | 829 |
echo ${UNAME_MACHINE}-pc-msys
|
855 | 830 |
exit ;;
|
856 | 831 |
i*:windows32*:*)
|
|
902 | 877 |
exit ;;
|
903 | 878 |
*:GNU/*:*:*)
|
904 | 879 |
# other systems with GNU libc and userland
|
905 | |
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
|
880 |
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
906 | 881 |
exit ;;
|
907 | 882 |
i*86:Minix:*:*)
|
908 | 883 |
echo ${UNAME_MACHINE}-pc-minix
|
|
925 | 900 |
EV68*) UNAME_MACHINE=alphaev68 ;;
|
926 | 901 |
esac
|
927 | 902 |
objdump --private-headers /bin/sh | grep -q ld.so.1
|
928 | |
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
|
|
903 |
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
929 | 904 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
930 | 905 |
exit ;;
|
931 | 906 |
arc:Linux:*:* | arceb:Linux:*:*)
|
|
956 | 931 |
crisv32:Linux:*:*)
|
957 | 932 |
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
958 | 933 |
exit ;;
|
959 | |
e2k:Linux:*:*)
|
960 | |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
961 | |
exit ;;
|
962 | 934 |
frv:Linux:*:*)
|
963 | 935 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
964 | 936 |
exit ;;
|
|
969 | 941 |
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
970 | 942 |
exit ;;
|
971 | 943 |
ia64:Linux:*:*)
|
972 | |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
973 | |
exit ;;
|
974 | |
k1om:Linux:*:*)
|
975 | 944 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
976 | 945 |
exit ;;
|
977 | 946 |
m32r*:Linux:*:*)
|
|
999 | 968 |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
1000 | 969 |
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
1001 | 970 |
;;
|
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:*:*)
|
|
971 |
or1k:Linux:*:*)
|
|
972 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
973 |
exit ;;
|
|
974 |
or32:Linux:*:*)
|
1009 | 975 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
1010 | 976 |
exit ;;
|
1011 | 977 |
padre:Linux:*:*)
|
|
1034 | 1000 |
ppcle:Linux:*:*)
|
1035 | 1001 |
echo powerpcle-unknown-linux-${LIBC}
|
1036 | 1002 |
exit ;;
|
1037 | |
riscv32:Linux:*:* | riscv64:Linux:*:*)
|
1038 | |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
1039 | |
exit ;;
|
1040 | 1003 |
s390:Linux:*:* | s390x:Linux:*:*)
|
1041 | 1004 |
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
1042 | 1005 |
exit ;;
|
|
1056 | 1019 |
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
1057 | 1020 |
exit ;;
|
1058 | 1021 |
x86_64:Linux:*:*)
|
1059 | |
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
|
1022 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
1060 | 1023 |
exit ;;
|
1061 | 1024 |
xtensa*:Linux:*:*)
|
1062 | 1025 |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
1135 | 1098 |
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
1136 | 1099 |
# the processor, so we play safe by assuming i586.
|
1137 | 1100 |
# Note: whatever this is, it MUST be the same as what config.sub
|
1138 | |
# prints for the "djgpp" host, or else GDB configure will decide that
|
|
1101 |
# prints for the "djgpp" host, or else GDB configury will decide that
|
1139 | 1102 |
# this is a cross-build.
|
1140 | 1103 |
echo i586-pc-msdosdjgpp
|
1141 | 1104 |
exit ;;
|
|
1284 | 1247 |
SX-8R:SUPER-UX:*:*)
|
1285 | 1248 |
echo sx8r-nec-superux${UNAME_RELEASE}
|
1286 | 1249 |
exit ;;
|
1287 | |
SX-ACE:SUPER-UX:*:*)
|
1288 | |
echo sxace-nec-superux${UNAME_RELEASE}
|
1289 | |
exit ;;
|
1290 | 1250 |
Power*:Rhapsody:*:*)
|
1291 | 1251 |
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
1292 | 1252 |
exit ;;
|
|
1299 | 1259 |
if test "$UNAME_PROCESSOR" = unknown ; then
|
1300 | 1260 |
UNAME_PROCESSOR=powerpc
|
1301 | 1261 |
fi
|
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
|
|
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
|
1313 | 1271 |
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
|
1322 | 1272 |
fi
|
1323 | 1273 |
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
1324 | 1274 |
exit ;;
|
1325 | 1275 |
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
1326 | 1276 |
UNAME_PROCESSOR=`uname -p`
|
1327 | |
if test "$UNAME_PROCESSOR" = x86; then
|
|
1277 |
if test "$UNAME_PROCESSOR" = "x86"; then
|
1328 | 1278 |
UNAME_PROCESSOR=i386
|
1329 | 1279 |
UNAME_MACHINE=pc
|
1330 | 1280 |
fi
|
|
1355 | 1305 |
# "uname -m" is not consistent, so use $cputype instead. 386
|
1356 | 1306 |
# is converted to i386 for consistency with other x86
|
1357 | 1307 |
# operating systems.
|
1358 | |
if test "$cputype" = 386; then
|
|
1308 |
if test "$cputype" = "386"; then
|
1359 | 1309 |
UNAME_MACHINE=i386
|
1360 | 1310 |
else
|
1361 | 1311 |
UNAME_MACHINE="$cputype"
|
|
1397 | 1347 |
echo i386-pc-xenix
|
1398 | 1348 |
exit ;;
|
1399 | 1349 |
i*86:skyos:*:*)
|
1400 | |
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
|
|
1350 |
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
|
1401 | 1351 |
exit ;;
|
1402 | 1352 |
i*86:rdos:*:*)
|
1403 | 1353 |
echo ${UNAME_MACHINE}-pc-rdos
|
|
1408 | 1358 |
x86_64:VMkernel:*:*)
|
1409 | 1359 |
echo ${UNAME_MACHINE}-unknown-esx
|
1410 | 1360 |
exit ;;
|
1411 | |
amd64:Isilon\ OneFS:*:*)
|
1412 | |
echo x86_64-unknown-onefs
|
1413 | |
exit ;;
|
1414 | 1361 |
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
|
1415 | 1510 |
|
1416 | 1511 |
cat >&2 <<EOF
|
1417 | 1512 |
$0: unable to guess system type
|
1418 | 1513 |
|
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
|
|
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
|
1424 | 1519 |
and
|
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.
|
|
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.
|
1430 | 1526 |
|
1431 | 1527 |
config.guess timestamp = $timestamp
|
1432 | 1528 |
|