Mercurial > mxe-octave
comparison tools/config.guess @ 4459:698a649c0375
sync config.guess and config.sub from upstream
* config.guess: Update from upstream config repo.
* config.sub: Likewise.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 31 Aug 2017 15:49:33 -0700 |
parents | 4f9b72cf7ee7 |
children |
comparison
equal
deleted
inserted
replaced
4458:8f0a309bf280 | 4459:698a649c0375 |
---|---|
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-2013 Free Software Foundation, Inc. | 3 # Copyright 1992-2017 Free Software Foundation, Inc. |
4 | 4 |
5 timestamp='2013-02-12' | 5 timestamp='2017-08-08' |
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. |
22 # configuration script generated by Autoconf, you may include it under | 22 # configuration script generated by Autoconf, you may include it under |
23 # the same distribution terms that you use for the rest of that | 23 # the same distribution terms that you use for the rest of that |
24 # program. This Exception is an additional permission under section 7 | 24 # program. This Exception is an additional permission under section 7 |
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. | 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 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | 30 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess |
31 # | 31 # |
32 # Please send patches with a ChangeLog entry to config-patches@gnu.org. | 32 # Please send patches to <config-patches@gnu.org>. |
33 | 33 |
34 | 34 |
35 me=`echo "$0" | sed -e 's,.*/,,'` | 35 me=`echo "$0" | sed -e 's,.*/,,'` |
36 | 36 |
37 usage="\ | 37 usage="\ |
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-2013 Free Software Foundation, Inc. | 53 Copyright 1992-2017 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=" |
130 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | 130 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
131 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | 131 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
132 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | 132 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
133 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | 133 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
134 | 134 |
135 case "${UNAME_SYSTEM}" in | |
136 Linux|GNU|GNU/*) | |
137 # If the system lacks a compiler, then just pick glibc. | |
138 # We could probably try harder. | |
139 LIBC=gnu | |
140 | |
141 eval $set_cc_for_build | |
142 cat <<-EOF > $dummy.c | |
143 #include <features.h> | |
144 #if defined(__UCLIBC__) | |
145 LIBC=uclibc | |
146 #elif defined(__dietlibc__) | |
147 LIBC=dietlibc | |
148 #else | |
149 LIBC=gnu | |
150 #endif | |
151 EOF | |
152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` | |
153 ;; | |
154 esac | |
155 | |
135 # Note: order is significant - the case branches are not exclusive. | 156 # Note: order is significant - the case branches are not exclusive. |
136 | 157 |
137 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | 158 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
138 *:NetBSD:*:*) | 159 *:NetBSD:*:*) |
139 # NetBSD (nbsd) targets should (where applicable) match one or | 160 # NetBSD (nbsd) targets should (where applicable) match one or |
145 # object file format. | 166 # object file format. |
146 # | 167 # |
147 # Note: NetBSD doesn't particularly care about the vendor | 168 # Note: NetBSD doesn't particularly care about the vendor |
148 # portion of the name. We always set it to "unknown". | 169 # portion of the name. We always set it to "unknown". |
149 sysctl="sysctl -n hw.machine_arch" | 170 sysctl="sysctl -n hw.machine_arch" |
150 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | 171 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
151 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | 172 /sbin/$sysctl 2>/dev/null || \ |
173 /usr/sbin/$sysctl 2>/dev/null || \ | |
174 echo unknown)` | |
152 case "${UNAME_MACHINE_ARCH}" in | 175 case "${UNAME_MACHINE_ARCH}" in |
153 armeb) machine=armeb-unknown ;; | 176 armeb) machine=armeb-unknown ;; |
154 arm*) machine=arm-unknown ;; | 177 arm*) machine=arm-unknown ;; |
155 sh3el) machine=shl-unknown ;; | 178 sh3el) machine=shl-unknown ;; |
156 sh3eb) machine=sh-unknown ;; | 179 sh3eb) machine=sh-unknown ;; |
157 sh5el) machine=sh5le-unknown ;; | 180 sh5el) machine=sh5le-unknown ;; |
181 earmv*) | |
182 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` | |
183 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` | |
184 machine=${arch}${endian}-unknown | |
185 ;; | |
158 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | 186 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
159 esac | 187 esac |
160 # The Operating System including object format, if it has switched | 188 # The Operating System including object format, if it has switched |
161 # to ELF recently, or will in the future. | 189 # to ELF recently (or will in the future) and ABI. |
162 case "${UNAME_MACHINE_ARCH}" in | 190 case "${UNAME_MACHINE_ARCH}" in |
191 earm*) | |
192 os=netbsdelf | |
193 ;; | |
163 arm*|i386|m68k|ns32k|sh3*|sparc|vax) | 194 arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
164 eval $set_cc_for_build | 195 eval $set_cc_for_build |
165 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | 196 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
166 | grep -q __ELF__ | 197 | grep -q __ELF__ |
167 then | 198 then |
174 ;; | 205 ;; |
175 *) | 206 *) |
176 os=netbsd | 207 os=netbsd |
177 ;; | 208 ;; |
178 esac | 209 esac |
210 # Determine ABI tags. | |
211 case "${UNAME_MACHINE_ARCH}" in | |
212 earm*) | |
213 expr='s/^earmv[0-9]/-eabi/;s/eb$//' | |
214 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` | |
215 ;; | |
216 esac | |
179 # The OS release | 217 # The OS release |
180 # Debian GNU/NetBSD machines have a different userland, and | 218 # Debian GNU/NetBSD machines have a different userland, and |
181 # thus, need a distinct triplet. However, they do not need | 219 # thus, need a distinct triplet. However, they do not need |
182 # kernel version information, so it can be replaced with a | 220 # kernel version information, so it can be replaced with a |
183 # suitable tag, in the style of linux-gnu. | 221 # suitable tag, in the style of linux-gnu. |
184 case "${UNAME_VERSION}" in | 222 case "${UNAME_VERSION}" in |
185 Debian*) | 223 Debian*) |
186 release='-gnu' | 224 release='-gnu' |
187 ;; | 225 ;; |
188 *) | 226 *) |
189 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | 227 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` |
190 ;; | 228 ;; |
191 esac | 229 esac |
192 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | 230 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
193 # contains redundant information, the shorter form: | 231 # contains redundant information, the shorter form: |
194 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | 232 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
195 echo "${machine}-${os}${release}" | 233 echo "${machine}-${os}${release}${abi}" |
196 exit ;; | 234 exit ;; |
197 *:Bitrig:*:*) | 235 *:Bitrig:*:*) |
198 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` | 236 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
199 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} | 237 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} |
200 exit ;; | 238 exit ;; |
201 *:OpenBSD:*:*) | 239 *:OpenBSD:*:*) |
202 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` | 240 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
203 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | 241 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} |
204 exit ;; | 242 exit ;; |
243 *:LibertyBSD:*:*) | |
244 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` | |
245 echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} | |
246 exit ;; | |
205 *:ekkoBSD:*:*) | 247 *:ekkoBSD:*:*) |
206 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | 248 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} |
207 exit ;; | 249 exit ;; |
208 *:SolidBSD:*:*) | 250 *:SolidBSD:*:*) |
209 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | 251 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} |
211 macppc:MirBSD:*:*) | 253 macppc:MirBSD:*:*) |
212 echo powerpc-unknown-mirbsd${UNAME_RELEASE} | 254 echo powerpc-unknown-mirbsd${UNAME_RELEASE} |
213 exit ;; | 255 exit ;; |
214 *:MirBSD:*:*) | 256 *:MirBSD:*:*) |
215 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | 257 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} |
258 exit ;; | |
259 *:Sortix:*:*) | |
260 echo ${UNAME_MACHINE}-unknown-sortix | |
261 exit ;; | |
262 *:Redox:*:*) | |
263 echo ${UNAME_MACHINE}-unknown-redox | |
216 exit ;; | 264 exit ;; |
217 alpha:OSF1:*:*) | 265 alpha:OSF1:*:*) |
218 case $UNAME_RELEASE in | 266 case $UNAME_RELEASE in |
219 *4.0) | 267 *4.0) |
220 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | 268 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
228 # covers most systems running today. This code pipes the CPU | 276 # covers most systems running today. This code pipes the CPU |
229 # types through head -n 1, so we only detect the type of CPU 0. | 277 # types through head -n 1, so we only detect the type of CPU 0. |
230 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | 278 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
231 case "$ALPHA_CPU_TYPE" in | 279 case "$ALPHA_CPU_TYPE" in |
232 "EV4 (21064)") | 280 "EV4 (21064)") |
233 UNAME_MACHINE="alpha" ;; | 281 UNAME_MACHINE=alpha ;; |
234 "EV4.5 (21064)") | 282 "EV4.5 (21064)") |
235 UNAME_MACHINE="alpha" ;; | 283 UNAME_MACHINE=alpha ;; |
236 "LCA4 (21066/21068)") | 284 "LCA4 (21066/21068)") |
237 UNAME_MACHINE="alpha" ;; | 285 UNAME_MACHINE=alpha ;; |
238 "EV5 (21164)") | 286 "EV5 (21164)") |
239 UNAME_MACHINE="alphaev5" ;; | 287 UNAME_MACHINE=alphaev5 ;; |
240 "EV5.6 (21164A)") | 288 "EV5.6 (21164A)") |
241 UNAME_MACHINE="alphaev56" ;; | 289 UNAME_MACHINE=alphaev56 ;; |
242 "EV5.6 (21164PC)") | 290 "EV5.6 (21164PC)") |
243 UNAME_MACHINE="alphapca56" ;; | 291 UNAME_MACHINE=alphapca56 ;; |
244 "EV5.7 (21164PC)") | 292 "EV5.7 (21164PC)") |
245 UNAME_MACHINE="alphapca57" ;; | 293 UNAME_MACHINE=alphapca57 ;; |
246 "EV6 (21264)") | 294 "EV6 (21264)") |
247 UNAME_MACHINE="alphaev6" ;; | 295 UNAME_MACHINE=alphaev6 ;; |
248 "EV6.7 (21264A)") | 296 "EV6.7 (21264A)") |
249 UNAME_MACHINE="alphaev67" ;; | 297 UNAME_MACHINE=alphaev67 ;; |
250 "EV6.8CB (21264C)") | 298 "EV6.8CB (21264C)") |
251 UNAME_MACHINE="alphaev68" ;; | 299 UNAME_MACHINE=alphaev68 ;; |
252 "EV6.8AL (21264B)") | 300 "EV6.8AL (21264B)") |
253 UNAME_MACHINE="alphaev68" ;; | 301 UNAME_MACHINE=alphaev68 ;; |
254 "EV6.8CX (21264D)") | 302 "EV6.8CX (21264D)") |
255 UNAME_MACHINE="alphaev68" ;; | 303 UNAME_MACHINE=alphaev68 ;; |
256 "EV6.9A (21264/EV69A)") | 304 "EV6.9A (21264/EV69A)") |
257 UNAME_MACHINE="alphaev69" ;; | 305 UNAME_MACHINE=alphaev69 ;; |
258 "EV7 (21364)") | 306 "EV7 (21364)") |
259 UNAME_MACHINE="alphaev7" ;; | 307 UNAME_MACHINE=alphaev7 ;; |
260 "EV7.9 (21364A)") | 308 "EV7.9 (21364A)") |
261 UNAME_MACHINE="alphaev79" ;; | 309 UNAME_MACHINE=alphaev79 ;; |
262 esac | 310 esac |
263 # A Pn.n version is a patched version. | 311 # A Pn.n version is a patched version. |
264 # A Vn.n version is a released version. | 312 # A Vn.n version is a released version. |
265 # A Tn.n version is a released field test version. | 313 # A Tn.n version is a released field test version. |
266 # A Xn.n version is an unreleased experimental baselevel. | 314 # A Xn.n version is an unreleased experimental baselevel. |
267 # 1.2 uses "1.2" for uname -r. | 315 # 1.2 uses "1.2" for uname -r. |
268 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 316 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
269 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | 317 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
270 exitcode=$? | 318 exitcode=$? |
271 trap '' 0 | 319 trap '' 0 |
272 exit $exitcode ;; | 320 exit $exitcode ;; |
273 Alpha\ *:Windows_NT*:*) | 321 Alpha\ *:Windows_NT*:*) |
336 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | 384 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
337 echo i386-pc-auroraux${UNAME_RELEASE} | 385 echo i386-pc-auroraux${UNAME_RELEASE} |
338 exit ;; | 386 exit ;; |
339 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | 387 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
340 eval $set_cc_for_build | 388 eval $set_cc_for_build |
341 SUN_ARCH="i386" | 389 SUN_ARCH=i386 |
342 # If there is a compiler, see if it is configured for 64-bit objects. | 390 # If there is a compiler, see if it is configured for 64-bit objects. |
343 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | 391 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
344 # This test works for both compilers. | 392 # This test works for both compilers. |
345 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | 393 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
346 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | 394 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
347 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | 395 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
348 grep IS_64BIT_ARCH >/dev/null | 396 grep IS_64BIT_ARCH >/dev/null |
349 then | 397 then |
350 SUN_ARCH="x86_64" | 398 SUN_ARCH=x86_64 |
351 fi | 399 fi |
352 fi | 400 fi |
353 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 401 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
354 exit ;; | 402 exit ;; |
355 sun4*:SunOS:6*:*) | 403 sun4*:SunOS:6*:*) |
370 sun3*:SunOS:*:*) | 418 sun3*:SunOS:*:*) |
371 echo m68k-sun-sunos${UNAME_RELEASE} | 419 echo m68k-sun-sunos${UNAME_RELEASE} |
372 exit ;; | 420 exit ;; |
373 sun*:*:4.2BSD:*) | 421 sun*:*:4.2BSD:*) |
374 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | 422 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
375 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | 423 test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 |
376 case "`/bin/arch`" in | 424 case "`/bin/arch`" in |
377 sun3) | 425 sun3) |
378 echo m68k-sun-sunos${UNAME_RELEASE} | 426 echo m68k-sun-sunos${UNAME_RELEASE} |
379 ;; | 427 ;; |
380 sun4) | 428 sun4) |
556 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | 604 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
557 IBM_ARCH=rs6000 | 605 IBM_ARCH=rs6000 |
558 else | 606 else |
559 IBM_ARCH=powerpc | 607 IBM_ARCH=powerpc |
560 fi | 608 fi |
561 if [ -x /usr/bin/oslevel ] ; then | 609 if [ -x /usr/bin/lslpp ] ; then |
562 IBM_REV=`/usr/bin/oslevel` | 610 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | |
611 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` | |
563 else | 612 else |
564 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | 613 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
565 fi | 614 fi |
566 echo ${IBM_ARCH}-ibm-aix${IBM_REV} | 615 echo ${IBM_ARCH}-ibm-aix${IBM_REV} |
567 exit ;; | 616 exit ;; |
594 9000/[678][0-9][0-9]) | 643 9000/[678][0-9][0-9]) |
595 if [ -x /usr/bin/getconf ]; then | 644 if [ -x /usr/bin/getconf ]; then |
596 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | 645 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
597 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | 646 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
598 case "${sc_cpu_version}" in | 647 case "${sc_cpu_version}" in |
599 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | 648 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
600 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | 649 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
601 532) # CPU_PA_RISC2_0 | 650 532) # CPU_PA_RISC2_0 |
602 case "${sc_kernel_bits}" in | 651 case "${sc_kernel_bits}" in |
603 32) HP_ARCH="hppa2.0n" ;; | 652 32) HP_ARCH=hppa2.0n ;; |
604 64) HP_ARCH="hppa2.0w" ;; | 653 64) HP_ARCH=hppa2.0w ;; |
605 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | 654 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
606 esac ;; | 655 esac ;; |
607 esac | 656 esac |
608 fi | 657 fi |
609 if [ "${HP_ARCH}" = "" ]; then | 658 if [ "${HP_ARCH}" = "" ]; then |
610 eval $set_cc_for_build | 659 eval $set_cc_for_build |
639 default: puts ("hppa1.0"); break; | 688 default: puts ("hppa1.0"); break; |
640 } | 689 } |
641 exit (0); | 690 exit (0); |
642 } | 691 } |
643 EOF | 692 EOF |
644 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | 693 (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
645 test -z "$HP_ARCH" && HP_ARCH=hppa | 694 test -z "$HP_ARCH" && HP_ARCH=hppa |
646 fi ;; | 695 fi ;; |
647 esac | 696 esac |
648 if [ ${HP_ARCH} = "hppa2.0w" ] | 697 if [ ${HP_ARCH} = hppa2.0w ] |
649 then | 698 then |
650 eval $set_cc_for_build | 699 eval $set_cc_for_build |
651 | 700 |
652 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating | 701 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
653 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler | 702 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
656 # $ CC_FOR_BUILD=cc ./config.guess | 705 # $ CC_FOR_BUILD=cc ./config.guess |
657 # => hppa2.0w-hp-hpux11.23 | 706 # => hppa2.0w-hp-hpux11.23 |
658 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess | 707 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
659 # => hppa64-hp-hpux11.23 | 708 # => hppa64-hp-hpux11.23 |
660 | 709 |
661 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | 710 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | |
662 grep -q __LP64__ | 711 grep -q __LP64__ |
663 then | 712 then |
664 HP_ARCH="hppa2.0w" | 713 HP_ARCH=hppa2.0w |
665 else | 714 else |
666 HP_ARCH="hppa64" | 715 HP_ARCH=hppa64 |
667 fi | 716 fi |
668 fi | 717 fi |
669 echo ${HP_ARCH}-hp-hpux${HPUX_REV} | 718 echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
670 exit ;; | 719 exit ;; |
671 ia64:HP-UX:*:*) | 720 ia64:HP-UX:*:*) |
766 exit ;; | 815 exit ;; |
767 *:UNICOS/mp:*:*) | 816 *:UNICOS/mp:*:*) |
768 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 817 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
769 exit ;; | 818 exit ;; |
770 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | 819 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
771 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 820 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
772 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | 821 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
773 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | 822 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
774 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 823 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
775 exit ;; | 824 exit ;; |
776 5000:UNIX_System_V:4.*:*) | 825 5000:UNIX_System_V:4.*:*) |
777 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | 826 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
778 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | 827 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
779 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 828 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
780 exit ;; | 829 exit ;; |
781 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | 830 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
782 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | 831 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
783 exit ;; | 832 exit ;; |
789 exit ;; | 838 exit ;; |
790 *:FreeBSD:*:*) | 839 *:FreeBSD:*:*) |
791 UNAME_PROCESSOR=`/usr/bin/uname -p` | 840 UNAME_PROCESSOR=`/usr/bin/uname -p` |
792 case ${UNAME_PROCESSOR} in | 841 case ${UNAME_PROCESSOR} in |
793 amd64) | 842 amd64) |
794 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | 843 UNAME_PROCESSOR=x86_64 ;; |
795 *) | 844 i386) |
796 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | 845 UNAME_PROCESSOR=i586 ;; |
797 esac | 846 esac |
847 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | |
798 exit ;; | 848 exit ;; |
799 i*:CYGWIN*:*) | 849 i*:CYGWIN*:*) |
800 echo ${UNAME_MACHINE}-pc-cygwin | 850 echo ${UNAME_MACHINE}-pc-cygwin |
801 exit ;; | 851 exit ;; |
802 *:MINGW64*:*) | 852 *:MINGW64*:*) |
803 echo ${UNAME_MACHINE}-pc-mingw64 | 853 echo ${UNAME_MACHINE}-pc-mingw64 |
804 exit ;; | 854 exit ;; |
805 *:MINGW*:*) | 855 *:MINGW*:*) |
806 echo ${UNAME_MACHINE}-pc-mingw32 | 856 echo ${UNAME_MACHINE}-pc-mingw32 |
807 exit ;; | 857 exit ;; |
808 i*:MSYS*:*) | 858 *:MSYS*:*) |
809 echo ${UNAME_MACHINE}-pc-msys | 859 echo ${UNAME_MACHINE}-pc-msys |
810 exit ;; | 860 exit ;; |
811 i*:windows32*:*) | 861 i*:windows32*:*) |
812 # uname -m includes "-pc" on this system. | 862 # uname -m includes "-pc" on this system. |
813 echo ${UNAME_MACHINE}-mingw32 | 863 echo ${UNAME_MACHINE}-mingw32 |
851 prep*:SunOS:5.*:*) | 901 prep*:SunOS:5.*:*) |
852 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 902 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
853 exit ;; | 903 exit ;; |
854 *:GNU:*:*) | 904 *:GNU:*:*) |
855 # the GNU system | 905 # the GNU system |
856 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | 906 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
857 exit ;; | 907 exit ;; |
858 *:GNU/*:*:*) | 908 *:GNU/*:*:*) |
859 # other systems with GNU libc and userland | 909 # other systems with GNU libc and userland |
860 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu | 910 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} |
861 exit ;; | 911 exit ;; |
862 i*86:Minix:*:*) | 912 i*86:Minix:*:*) |
863 echo ${UNAME_MACHINE}-pc-minix | 913 echo ${UNAME_MACHINE}-pc-minix |
864 exit ;; | 914 exit ;; |
865 aarch64:Linux:*:*) | 915 aarch64:Linux:*:*) |
866 echo ${UNAME_MACHINE}-unknown-linux-gnu | 916 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
867 exit ;; | 917 exit ;; |
868 aarch64_be:Linux:*:*) | 918 aarch64_be:Linux:*:*) |
869 UNAME_MACHINE=aarch64_be | 919 UNAME_MACHINE=aarch64_be |
870 echo ${UNAME_MACHINE}-unknown-linux-gnu | 920 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
871 exit ;; | 921 exit ;; |
872 alpha:Linux:*:*) | 922 alpha:Linux:*:*) |
873 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | 923 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
874 EV5) UNAME_MACHINE=alphaev5 ;; | 924 EV5) UNAME_MACHINE=alphaev5 ;; |
875 EV56) UNAME_MACHINE=alphaev56 ;; | 925 EV56) UNAME_MACHINE=alphaev56 ;; |
878 EV6) UNAME_MACHINE=alphaev6 ;; | 928 EV6) UNAME_MACHINE=alphaev6 ;; |
879 EV67) UNAME_MACHINE=alphaev67 ;; | 929 EV67) UNAME_MACHINE=alphaev67 ;; |
880 EV68*) UNAME_MACHINE=alphaev68 ;; | 930 EV68*) UNAME_MACHINE=alphaev68 ;; |
881 esac | 931 esac |
882 objdump --private-headers /bin/sh | grep -q ld.so.1 | 932 objdump --private-headers /bin/sh | grep -q ld.so.1 |
883 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | 933 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
884 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | 934 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
935 exit ;; | |
936 arc:Linux:*:* | arceb:Linux:*:*) | |
937 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
885 exit ;; | 938 exit ;; |
886 arm*:Linux:*:*) | 939 arm*:Linux:*:*) |
887 eval $set_cc_for_build | 940 eval $set_cc_for_build |
888 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | 941 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
889 | grep -q __ARM_EABI__ | 942 | grep -q __ARM_EABI__ |
890 then | 943 then |
891 echo ${UNAME_MACHINE}-unknown-linux-gnu | 944 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
892 else | 945 else |
893 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | 946 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
894 | grep -q __ARM_PCS_VFP | 947 | grep -q __ARM_PCS_VFP |
895 then | 948 then |
896 echo ${UNAME_MACHINE}-unknown-linux-gnueabi | 949 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi |
897 else | 950 else |
898 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf | 951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf |
899 fi | 952 fi |
900 fi | 953 fi |
901 exit ;; | 954 exit ;; |
902 avr32*:Linux:*:*) | 955 avr32*:Linux:*:*) |
903 echo ${UNAME_MACHINE}-unknown-linux-gnu | 956 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
904 exit ;; | 957 exit ;; |
905 cris:Linux:*:*) | 958 cris:Linux:*:*) |
906 echo ${UNAME_MACHINE}-axis-linux-gnu | 959 echo ${UNAME_MACHINE}-axis-linux-${LIBC} |
907 exit ;; | 960 exit ;; |
908 crisv32:Linux:*:*) | 961 crisv32:Linux:*:*) |
909 echo ${UNAME_MACHINE}-axis-linux-gnu | 962 echo ${UNAME_MACHINE}-axis-linux-${LIBC} |
963 exit ;; | |
964 e2k:Linux:*:*) | |
965 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
910 exit ;; | 966 exit ;; |
911 frv:Linux:*:*) | 967 frv:Linux:*:*) |
912 echo ${UNAME_MACHINE}-unknown-linux-gnu | 968 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
913 exit ;; | 969 exit ;; |
914 hexagon:Linux:*:*) | 970 hexagon:Linux:*:*) |
915 echo ${UNAME_MACHINE}-unknown-linux-gnu | 971 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
916 exit ;; | 972 exit ;; |
917 i*86:Linux:*:*) | 973 i*86:Linux:*:*) |
918 LIBC=gnu | 974 echo ${UNAME_MACHINE}-pc-linux-${LIBC} |
919 eval $set_cc_for_build | |
920 sed 's/^ //' << EOF >$dummy.c | |
921 #ifdef __dietlibc__ | |
922 LIBC=dietlibc | |
923 #endif | |
924 EOF | |
925 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` | |
926 echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | |
927 exit ;; | 975 exit ;; |
928 ia64:Linux:*:*) | 976 ia64:Linux:*:*) |
929 echo ${UNAME_MACHINE}-unknown-linux-gnu | 977 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
978 exit ;; | |
979 k1om:Linux:*:*) | |
980 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
930 exit ;; | 981 exit ;; |
931 m32r*:Linux:*:*) | 982 m32r*:Linux:*:*) |
932 echo ${UNAME_MACHINE}-unknown-linux-gnu | 983 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
933 exit ;; | 984 exit ;; |
934 m68*:Linux:*:*) | 985 m68*:Linux:*:*) |
935 echo ${UNAME_MACHINE}-unknown-linux-gnu | 986 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
936 exit ;; | 987 exit ;; |
937 mips:Linux:*:* | mips64:Linux:*:*) | 988 mips:Linux:*:* | mips64:Linux:*:*) |
938 eval $set_cc_for_build | 989 eval $set_cc_for_build |
939 sed 's/^ //' << EOF >$dummy.c | 990 sed 's/^ //' << EOF >$dummy.c |
940 #undef CPU | 991 #undef CPU |
949 CPU= | 1000 CPU= |
950 #endif | 1001 #endif |
951 #endif | 1002 #endif |
952 EOF | 1003 EOF |
953 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | 1004 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
954 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | 1005 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } |
955 ;; | 1006 ;; |
956 or1k:Linux:*:*) | 1007 mips64el:Linux:*:*) |
957 echo ${UNAME_MACHINE}-unknown-linux-gnu | 1008 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
958 exit ;; | 1009 exit ;; |
959 or32:Linux:*:*) | 1010 openrisc*:Linux:*:*) |
960 echo ${UNAME_MACHINE}-unknown-linux-gnu | 1011 echo or1k-unknown-linux-${LIBC} |
1012 exit ;; | |
1013 or32:Linux:*:* | or1k*:Linux:*:*) | |
1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
961 exit ;; | 1015 exit ;; |
962 padre:Linux:*:*) | 1016 padre:Linux:*:*) |
963 echo sparc-unknown-linux-gnu | 1017 echo sparc-unknown-linux-${LIBC} |
964 exit ;; | 1018 exit ;; |
965 parisc64:Linux:*:* | hppa64:Linux:*:*) | 1019 parisc64:Linux:*:* | hppa64:Linux:*:*) |
966 echo hppa64-unknown-linux-gnu | 1020 echo hppa64-unknown-linux-${LIBC} |
967 exit ;; | 1021 exit ;; |
968 parisc:Linux:*:* | hppa:Linux:*:*) | 1022 parisc:Linux:*:* | hppa:Linux:*:*) |
969 # Look for CPU level | 1023 # Look for CPU level |
970 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | 1024 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
971 PA7*) echo hppa1.1-unknown-linux-gnu ;; | 1025 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; |
972 PA8*) echo hppa2.0-unknown-linux-gnu ;; | 1026 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; |
973 *) echo hppa-unknown-linux-gnu ;; | 1027 *) echo hppa-unknown-linux-${LIBC} ;; |
974 esac | 1028 esac |
975 exit ;; | 1029 exit ;; |
976 ppc64:Linux:*:*) | 1030 ppc64:Linux:*:*) |
977 echo powerpc64-unknown-linux-gnu | 1031 echo powerpc64-unknown-linux-${LIBC} |
978 exit ;; | 1032 exit ;; |
979 ppc:Linux:*:*) | 1033 ppc:Linux:*:*) |
980 echo powerpc-unknown-linux-gnu | 1034 echo powerpc-unknown-linux-${LIBC} |
1035 exit ;; | |
1036 ppc64le:Linux:*:*) | |
1037 echo powerpc64le-unknown-linux-${LIBC} | |
1038 exit ;; | |
1039 ppcle:Linux:*:*) | |
1040 echo powerpcle-unknown-linux-${LIBC} | |
1041 exit ;; | |
1042 riscv32:Linux:*:* | riscv64:Linux:*:*) | |
1043 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
981 exit ;; | 1044 exit ;; |
982 s390:Linux:*:* | s390x:Linux:*:*) | 1045 s390:Linux:*:* | s390x:Linux:*:*) |
983 echo ${UNAME_MACHINE}-ibm-linux | 1046 echo ${UNAME_MACHINE}-ibm-linux-${LIBC} |
984 exit ;; | 1047 exit ;; |
985 sh64*:Linux:*:*) | 1048 sh64*:Linux:*:*) |
986 echo ${UNAME_MACHINE}-unknown-linux-gnu | 1049 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
987 exit ;; | 1050 exit ;; |
988 sh*:Linux:*:*) | 1051 sh*:Linux:*:*) |
989 echo ${UNAME_MACHINE}-unknown-linux-gnu | 1052 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
990 exit ;; | 1053 exit ;; |
991 sparc:Linux:*:* | sparc64:Linux:*:*) | 1054 sparc:Linux:*:* | sparc64:Linux:*:*) |
992 echo ${UNAME_MACHINE}-unknown-linux-gnu | 1055 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
993 exit ;; | 1056 exit ;; |
994 tile*:Linux:*:*) | 1057 tile*:Linux:*:*) |
995 echo ${UNAME_MACHINE}-unknown-linux-gnu | 1058 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
996 exit ;; | 1059 exit ;; |
997 vax:Linux:*:*) | 1060 vax:Linux:*:*) |
998 echo ${UNAME_MACHINE}-dec-linux-gnu | 1061 echo ${UNAME_MACHINE}-dec-linux-${LIBC} |
999 exit ;; | 1062 exit ;; |
1000 x86_64:Linux:*:*) | 1063 x86_64:Linux:*:*) |
1001 echo ${UNAME_MACHINE}-unknown-linux-gnu | 1064 echo ${UNAME_MACHINE}-pc-linux-${LIBC} |
1002 exit ;; | 1065 exit ;; |
1003 xtensa*:Linux:*:*) | 1066 xtensa*:Linux:*:*) |
1004 echo ${UNAME_MACHINE}-unknown-linux-gnu | 1067 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
1005 exit ;; | 1068 exit ;; |
1006 i*86:DYNIX/ptx:4*:*) | 1069 i*86:DYNIX/ptx:4*:*) |
1007 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | 1070 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1008 # earlier versions are messed up and put the nodename in both | 1071 # earlier versions are messed up and put the nodename in both |
1009 # sysname and nodename. | 1072 # sysname and nodename. |
1075 pc:*:*:*) | 1138 pc:*:*:*) |
1076 # Left here for compatibility: | 1139 # Left here for compatibility: |
1077 # uname -m prints for DJGPP always 'pc', but it prints nothing about | 1140 # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1078 # the processor, so we play safe by assuming i586. | 1141 # the processor, so we play safe by assuming i586. |
1079 # Note: whatever this is, it MUST be the same as what config.sub | 1142 # Note: whatever this is, it MUST be the same as what config.sub |
1080 # prints for the "djgpp" host, or else GDB configury will decide that | 1143 # prints for the "djgpp" host, or else GDB configure will decide that |
1081 # this is a cross-build. | 1144 # this is a cross-build. |
1082 echo i586-pc-msdosdjgpp | 1145 echo i586-pc-msdosdjgpp |
1083 exit ;; | 1146 exit ;; |
1084 Intel:Mach:3*:*) | 1147 Intel:Mach:3*:*) |
1085 echo i386-pc-mach3 | 1148 echo i386-pc-mach3 |
1224 echo sx8-nec-superux${UNAME_RELEASE} | 1287 echo sx8-nec-superux${UNAME_RELEASE} |
1225 exit ;; | 1288 exit ;; |
1226 SX-8R:SUPER-UX:*:*) | 1289 SX-8R:SUPER-UX:*:*) |
1227 echo sx8r-nec-superux${UNAME_RELEASE} | 1290 echo sx8r-nec-superux${UNAME_RELEASE} |
1228 exit ;; | 1291 exit ;; |
1292 SX-ACE:SUPER-UX:*:*) | |
1293 echo sxace-nec-superux${UNAME_RELEASE} | |
1294 exit ;; | |
1229 Power*:Rhapsody:*:*) | 1295 Power*:Rhapsody:*:*) |
1230 echo powerpc-apple-rhapsody${UNAME_RELEASE} | 1296 echo powerpc-apple-rhapsody${UNAME_RELEASE} |
1231 exit ;; | 1297 exit ;; |
1232 *:Rhapsody:*:*) | 1298 *:Rhapsody:*:*) |
1233 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | 1299 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
1234 exit ;; | 1300 exit ;; |
1235 *:Darwin:*:*) | 1301 *:Darwin:*:*) |
1236 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | 1302 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
1237 case $UNAME_PROCESSOR in | 1303 eval $set_cc_for_build |
1238 i386) | 1304 if test "$UNAME_PROCESSOR" = unknown ; then |
1239 eval $set_cc_for_build | 1305 UNAME_PROCESSOR=powerpc |
1240 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | 1306 fi |
1241 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | 1307 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then |
1242 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | 1308 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
1243 grep IS_64BIT_ARCH >/dev/null | 1309 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
1244 then | 1310 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
1245 UNAME_PROCESSOR="x86_64" | 1311 grep IS_64BIT_ARCH >/dev/null |
1246 fi | 1312 then |
1247 fi ;; | 1313 case $UNAME_PROCESSOR in |
1248 unknown) UNAME_PROCESSOR=powerpc ;; | 1314 i386) UNAME_PROCESSOR=x86_64 ;; |
1249 esac | 1315 powerpc) UNAME_PROCESSOR=powerpc64 ;; |
1316 esac | |
1317 fi | |
1318 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
1319 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
1320 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1321 grep IS_PPC >/dev/null | |
1322 then | |
1323 UNAME_PROCESSOR=powerpc | |
1324 fi | |
1325 fi | |
1326 elif test "$UNAME_PROCESSOR" = i386 ; then | |
1327 # Avoid executing cc on OS X 10.9, as it ships with a stub | |
1328 # that puts up a graphical alert prompting to install | |
1329 # developer tools. Any system running Mac OS X 10.7 or | |
1330 # later (Darwin 11 and later) is required to have a 64-bit | |
1331 # processor. This is not true of the ARM version of Darwin | |
1332 # that Apple uses in portable devices. | |
1333 UNAME_PROCESSOR=x86_64 | |
1334 fi | |
1250 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | 1335 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1251 exit ;; | 1336 exit ;; |
1252 *:procnto*:*:* | *:QNX:[0123456789]*:*) | 1337 *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1253 UNAME_PROCESSOR=`uname -p` | 1338 UNAME_PROCESSOR=`uname -p` |
1254 if test "$UNAME_PROCESSOR" = "x86"; then | 1339 if test "$UNAME_PROCESSOR" = x86; then |
1255 UNAME_PROCESSOR=i386 | 1340 UNAME_PROCESSOR=i386 |
1256 UNAME_MACHINE=pc | 1341 UNAME_MACHINE=pc |
1257 fi | 1342 fi |
1258 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | 1343 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
1259 exit ;; | 1344 exit ;; |
1260 *:QNX:*:4*) | 1345 *:QNX:*:4*) |
1261 echo i386-pc-qnx | 1346 echo i386-pc-qnx |
1262 exit ;; | 1347 exit ;; |
1263 NEO-?:NONSTOP_KERNEL:*:*) | 1348 NEO-*:NONSTOP_KERNEL:*:*) |
1264 echo neo-tandem-nsk${UNAME_RELEASE} | 1349 echo neo-tandem-nsk${UNAME_RELEASE} |
1265 exit ;; | 1350 exit ;; |
1266 NSE-*:NONSTOP_KERNEL:*:*) | 1351 NSE-*:NONSTOP_KERNEL:*:*) |
1267 echo nse-tandem-nsk${UNAME_RELEASE} | 1352 echo nse-tandem-nsk${UNAME_RELEASE} |
1268 exit ;; | 1353 exit ;; |
1269 NSR-?:NONSTOP_KERNEL:*:*) | 1354 NSR-*:NONSTOP_KERNEL:*:*) |
1270 echo nsr-tandem-nsk${UNAME_RELEASE} | 1355 echo nsr-tandem-nsk${UNAME_RELEASE} |
1356 exit ;; | |
1357 NSX-*:NONSTOP_KERNEL:*:*) | |
1358 echo nsx-tandem-nsk${UNAME_RELEASE} | |
1271 exit ;; | 1359 exit ;; |
1272 *:NonStop-UX:*:*) | 1360 *:NonStop-UX:*:*) |
1273 echo mips-compaq-nonstopux | 1361 echo mips-compaq-nonstopux |
1274 exit ;; | 1362 exit ;; |
1275 BS2000:POSIX*:*:*) | 1363 BS2000:POSIX*:*:*) |
1280 exit ;; | 1368 exit ;; |
1281 *:Plan9:*:*) | 1369 *:Plan9:*:*) |
1282 # "uname -m" is not consistent, so use $cputype instead. 386 | 1370 # "uname -m" is not consistent, so use $cputype instead. 386 |
1283 # is converted to i386 for consistency with other x86 | 1371 # is converted to i386 for consistency with other x86 |
1284 # operating systems. | 1372 # operating systems. |
1285 if test "$cputype" = "386"; then | 1373 if test "$cputype" = 386; then |
1286 UNAME_MACHINE=i386 | 1374 UNAME_MACHINE=i386 |
1287 else | 1375 else |
1288 UNAME_MACHINE="$cputype" | 1376 UNAME_MACHINE="$cputype" |
1289 fi | 1377 fi |
1290 echo ${UNAME_MACHINE}-unknown-plan9 | 1378 echo ${UNAME_MACHINE}-unknown-plan9 |
1322 esac ;; | 1410 esac ;; |
1323 *:XENIX:*:SysV) | 1411 *:XENIX:*:SysV) |
1324 echo i386-pc-xenix | 1412 echo i386-pc-xenix |
1325 exit ;; | 1413 exit ;; |
1326 i*86:skyos:*:*) | 1414 i*86:skyos:*:*) |
1327 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | 1415 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` |
1328 exit ;; | 1416 exit ;; |
1329 i*86:rdos:*:*) | 1417 i*86:rdos:*:*) |
1330 echo ${UNAME_MACHINE}-pc-rdos | 1418 echo ${UNAME_MACHINE}-pc-rdos |
1331 exit ;; | 1419 exit ;; |
1332 i*86:AROS:*:*) | 1420 i*86:AROS:*:*) |
1333 echo ${UNAME_MACHINE}-pc-aros | 1421 echo ${UNAME_MACHINE}-pc-aros |
1334 exit ;; | 1422 exit ;; |
1335 x86_64:VMkernel:*:*) | 1423 x86_64:VMkernel:*:*) |
1336 echo ${UNAME_MACHINE}-unknown-esx | 1424 echo ${UNAME_MACHINE}-unknown-esx |
1337 exit ;; | 1425 exit ;; |
1426 amd64:Isilon\ OneFS:*:*) | |
1427 echo x86_64-unknown-onefs | |
1428 exit ;; | |
1338 esac | 1429 esac |
1339 | |
1340 eval $set_cc_for_build | |
1341 cat >$dummy.c <<EOF | |
1342 #ifdef _SEQUENT_ | |
1343 # include <sys/types.h> | |
1344 # include <sys/utsname.h> | |
1345 #endif | |
1346 main () | |
1347 { | |
1348 #if defined (sony) | |
1349 #if defined (MIPSEB) | |
1350 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | |
1351 I don't know.... */ | |
1352 printf ("mips-sony-bsd\n"); exit (0); | |
1353 #else | |
1354 #include <sys/param.h> | |
1355 printf ("m68k-sony-newsos%s\n", | |
1356 #ifdef NEWSOS4 | |
1357 "4" | |
1358 #else | |
1359 "" | |
1360 #endif | |
1361 ); exit (0); | |
1362 #endif | |
1363 #endif | |
1364 | |
1365 #if defined (__arm) && defined (__acorn) && defined (__unix) | |
1366 printf ("arm-acorn-riscix\n"); exit (0); | |
1367 #endif | |
1368 | |
1369 #if defined (hp300) && !defined (hpux) | |
1370 printf ("m68k-hp-bsd\n"); exit (0); | |
1371 #endif | |
1372 | |
1373 #if defined (NeXT) | |
1374 #if !defined (__ARCHITECTURE__) | |
1375 #define __ARCHITECTURE__ "m68k" | |
1376 #endif | |
1377 int version; | |
1378 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | |
1379 if (version < 4) | |
1380 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
1381 else | |
1382 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
1383 exit (0); | |
1384 #endif | |
1385 | |
1386 #if defined (MULTIMAX) || defined (n16) | |
1387 #if defined (UMAXV) | |
1388 printf ("ns32k-encore-sysv\n"); exit (0); | |
1389 #else | |
1390 #if defined (CMU) | |
1391 printf ("ns32k-encore-mach\n"); exit (0); | |
1392 #else | |
1393 printf ("ns32k-encore-bsd\n"); exit (0); | |
1394 #endif | |
1395 #endif | |
1396 #endif | |
1397 | |
1398 #if defined (__386BSD__) | |
1399 printf ("i386-pc-bsd\n"); exit (0); | |
1400 #endif | |
1401 | |
1402 #if defined (sequent) | |
1403 #if defined (i386) | |
1404 printf ("i386-sequent-dynix\n"); exit (0); | |
1405 #endif | |
1406 #if defined (ns32000) | |
1407 printf ("ns32k-sequent-dynix\n"); exit (0); | |
1408 #endif | |
1409 #endif | |
1410 | |
1411 #if defined (_SEQUENT_) | |
1412 struct utsname un; | |
1413 | |
1414 uname(&un); | |
1415 | |
1416 if (strncmp(un.version, "V2", 2) == 0) { | |
1417 printf ("i386-sequent-ptx2\n"); exit (0); | |
1418 } | |
1419 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1420 printf ("i386-sequent-ptx1\n"); exit (0); | |
1421 } | |
1422 printf ("i386-sequent-ptx\n"); exit (0); | |
1423 | |
1424 #endif | |
1425 | |
1426 #if defined (vax) | |
1427 # if !defined (ultrix) | |
1428 # include <sys/param.h> | |
1429 # if defined (BSD) | |
1430 # if BSD == 43 | |
1431 printf ("vax-dec-bsd4.3\n"); exit (0); | |
1432 # else | |
1433 # if BSD == 199006 | |
1434 printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1435 # else | |
1436 printf ("vax-dec-bsd\n"); exit (0); | |
1437 # endif | |
1438 # endif | |
1439 # else | |
1440 printf ("vax-dec-bsd\n"); exit (0); | |
1441 # endif | |
1442 # else | |
1443 printf ("vax-dec-ultrix\n"); exit (0); | |
1444 # endif | |
1445 #endif | |
1446 | |
1447 #if defined (alliant) && defined (i860) | |
1448 printf ("i860-alliant-bsd\n"); exit (0); | |
1449 #endif | |
1450 | |
1451 exit (1); | |
1452 } | |
1453 EOF | |
1454 | |
1455 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
1456 { echo "$SYSTEM_NAME"; exit; } | |
1457 | |
1458 # Apollos put the system type in the environment. | |
1459 | |
1460 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } | |
1461 | |
1462 # Convex versions that predate uname can use getsysinfo(1) | |
1463 | |
1464 if [ -x /usr/convex/getsysinfo ] | |
1465 then | |
1466 case `getsysinfo -f cpu_type` in | |
1467 c1*) | |
1468 echo c1-convex-bsd | |
1469 exit ;; | |
1470 c2*) | |
1471 if getsysinfo -f scalar_acc | |
1472 then echo c32-convex-bsd | |
1473 else echo c2-convex-bsd | |
1474 fi | |
1475 exit ;; | |
1476 c34*) | |
1477 echo c34-convex-bsd | |
1478 exit ;; | |
1479 c38*) | |
1480 echo c38-convex-bsd | |
1481 exit ;; | |
1482 c4*) | |
1483 echo c4-convex-bsd | |
1484 exit ;; | |
1485 esac | |
1486 fi | |
1487 | 1430 |
1488 cat >&2 <<EOF | 1431 cat >&2 <<EOF |
1489 $0: unable to guess system type | 1432 $0: unable to guess system type |
1490 | 1433 |
1491 This script, last modified $timestamp, has failed to recognize | 1434 This script (version $timestamp), has failed to recognize the |
1492 the operating system you are using. It is advised that you | 1435 operating system you are using. If your script is old, overwrite *all* |
1493 download the most up to date version of the config scripts from | 1436 copies of config.guess and config.sub with the latest versions from: |
1494 | 1437 |
1495 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | 1438 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess |
1496 and | 1439 and |
1497 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | 1440 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub |
1498 | 1441 |
1499 If the version you run ($0) is already up to date, please | 1442 If $0 has already been updated, send the following data and any |
1500 send the following data and any information you think might be | 1443 information you think might be pertinent to config-patches@gnu.org to |
1501 pertinent to <config-patches@gnu.org> in order to provide the needed | 1444 provide the necessary information to handle your system. |
1502 information to handle your system. | |
1503 | 1445 |
1504 config.guess timestamp = $timestamp | 1446 config.guess timestamp = $timestamp |
1505 | 1447 |
1506 uname -m = `(uname -m) 2>/dev/null || echo unknown` | 1448 uname -m = `(uname -m) 2>/dev/null || echo unknown` |
1507 uname -r = `(uname -r) 2>/dev/null || echo unknown` | 1449 uname -r = `(uname -r) 2>/dev/null || echo unknown` |