1 | #! /bin/sh |
1 | #! /bin/sh |
2 | # Attempt to guess a canonical system name. |
2 | # Attempt to guess a canonical system name. |
3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
3 | # Copyright 1992-2014 Free Software Foundation, Inc. |
4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, |
|
|
5 | # Inc. |
|
|
6 | |
4 | |
7 | timestamp='2007-07-22' |
5 | timestamp='2014-03-23' |
8 | |
6 | |
9 | # 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 |
10 | # 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 |
11 | # the Free Software Foundation; either version 2 of the License, or |
9 | # the Free Software Foundation; either version 3 of the License, or |
12 | # (at your option) any later version. |
10 | # (at your option) any later version. |
13 | # |
11 | # |
14 | # This program is distributed in the hope that it will be useful, but |
12 | # This program is distributed in the hope that it will be useful, but |
15 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 | # General Public License for more details. |
15 | # General Public License for more details. |
18 | # |
16 | # |
19 | # You should have received a copy of the GNU General Public License |
17 | # You should have received a copy of the GNU General Public License |
20 | # along with this program; if not, write to the Free Software |
18 | # along with this program; if not, see <http://www.gnu.org/licenses/>. |
21 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA |
|
|
22 | # 02110-1301, USA. |
|
|
23 | # |
19 | # |
24 | # As a special exception to the GNU General Public License, if you |
20 | # As a special exception to the GNU General Public License, if you |
25 | # distribute this file as part of a program that contains a |
21 | # distribute this file as part of a program that contains a |
26 | # configuration script generated by Autoconf, you may include it under |
22 | # configuration script generated by Autoconf, you may include it under |
27 | # the same distribution terms that you use for the rest of that program. |
23 | # the same distribution terms that you use for the rest of that |
28 | |
24 | # program. This Exception is an additional permission under section 7 |
29 | |
25 | # of the GNU General Public License, version 3 ("GPLv3"). |
30 | # Originally written by Per Bothner <per@bothner.com>. |
|
|
31 | # Please send patches to <config-patches@gnu.org>. Submit a context |
|
|
32 | # diff and a properly formatted ChangeLog entry. |
|
|
33 | # |
26 | # |
34 | # This script attempts to guess a canonical system name similar to |
27 | # Originally written by Per Bothner. |
35 | # config.sub. If it succeeds, it prints the system name on stdout, and |
|
|
36 | # exits with 0. Otherwise, it exits with 1. |
|
|
37 | # |
28 | # |
38 | # The plan is that this can be called by configure scripts if you |
29 | # You can get the latest version of this script from: |
39 | # don't specify an explicit build system type. |
30 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD |
|
|
31 | # |
|
|
32 | # Please send patches with a ChangeLog entry to config-patches@gnu.org. |
|
|
33 | |
40 | |
34 | |
41 | me=`echo "$0" | sed -e 's,.*/,,'` |
35 | me=`echo "$0" | sed -e 's,.*/,,'` |
42 | |
36 | |
43 | usage="\ |
37 | usage="\ |
44 | Usage: $0 [OPTION] |
38 | Usage: $0 [OPTION] |
… | |
… | |
54 | |
48 | |
55 | version="\ |
49 | version="\ |
56 | GNU config.guess ($timestamp) |
50 | GNU config.guess ($timestamp) |
57 | |
51 | |
58 | Originally written by Per Bothner. |
52 | Originally written by Per Bothner. |
59 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
|
|
60 | Free Software Foundation, Inc. |
53 | Copyright 1992-2014 Free Software Foundation, Inc. |
61 | |
54 | |
62 | 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 |
63 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
56 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
64 | |
57 | |
65 | help=" |
58 | help=" |
… | |
… | |
137 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
130 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
138 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
131 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
139 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
132 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
140 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
133 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
141 | |
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 | |
142 | # Note: order is significant - the case branches are not exclusive. |
156 | # Note: order is significant - the case branches are not exclusive. |
143 | |
157 | |
144 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
158 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
145 | *:NetBSD:*:*) |
159 | *:NetBSD:*:*) |
146 | # NetBSD (nbsd) targets should (where applicable) match one or |
160 | # NetBSD (nbsd) targets should (where applicable) match one or |
147 | # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, |
161 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
148 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
162 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
149 | # switched to ELF, *-*-netbsd* would select the old |
163 | # switched to ELF, *-*-netbsd* would select the old |
150 | # object file format. This provides both forward |
164 | # object file format. This provides both forward |
151 | # compatibility and a consistent mechanism for selecting the |
165 | # compatibility and a consistent mechanism for selecting the |
152 | # object file format. |
166 | # object file format. |
… | |
… | |
168 | # to ELF recently, or will in the future. |
182 | # to ELF recently, or will in the future. |
169 | case "${UNAME_MACHINE_ARCH}" in |
183 | case "${UNAME_MACHINE_ARCH}" in |
170 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
184 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
171 | eval $set_cc_for_build |
185 | eval $set_cc_for_build |
172 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
186 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
173 | | grep __ELF__ >/dev/null |
187 | | grep -q __ELF__ |
174 | then |
188 | then |
175 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
189 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
176 | # Return netbsd for either. FIX? |
190 | # Return netbsd for either. FIX? |
177 | os=netbsd |
191 | os=netbsd |
178 | else |
192 | else |
179 | os=netbsdelf |
193 | os=netbsdelf |
180 | fi |
194 | fi |
181 | ;; |
195 | ;; |
182 | *) |
196 | *) |
183 | os=netbsd |
197 | os=netbsd |
184 | ;; |
198 | ;; |
185 | esac |
199 | esac |
186 | # The OS release |
200 | # The OS release |
187 | # Debian GNU/NetBSD machines have a different userland, and |
201 | # Debian GNU/NetBSD machines have a different userland, and |
188 | # thus, need a distinct triplet. However, they do not need |
202 | # thus, need a distinct triplet. However, they do not need |
… | |
… | |
199 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
213 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
200 | # contains redundant information, the shorter form: |
214 | # contains redundant information, the shorter form: |
201 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
215 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
202 | echo "${machine}-${os}${release}" |
216 | echo "${machine}-${os}${release}" |
203 | exit ;; |
217 | exit ;; |
|
|
218 | *:Bitrig:*:*) |
|
|
219 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
|
|
220 | echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} |
|
|
221 | exit ;; |
204 | *:OpenBSD:*:*) |
222 | *:OpenBSD:*:*) |
205 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
223 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
206 | echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} |
224 | echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} |
207 | exit ;; |
225 | exit ;; |
208 | *:ekkoBSD:*:*) |
226 | *:ekkoBSD:*:*) |
… | |
… | |
221 | case $UNAME_RELEASE in |
239 | case $UNAME_RELEASE in |
222 | *4.0) |
240 | *4.0) |
223 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
241 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
224 | ;; |
242 | ;; |
225 | *5.*) |
243 | *5.*) |
226 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` |
244 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` |
227 | ;; |
245 | ;; |
228 | esac |
246 | esac |
229 | # According to Compaq, /usr/sbin/psrinfo has been available on |
247 | # According to Compaq, /usr/sbin/psrinfo has been available on |
230 | # OSF/1 and Tru64 systems produced since 1995. I hope that |
248 | # OSF/1 and Tru64 systems produced since 1995. I hope that |
231 | # covers most systems running today. This code pipes the CPU |
249 | # covers most systems running today. This code pipes the CPU |
… | |
… | |
267 | # A Vn.n version is a released version. |
285 | # A Vn.n version is a released version. |
268 | # A Tn.n version is a released field test version. |
286 | # A Tn.n version is a released field test version. |
269 | # A Xn.n version is an unreleased experimental baselevel. |
287 | # A Xn.n version is an unreleased experimental baselevel. |
270 | # 1.2 uses "1.2" for uname -r. |
288 | # 1.2 uses "1.2" for uname -r. |
271 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
289 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
272 | exit ;; |
290 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
|
|
291 | exitcode=$? |
|
|
292 | trap '' 0 |
|
|
293 | exit $exitcode ;; |
273 | Alpha\ *:Windows_NT*:*) |
294 | Alpha\ *:Windows_NT*:*) |
274 | # How do we know it's Interix rather than the generic POSIX subsystem? |
295 | # How do we know it's Interix rather than the generic POSIX subsystem? |
275 | # Should we change UNAME_MACHINE based on the output of uname instead |
296 | # Should we change UNAME_MACHINE based on the output of uname instead |
276 | # of the specific Alpha model? |
297 | # of the specific Alpha model? |
277 | echo alpha-pc-interix |
298 | echo alpha-pc-interix |
… | |
… | |
293 | exit ;; |
314 | exit ;; |
294 | *:z/VM:*:*) |
315 | *:z/VM:*:*) |
295 | echo s390-ibm-zvmoe |
316 | echo s390-ibm-zvmoe |
296 | exit ;; |
317 | exit ;; |
297 | *:OS400:*:*) |
318 | *:OS400:*:*) |
298 | echo powerpc-ibm-os400 |
319 | echo powerpc-ibm-os400 |
299 | exit ;; |
320 | exit ;; |
300 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
321 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
301 | echo arm-acorn-riscix${UNAME_RELEASE} |
322 | echo arm-acorn-riscix${UNAME_RELEASE} |
302 | exit ;; |
323 | exit ;; |
303 | arm:riscos:*:*|arm:RISCOS:*:*) |
324 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
304 | echo arm-unknown-riscos |
325 | echo arm-unknown-riscos |
305 | exit ;; |
326 | exit ;; |
306 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
327 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
307 | echo hppa1.1-hitachi-hiuxmpp |
328 | echo hppa1.1-hitachi-hiuxmpp |
308 | exit ;; |
329 | exit ;; |
… | |
… | |
322 | exit ;; |
343 | exit ;; |
323 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
344 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
324 | case `/usr/bin/uname -p` in |
345 | case `/usr/bin/uname -p` in |
325 | sparc) echo sparc-icl-nx7; exit ;; |
346 | sparc) echo sparc-icl-nx7; exit ;; |
326 | esac ;; |
347 | esac ;; |
|
|
348 | s390x:SunOS:*:*) |
|
|
349 | echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
|
|
350 | exit ;; |
327 | sun4H:SunOS:5.*:*) |
351 | sun4H:SunOS:5.*:*) |
328 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
352 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
329 | exit ;; |
353 | exit ;; |
330 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
354 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
331 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
355 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
332 | exit ;; |
356 | exit ;; |
|
|
357 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
|
|
358 | echo i386-pc-auroraux${UNAME_RELEASE} |
|
|
359 | exit ;; |
333 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
360 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
|
|
361 | eval $set_cc_for_build |
|
|
362 | SUN_ARCH="i386" |
|
|
363 | # If there is a compiler, see if it is configured for 64-bit objects. |
|
|
364 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
|
|
365 | # This test works for both compilers. |
|
|
366 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then |
|
|
367 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
|
|
368 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
|
|
369 | grep IS_64BIT_ARCH >/dev/null |
|
|
370 | then |
|
|
371 | SUN_ARCH="x86_64" |
|
|
372 | fi |
|
|
373 | fi |
334 | echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
374 | echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
335 | exit ;; |
375 | exit ;; |
336 | sun4*:SunOS:6*:*) |
376 | sun4*:SunOS:6*:*) |
337 | # According to config.sub, this is the proper way to canonicalize |
377 | # According to config.sub, this is the proper way to canonicalize |
338 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
378 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
339 | # it's likely to be more like Solaris than SunOS4. |
379 | # it's likely to be more like Solaris than SunOS4. |
… | |
… | |
373 | # to the lowercase version "mint" (or "freemint"). Finally |
413 | # to the lowercase version "mint" (or "freemint"). Finally |
374 | # the system name "TOS" denotes a system which is actually not |
414 | # the system name "TOS" denotes a system which is actually not |
375 | # MiNT. But MiNT is downward compatible to TOS, so this should |
415 | # MiNT. But MiNT is downward compatible to TOS, so this should |
376 | # be no problem. |
416 | # be no problem. |
377 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
417 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
378 | echo m68k-atari-mint${UNAME_RELEASE} |
418 | echo m68k-atari-mint${UNAME_RELEASE} |
379 | exit ;; |
419 | exit ;; |
380 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
420 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
381 | echo m68k-atari-mint${UNAME_RELEASE} |
421 | echo m68k-atari-mint${UNAME_RELEASE} |
382 | exit ;; |
422 | exit ;; |
383 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
423 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
384 | echo m68k-atari-mint${UNAME_RELEASE} |
424 | echo m68k-atari-mint${UNAME_RELEASE} |
385 | exit ;; |
425 | exit ;; |
386 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
426 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
387 | echo m68k-milan-mint${UNAME_RELEASE} |
427 | echo m68k-milan-mint${UNAME_RELEASE} |
388 | exit ;; |
428 | exit ;; |
389 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
429 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
390 | echo m68k-hades-mint${UNAME_RELEASE} |
430 | echo m68k-hades-mint${UNAME_RELEASE} |
391 | exit ;; |
431 | exit ;; |
392 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
432 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
393 | echo m68k-unknown-mint${UNAME_RELEASE} |
433 | echo m68k-unknown-mint${UNAME_RELEASE} |
394 | exit ;; |
434 | exit ;; |
395 | m68k:machten:*:*) |
435 | m68k:machten:*:*) |
396 | echo m68k-apple-machten${UNAME_RELEASE} |
436 | echo m68k-apple-machten${UNAME_RELEASE} |
397 | exit ;; |
437 | exit ;; |
398 | powerpc:machten:*:*) |
438 | powerpc:machten:*:*) |
399 | echo powerpc-apple-machten${UNAME_RELEASE} |
439 | echo powerpc-apple-machten${UNAME_RELEASE} |
… | |
… | |
459 | exit ;; |
499 | exit ;; |
460 | m88k:*:3*:R3*) |
500 | m88k:*:3*:R3*) |
461 | echo m88k-motorola-sysv3 |
501 | echo m88k-motorola-sysv3 |
462 | exit ;; |
502 | exit ;; |
463 | AViiON:dgux:*:*) |
503 | AViiON:dgux:*:*) |
464 | # DG/UX returns AViiON for all architectures |
504 | # DG/UX returns AViiON for all architectures |
465 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
505 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
466 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
506 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
467 | then |
507 | then |
468 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
508 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
469 | [ ${TARGET_BINARY_INTERFACE}x = x ] |
509 | [ ${TARGET_BINARY_INTERFACE}x = x ] |
470 | then |
510 | then |
… | |
… | |
473 | echo m88k-dg-dguxbcs${UNAME_RELEASE} |
513 | echo m88k-dg-dguxbcs${UNAME_RELEASE} |
474 | fi |
514 | fi |
475 | else |
515 | else |
476 | echo i586-dg-dgux${UNAME_RELEASE} |
516 | echo i586-dg-dgux${UNAME_RELEASE} |
477 | fi |
517 | fi |
478 | exit ;; |
518 | exit ;; |
479 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
519 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
480 | echo m88k-dolphin-sysv3 |
520 | echo m88k-dolphin-sysv3 |
481 | exit ;; |
521 | exit ;; |
482 | M88*:*:R3*:*) |
522 | M88*:*:R3*:*) |
483 | # Delta 88k system running SVR3 |
523 | # Delta 88k system running SVR3 |
… | |
… | |
530 | echo rs6000-ibm-aix3.2.4 |
570 | echo rs6000-ibm-aix3.2.4 |
531 | else |
571 | else |
532 | echo rs6000-ibm-aix3.2 |
572 | echo rs6000-ibm-aix3.2 |
533 | fi |
573 | fi |
534 | exit ;; |
574 | exit ;; |
535 | *:AIX:*:[45]) |
575 | *:AIX:*:[4567]) |
536 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
576 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
537 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
577 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
538 | IBM_ARCH=rs6000 |
578 | IBM_ARCH=rs6000 |
539 | else |
579 | else |
540 | IBM_ARCH=powerpc |
580 | IBM_ARCH=powerpc |
… | |
… | |
573 | 9000/31? ) HP_ARCH=m68000 ;; |
613 | 9000/31? ) HP_ARCH=m68000 ;; |
574 | 9000/[34]?? ) HP_ARCH=m68k ;; |
614 | 9000/[34]?? ) HP_ARCH=m68k ;; |
575 | 9000/[678][0-9][0-9]) |
615 | 9000/[678][0-9][0-9]) |
576 | if [ -x /usr/bin/getconf ]; then |
616 | if [ -x /usr/bin/getconf ]; then |
577 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
617 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
578 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
618 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
579 | case "${sc_cpu_version}" in |
619 | case "${sc_cpu_version}" in |
580 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
620 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
581 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
621 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
582 | 532) # CPU_PA_RISC2_0 |
622 | 532) # CPU_PA_RISC2_0 |
583 | case "${sc_kernel_bits}" in |
623 | case "${sc_kernel_bits}" in |
584 | 32) HP_ARCH="hppa2.0n" ;; |
624 | 32) HP_ARCH="hppa2.0n" ;; |
585 | 64) HP_ARCH="hppa2.0w" ;; |
625 | 64) HP_ARCH="hppa2.0w" ;; |
586 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
626 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
587 | esac ;; |
627 | esac ;; |
588 | esac |
628 | esac |
589 | fi |
629 | fi |
590 | if [ "${HP_ARCH}" = "" ]; then |
630 | if [ "${HP_ARCH}" = "" ]; then |
591 | eval $set_cc_for_build |
631 | eval $set_cc_for_build |
592 | sed 's/^ //' << EOF >$dummy.c |
632 | sed 's/^ //' << EOF >$dummy.c |
593 | |
633 | |
594 | #define _HPUX_SOURCE |
634 | #define _HPUX_SOURCE |
595 | #include <stdlib.h> |
635 | #include <stdlib.h> |
596 | #include <unistd.h> |
636 | #include <unistd.h> |
597 | |
637 | |
598 | int main () |
638 | int main () |
599 | { |
639 | { |
600 | #if defined(_SC_KERNEL_BITS) |
640 | #if defined(_SC_KERNEL_BITS) |
601 | long bits = sysconf(_SC_KERNEL_BITS); |
641 | long bits = sysconf(_SC_KERNEL_BITS); |
602 | #endif |
642 | #endif |
603 | long cpu = sysconf (_SC_CPU_VERSION); |
643 | long cpu = sysconf (_SC_CPU_VERSION); |
604 | |
644 | |
605 | switch (cpu) |
645 | switch (cpu) |
606 | { |
646 | { |
607 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; |
647 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; |
608 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; |
648 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; |
609 | case CPU_PA_RISC2_0: |
649 | case CPU_PA_RISC2_0: |
610 | #if defined(_SC_KERNEL_BITS) |
650 | #if defined(_SC_KERNEL_BITS) |
611 | switch (bits) |
651 | switch (bits) |
612 | { |
652 | { |
613 | case 64: puts ("hppa2.0w"); break; |
653 | case 64: puts ("hppa2.0w"); break; |
614 | case 32: puts ("hppa2.0n"); break; |
654 | case 32: puts ("hppa2.0n"); break; |
615 | default: puts ("hppa2.0"); break; |
655 | default: puts ("hppa2.0"); break; |
616 | } break; |
656 | } break; |
617 | #else /* !defined(_SC_KERNEL_BITS) */ |
657 | #else /* !defined(_SC_KERNEL_BITS) */ |
618 | puts ("hppa2.0"); break; |
658 | puts ("hppa2.0"); break; |
619 | #endif |
659 | #endif |
620 | default: puts ("hppa1.0"); break; |
660 | default: puts ("hppa1.0"); break; |
621 | } |
661 | } |
622 | exit (0); |
662 | exit (0); |
623 | } |
663 | } |
624 | EOF |
664 | EOF |
625 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
665 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
626 | test -z "$HP_ARCH" && HP_ARCH=hppa |
666 | test -z "$HP_ARCH" && HP_ARCH=hppa |
627 | fi ;; |
667 | fi ;; |
628 | esac |
668 | esac |
… | |
… | |
638 | # => hppa2.0w-hp-hpux11.23 |
678 | # => hppa2.0w-hp-hpux11.23 |
639 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
679 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
640 | # => hppa64-hp-hpux11.23 |
680 | # => hppa64-hp-hpux11.23 |
641 | |
681 | |
642 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | |
682 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | |
643 | grep __LP64__ >/dev/null |
683 | grep -q __LP64__ |
644 | then |
684 | then |
645 | HP_ARCH="hppa2.0w" |
685 | HP_ARCH="hppa2.0w" |
646 | else |
686 | else |
647 | HP_ARCH="hppa64" |
687 | HP_ARCH="hppa64" |
648 | fi |
688 | fi |
… | |
… | |
709 | parisc*:Lites*:*:*) |
749 | parisc*:Lites*:*:*) |
710 | echo hppa1.1-hp-lites |
750 | echo hppa1.1-hp-lites |
711 | exit ;; |
751 | exit ;; |
712 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
752 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
713 | echo c1-convex-bsd |
753 | echo c1-convex-bsd |
714 | exit ;; |
754 | exit ;; |
715 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
755 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
716 | if getsysinfo -f scalar_acc |
756 | if getsysinfo -f scalar_acc |
717 | then echo c32-convex-bsd |
757 | then echo c32-convex-bsd |
718 | else echo c2-convex-bsd |
758 | else echo c2-convex-bsd |
719 | fi |
759 | fi |
720 | exit ;; |
760 | exit ;; |
721 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
761 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
722 | echo c34-convex-bsd |
762 | echo c34-convex-bsd |
723 | exit ;; |
763 | exit ;; |
724 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
764 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
725 | echo c38-convex-bsd |
765 | echo c38-convex-bsd |
726 | exit ;; |
766 | exit ;; |
727 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
767 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
728 | echo c4-convex-bsd |
768 | echo c4-convex-bsd |
729 | exit ;; |
769 | exit ;; |
730 | CRAY*Y-MP:*:*:*) |
770 | CRAY*Y-MP:*:*:*) |
731 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
771 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
732 | exit ;; |
772 | exit ;; |
733 | CRAY*[A-Z]90:*:*:*) |
773 | CRAY*[A-Z]90:*:*:*) |
734 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
774 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
… | |
… | |
748 | *:UNICOS/mp:*:*) |
788 | *:UNICOS/mp:*:*) |
749 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
789 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
750 | exit ;; |
790 | exit ;; |
751 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
791 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
752 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
792 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
753 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
793 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
754 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
794 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
755 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
795 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
756 | exit ;; |
796 | exit ;; |
757 | 5000:UNIX_System_V:4.*:*) |
797 | 5000:UNIX_System_V:4.*:*) |
758 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
798 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
759 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` |
799 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` |
760 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
800 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
761 | exit ;; |
801 | exit ;; |
762 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
802 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
763 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
803 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
764 | exit ;; |
804 | exit ;; |
765 | sparc*:BSD/OS:*:*) |
805 | sparc*:BSD/OS:*:*) |
… | |
… | |
767 | exit ;; |
807 | exit ;; |
768 | *:BSD/OS:*:*) |
808 | *:BSD/OS:*:*) |
769 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
809 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
770 | exit ;; |
810 | exit ;; |
771 | *:FreeBSD:*:*) |
811 | *:FreeBSD:*:*) |
|
|
812 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
772 | case ${UNAME_MACHINE} in |
813 | case ${UNAME_PROCESSOR} in |
773 | pc98) |
|
|
774 | echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
|
|
775 | amd64) |
814 | amd64) |
776 | echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
815 | echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
777 | *) |
816 | *) |
778 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
817 | echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
779 | esac |
818 | esac |
780 | exit ;; |
819 | exit ;; |
781 | i*:CYGWIN*:*) |
820 | i*:CYGWIN*:*) |
782 | echo ${UNAME_MACHINE}-pc-cygwin |
821 | echo ${UNAME_MACHINE}-pc-cygwin |
783 | exit ;; |
822 | exit ;; |
|
|
823 | *:MINGW64*:*) |
|
|
824 | echo ${UNAME_MACHINE}-pc-mingw64 |
|
|
825 | exit ;; |
784 | *:MINGW*:*) |
826 | *:MINGW*:*) |
785 | echo ${UNAME_MACHINE}-pc-mingw32 |
827 | echo ${UNAME_MACHINE}-pc-mingw32 |
786 | exit ;; |
828 | exit ;; |
|
|
829 | *:MSYS*:*) |
|
|
830 | echo ${UNAME_MACHINE}-pc-msys |
|
|
831 | exit ;; |
787 | i*:windows32*:*) |
832 | i*:windows32*:*) |
788 | # uname -m includes "-pc" on this system. |
833 | # uname -m includes "-pc" on this system. |
789 | echo ${UNAME_MACHINE}-mingw32 |
834 | echo ${UNAME_MACHINE}-mingw32 |
790 | exit ;; |
835 | exit ;; |
791 | i*:PW*:*) |
836 | i*:PW*:*) |
792 | echo ${UNAME_MACHINE}-pc-pw32 |
837 | echo ${UNAME_MACHINE}-pc-pw32 |
793 | exit ;; |
838 | exit ;; |
794 | *:Interix*:[3456]*) |
839 | *:Interix*:*) |
795 | case ${UNAME_MACHINE} in |
840 | case ${UNAME_MACHINE} in |
796 | x86) |
841 | x86) |
797 | echo i586-pc-interix${UNAME_RELEASE} |
842 | echo i586-pc-interix${UNAME_RELEASE} |
798 | exit ;; |
843 | exit ;; |
799 | EM64T | authenticamd) |
844 | authenticamd | genuineintel | EM64T) |
800 | echo x86_64-unknown-interix${UNAME_RELEASE} |
845 | echo x86_64-unknown-interix${UNAME_RELEASE} |
|
|
846 | exit ;; |
|
|
847 | IA64) |
|
|
848 | echo ia64-unknown-interix${UNAME_RELEASE} |
801 | exit ;; |
849 | exit ;; |
802 | esac ;; |
850 | esac ;; |
803 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) |
851 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) |
804 | echo i${UNAME_MACHINE}-pc-mks |
852 | echo i${UNAME_MACHINE}-pc-mks |
|
|
853 | exit ;; |
|
|
854 | 8664:Windows_NT:*) |
|
|
855 | echo x86_64-pc-mks |
805 | exit ;; |
856 | exit ;; |
806 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
857 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
807 | # How do we know it's Interix rather than the generic POSIX subsystem? |
858 | # How do we know it's Interix rather than the generic POSIX subsystem? |
808 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
859 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
809 | # UNAME_MACHINE based on the output of uname instead of i386? |
860 | # UNAME_MACHINE based on the output of uname instead of i386? |
… | |
… | |
821 | prep*:SunOS:5.*:*) |
872 | prep*:SunOS:5.*:*) |
822 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
873 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
823 | exit ;; |
874 | exit ;; |
824 | *:GNU:*:*) |
875 | *:GNU:*:*) |
825 | # the GNU system |
876 | # the GNU system |
826 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
877 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
827 | exit ;; |
878 | exit ;; |
828 | *:GNU/*:*:*) |
879 | *:GNU/*:*:*) |
829 | # other systems with GNU libc and userland |
880 | # other systems with GNU libc and userland |
830 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu |
881 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} |
831 | exit ;; |
882 | exit ;; |
832 | i*86:Minix:*:*) |
883 | i*86:Minix:*:*) |
833 | echo ${UNAME_MACHINE}-pc-minix |
884 | echo ${UNAME_MACHINE}-pc-minix |
834 | exit ;; |
885 | exit ;; |
835 | arm*:Linux:*:*) |
886 | aarch64:Linux:*:*) |
836 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
887 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
837 | exit ;; |
888 | exit ;; |
838 | avr32*:Linux:*:*) |
889 | aarch64_be:Linux:*:*) |
|
|
890 | UNAME_MACHINE=aarch64_be |
839 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
891 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
840 | exit ;; |
|
|
841 | cris:Linux:*:*) |
|
|
842 | echo cris-axis-linux-gnu |
|
|
843 | exit ;; |
|
|
844 | crisv32:Linux:*:*) |
|
|
845 | echo crisv32-axis-linux-gnu |
|
|
846 | exit ;; |
|
|
847 | frv:Linux:*:*) |
|
|
848 | echo frv-unknown-linux-gnu |
|
|
849 | exit ;; |
|
|
850 | ia64:Linux:*:*) |
|
|
851 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
|
|
852 | exit ;; |
|
|
853 | m32r*:Linux:*:*) |
|
|
854 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
|
|
855 | exit ;; |
|
|
856 | m68*:Linux:*:*) |
|
|
857 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
|
|
858 | exit ;; |
|
|
859 | mips:Linux:*:*) |
|
|
860 | eval $set_cc_for_build |
|
|
861 | sed 's/^ //' << EOF >$dummy.c |
|
|
862 | #undef CPU |
|
|
863 | #undef mips |
|
|
864 | #undef mipsel |
|
|
865 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
|
|
866 | CPU=mipsel |
|
|
867 | #else |
|
|
868 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
|
|
869 | CPU=mips |
|
|
870 | #else |
|
|
871 | CPU= |
|
|
872 | #endif |
|
|
873 | #endif |
|
|
874 | EOF |
|
|
875 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' |
|
|
876 | /^CPU/{ |
|
|
877 | s: ::g |
|
|
878 | p |
|
|
879 | }'`" |
|
|
880 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } |
|
|
881 | ;; |
|
|
882 | mips64:Linux:*:*) |
|
|
883 | eval $set_cc_for_build |
|
|
884 | sed 's/^ //' << EOF >$dummy.c |
|
|
885 | #undef CPU |
|
|
886 | #undef mips64 |
|
|
887 | #undef mips64el |
|
|
888 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
|
|
889 | CPU=mips64el |
|
|
890 | #else |
|
|
891 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
|
|
892 | CPU=mips64 |
|
|
893 | #else |
|
|
894 | CPU= |
|
|
895 | #endif |
|
|
896 | #endif |
|
|
897 | EOF |
|
|
898 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' |
|
|
899 | /^CPU/{ |
|
|
900 | s: ::g |
|
|
901 | p |
|
|
902 | }'`" |
|
|
903 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } |
|
|
904 | ;; |
|
|
905 | or32:Linux:*:*) |
|
|
906 | echo or32-unknown-linux-gnu |
|
|
907 | exit ;; |
|
|
908 | ppc:Linux:*:*) |
|
|
909 | echo powerpc-unknown-linux-gnu |
|
|
910 | exit ;; |
|
|
911 | ppc64:Linux:*:*) |
|
|
912 | echo powerpc64-unknown-linux-gnu |
|
|
913 | exit ;; |
892 | exit ;; |
914 | alpha:Linux:*:*) |
893 | alpha:Linux:*:*) |
915 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
894 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
916 | EV5) UNAME_MACHINE=alphaev5 ;; |
895 | EV5) UNAME_MACHINE=alphaev5 ;; |
917 | EV56) UNAME_MACHINE=alphaev56 ;; |
896 | EV56) UNAME_MACHINE=alphaev56 ;; |
918 | PCA56) UNAME_MACHINE=alphapca56 ;; |
897 | PCA56) UNAME_MACHINE=alphapca56 ;; |
919 | PCA57) UNAME_MACHINE=alphapca56 ;; |
898 | PCA57) UNAME_MACHINE=alphapca56 ;; |
920 | EV6) UNAME_MACHINE=alphaev6 ;; |
899 | EV6) UNAME_MACHINE=alphaev6 ;; |
921 | EV67) UNAME_MACHINE=alphaev67 ;; |
900 | EV67) UNAME_MACHINE=alphaev67 ;; |
922 | EV68*) UNAME_MACHINE=alphaev68 ;; |
901 | EV68*) UNAME_MACHINE=alphaev68 ;; |
923 | esac |
902 | esac |
924 | objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null |
903 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
925 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
904 | if test "$?" = 0 ; then LIBC="gnulibc1" ; fi |
926 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} |
905 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
906 | exit ;; |
|
|
907 | arc:Linux:*:* | arceb:Linux:*:*) |
|
|
908 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
909 | exit ;; |
|
|
910 | arm*:Linux:*:*) |
|
|
911 | eval $set_cc_for_build |
|
|
912 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
|
|
913 | | grep -q __ARM_EABI__ |
|
|
914 | then |
|
|
915 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
916 | else |
|
|
917 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
|
|
918 | | grep -q __ARM_PCS_VFP |
|
|
919 | then |
|
|
920 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi |
|
|
921 | else |
|
|
922 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf |
|
|
923 | fi |
|
|
924 | fi |
|
|
925 | exit ;; |
|
|
926 | avr32*:Linux:*:*) |
|
|
927 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
928 | exit ;; |
|
|
929 | cris:Linux:*:*) |
|
|
930 | echo ${UNAME_MACHINE}-axis-linux-${LIBC} |
|
|
931 | exit ;; |
|
|
932 | crisv32:Linux:*:*) |
|
|
933 | echo ${UNAME_MACHINE}-axis-linux-${LIBC} |
|
|
934 | exit ;; |
|
|
935 | frv:Linux:*:*) |
|
|
936 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
937 | exit ;; |
|
|
938 | hexagon:Linux:*:*) |
|
|
939 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
940 | exit ;; |
|
|
941 | i*86:Linux:*:*) |
|
|
942 | echo ${UNAME_MACHINE}-pc-linux-${LIBC} |
|
|
943 | exit ;; |
|
|
944 | ia64:Linux:*:*) |
|
|
945 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
946 | exit ;; |
|
|
947 | m32r*:Linux:*:*) |
|
|
948 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
949 | exit ;; |
|
|
950 | m68*:Linux:*:*) |
|
|
951 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
952 | exit ;; |
|
|
953 | mips:Linux:*:* | mips64:Linux:*:*) |
|
|
954 | eval $set_cc_for_build |
|
|
955 | sed 's/^ //' << EOF >$dummy.c |
|
|
956 | #undef CPU |
|
|
957 | #undef ${UNAME_MACHINE} |
|
|
958 | #undef ${UNAME_MACHINE}el |
|
|
959 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
|
|
960 | CPU=${UNAME_MACHINE}el |
|
|
961 | #else |
|
|
962 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
|
|
963 | CPU=${UNAME_MACHINE} |
|
|
964 | #else |
|
|
965 | CPU= |
|
|
966 | #endif |
|
|
967 | #endif |
|
|
968 | EOF |
|
|
969 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
|
|
970 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } |
|
|
971 | ;; |
|
|
972 | openrisc*:Linux:*:*) |
|
|
973 | echo or1k-unknown-linux-${LIBC} |
|
|
974 | exit ;; |
|
|
975 | or32:Linux:*:* | or1k*:Linux:*:*) |
|
|
976 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
977 | exit ;; |
|
|
978 | padre:Linux:*:*) |
|
|
979 | echo sparc-unknown-linux-${LIBC} |
|
|
980 | exit ;; |
|
|
981 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
|
|
982 | echo hppa64-unknown-linux-${LIBC} |
927 | exit ;; |
983 | exit ;; |
928 | parisc:Linux:*:* | hppa:Linux:*:*) |
984 | parisc:Linux:*:* | hppa:Linux:*:*) |
929 | # Look for CPU level |
985 | # Look for CPU level |
930 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
986 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
931 | PA7*) echo hppa1.1-unknown-linux-gnu ;; |
987 | PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; |
932 | PA8*) echo hppa2.0-unknown-linux-gnu ;; |
988 | PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; |
933 | *) echo hppa-unknown-linux-gnu ;; |
989 | *) echo hppa-unknown-linux-${LIBC} ;; |
934 | esac |
990 | esac |
935 | exit ;; |
991 | exit ;; |
936 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
992 | ppc64:Linux:*:*) |
937 | echo hppa64-unknown-linux-gnu |
993 | echo powerpc64-unknown-linux-${LIBC} |
|
|
994 | exit ;; |
|
|
995 | ppc:Linux:*:*) |
|
|
996 | echo powerpc-unknown-linux-${LIBC} |
|
|
997 | exit ;; |
|
|
998 | ppc64le:Linux:*:*) |
|
|
999 | echo powerpc64le-unknown-linux-${LIBC} |
|
|
1000 | exit ;; |
|
|
1001 | ppcle:Linux:*:*) |
|
|
1002 | echo powerpcle-unknown-linux-${LIBC} |
938 | exit ;; |
1003 | exit ;; |
939 | s390:Linux:*:* | s390x:Linux:*:*) |
1004 | s390:Linux:*:* | s390x:Linux:*:*) |
940 | echo ${UNAME_MACHINE}-ibm-linux |
1005 | echo ${UNAME_MACHINE}-ibm-linux-${LIBC} |
941 | exit ;; |
1006 | exit ;; |
942 | sh64*:Linux:*:*) |
1007 | sh64*:Linux:*:*) |
943 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
1008 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
944 | exit ;; |
1009 | exit ;; |
945 | sh*:Linux:*:*) |
1010 | sh*:Linux:*:*) |
946 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
1011 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
947 | exit ;; |
1012 | exit ;; |
948 | sparc:Linux:*:* | sparc64:Linux:*:*) |
1013 | sparc:Linux:*:* | sparc64:Linux:*:*) |
949 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
1014 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
1015 | exit ;; |
|
|
1016 | tile*:Linux:*:*) |
|
|
1017 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
950 | exit ;; |
1018 | exit ;; |
951 | vax:Linux:*:*) |
1019 | vax:Linux:*:*) |
952 | echo ${UNAME_MACHINE}-dec-linux-gnu |
1020 | echo ${UNAME_MACHINE}-dec-linux-${LIBC} |
953 | exit ;; |
1021 | exit ;; |
954 | x86_64:Linux:*:*) |
1022 | x86_64:Linux:*:*) |
955 | echo x86_64-unknown-linux-gnu |
1023 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
956 | exit ;; |
1024 | exit ;; |
957 | xtensa:Linux:*:*) |
1025 | xtensa*:Linux:*:*) |
958 | echo xtensa-unknown-linux-gnu |
1026 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
959 | exit ;; |
|
|
960 | i*86:Linux:*:*) |
|
|
961 | # The BFD linker knows what the default object file format is, so |
|
|
962 | # first see if it will tell us. cd to the root directory to prevent |
|
|
963 | # problems with other programs or directories called `ld' in the path. |
|
|
964 | # Set LC_ALL=C to ensure ld outputs messages in English. |
|
|
965 | ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ |
|
|
966 | | sed -ne '/supported targets:/!d |
|
|
967 | s/[ ][ ]*/ /g |
|
|
968 | s/.*supported targets: *// |
|
|
969 | s/ .*// |
|
|
970 | p'` |
|
|
971 | case "$ld_supported_targets" in |
|
|
972 | elf32-i386) |
|
|
973 | TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" |
|
|
974 | ;; |
|
|
975 | a.out-i386-linux) |
|
|
976 | echo "${UNAME_MACHINE}-pc-linux-gnuaout" |
|
|
977 | exit ;; |
1027 | exit ;; |
978 | coff-i386) |
|
|
979 | echo "${UNAME_MACHINE}-pc-linux-gnucoff" |
|
|
980 | exit ;; |
|
|
981 | "") |
|
|
982 | # Either a pre-BFD a.out linker (linux-gnuoldld) or |
|
|
983 | # one that does not give us useful --help. |
|
|
984 | echo "${UNAME_MACHINE}-pc-linux-gnuoldld" |
|
|
985 | exit ;; |
|
|
986 | esac |
|
|
987 | # Determine whether the default compiler is a.out or elf |
|
|
988 | eval $set_cc_for_build |
|
|
989 | sed 's/^ //' << EOF >$dummy.c |
|
|
990 | #include <features.h> |
|
|
991 | #ifdef __ELF__ |
|
|
992 | # ifdef __GLIBC__ |
|
|
993 | # if __GLIBC__ >= 2 |
|
|
994 | LIBC=gnu |
|
|
995 | # else |
|
|
996 | LIBC=gnulibc1 |
|
|
997 | # endif |
|
|
998 | # else |
|
|
999 | LIBC=gnulibc1 |
|
|
1000 | # endif |
|
|
1001 | #else |
|
|
1002 | #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) |
|
|
1003 | LIBC=gnu |
|
|
1004 | #else |
|
|
1005 | LIBC=gnuaout |
|
|
1006 | #endif |
|
|
1007 | #endif |
|
|
1008 | #ifdef __dietlibc__ |
|
|
1009 | LIBC=dietlibc |
|
|
1010 | #endif |
|
|
1011 | EOF |
|
|
1012 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' |
|
|
1013 | /^LIBC/{ |
|
|
1014 | s: ::g |
|
|
1015 | p |
|
|
1016 | }'`" |
|
|
1017 | test x"${LIBC}" != x && { |
|
|
1018 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" |
|
|
1019 | exit |
|
|
1020 | } |
|
|
1021 | test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } |
|
|
1022 | ;; |
|
|
1023 | i*86:DYNIX/ptx:4*:*) |
1028 | i*86:DYNIX/ptx:4*:*) |
1024 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1029 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1025 | # earlier versions are messed up and put the nodename in both |
1030 | # earlier versions are messed up and put the nodename in both |
1026 | # sysname and nodename. |
1031 | # sysname and nodename. |
1027 | echo i386-sequent-sysv4 |
1032 | echo i386-sequent-sysv4 |
1028 | exit ;; |
1033 | exit ;; |
1029 | i*86:UNIX_SV:4.2MP:2.*) |
1034 | i*86:UNIX_SV:4.2MP:2.*) |
1030 | # Unixware is an offshoot of SVR4, but it has its own version |
1035 | # Unixware is an offshoot of SVR4, but it has its own version |
1031 | # number series starting with 2... |
1036 | # number series starting with 2... |
1032 | # I am not positive that other SVR4 systems won't match this, |
1037 | # I am not positive that other SVR4 systems won't match this, |
1033 | # I just have to hope. -- rms. |
1038 | # I just have to hope. -- rms. |
1034 | # Use sysv4.2uw... so that sysv4* matches it. |
1039 | # Use sysv4.2uw... so that sysv4* matches it. |
1035 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
1040 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
1036 | exit ;; |
1041 | exit ;; |
1037 | i*86:OS/2:*:*) |
1042 | i*86:OS/2:*:*) |
1038 | # If we were able to find `uname', then EMX Unix compatibility |
1043 | # If we were able to find `uname', then EMX Unix compatibility |
1039 | # is probably installed. |
1044 | # is probably installed. |
… | |
… | |
1046 | echo ${UNAME_MACHINE}-unknown-atheos |
1051 | echo ${UNAME_MACHINE}-unknown-atheos |
1047 | exit ;; |
1052 | exit ;; |
1048 | i*86:syllable:*:*) |
1053 | i*86:syllable:*:*) |
1049 | echo ${UNAME_MACHINE}-pc-syllable |
1054 | echo ${UNAME_MACHINE}-pc-syllable |
1050 | exit ;; |
1055 | exit ;; |
1051 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) |
1056 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
1052 | echo i386-unknown-lynxos${UNAME_RELEASE} |
1057 | echo i386-unknown-lynxos${UNAME_RELEASE} |
1053 | exit ;; |
1058 | exit ;; |
1054 | i*86:*DOS:*:*) |
1059 | i*86:*DOS:*:*) |
1055 | echo ${UNAME_MACHINE}-pc-msdosdjgpp |
1060 | echo ${UNAME_MACHINE}-pc-msdosdjgpp |
1056 | exit ;; |
1061 | exit ;; |
… | |
… | |
1061 | else |
1066 | else |
1062 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} |
1067 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} |
1063 | fi |
1068 | fi |
1064 | exit ;; |
1069 | exit ;; |
1065 | i*86:*:5:[678]*) |
1070 | i*86:*:5:[678]*) |
1066 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
1071 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
1067 | case `/bin/uname -X | grep "^Machine"` in |
1072 | case `/bin/uname -X | grep "^Machine"` in |
1068 | *486*) UNAME_MACHINE=i486 ;; |
1073 | *486*) UNAME_MACHINE=i486 ;; |
1069 | *Pentium) UNAME_MACHINE=i586 ;; |
1074 | *Pentium) UNAME_MACHINE=i586 ;; |
1070 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1075 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1071 | esac |
1076 | esac |
… | |
… | |
1089 | echo ${UNAME_MACHINE}-pc-sysv32 |
1094 | echo ${UNAME_MACHINE}-pc-sysv32 |
1090 | fi |
1095 | fi |
1091 | exit ;; |
1096 | exit ;; |
1092 | pc:*:*:*) |
1097 | pc:*:*:*) |
1093 | # Left here for compatibility: |
1098 | # Left here for compatibility: |
1094 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1099 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1095 | # the processor, so we play safe by assuming i386. |
1100 | # the processor, so we play safe by assuming i586. |
|
|
1101 | # Note: whatever this is, it MUST be the same as what config.sub |
|
|
1102 | # prints for the "djgpp" host, or else GDB configury will decide that |
|
|
1103 | # this is a cross-build. |
1096 | echo i386-pc-msdosdjgpp |
1104 | echo i586-pc-msdosdjgpp |
1097 | exit ;; |
1105 | exit ;; |
1098 | Intel:Mach:3*:*) |
1106 | Intel:Mach:3*:*) |
1099 | echo i386-pc-mach3 |
1107 | echo i386-pc-mach3 |
1100 | exit ;; |
1108 | exit ;; |
1101 | paragon:*:*:*) |
1109 | paragon:*:*:*) |
1102 | echo i860-intel-osf1 |
1110 | echo i860-intel-osf1 |
… | |
… | |
1127 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1135 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1128 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } |
1136 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } |
1129 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1137 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1130 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; |
1138 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; |
1131 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1139 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1132 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1140 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1133 | && { echo i486-ncr-sysv4; exit; } ;; |
1141 | && { echo i486-ncr-sysv4; exit; } ;; |
|
|
1142 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) |
|
|
1143 | OS_REL='.3' |
|
|
1144 | test -r /etc/.relid \ |
|
|
1145 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
|
|
1146 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
|
|
1147 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } |
|
|
1148 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
|
|
1149 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } |
|
|
1150 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
|
|
1151 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; |
1134 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1152 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1135 | echo m68k-unknown-lynxos${UNAME_RELEASE} |
1153 | echo m68k-unknown-lynxos${UNAME_RELEASE} |
1136 | exit ;; |
1154 | exit ;; |
1137 | mc68030:UNIX_System_V:4.*:*) |
1155 | mc68030:UNIX_System_V:4.*:*) |
1138 | echo m68k-atari-sysv4 |
1156 | echo m68k-atari-sysv4 |
… | |
… | |
1141 | echo sparc-unknown-lynxos${UNAME_RELEASE} |
1159 | echo sparc-unknown-lynxos${UNAME_RELEASE} |
1142 | exit ;; |
1160 | exit ;; |
1143 | rs6000:LynxOS:2.*:*) |
1161 | rs6000:LynxOS:2.*:*) |
1144 | echo rs6000-unknown-lynxos${UNAME_RELEASE} |
1162 | echo rs6000-unknown-lynxos${UNAME_RELEASE} |
1145 | exit ;; |
1163 | exit ;; |
1146 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) |
1164 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
1147 | echo powerpc-unknown-lynxos${UNAME_RELEASE} |
1165 | echo powerpc-unknown-lynxos${UNAME_RELEASE} |
1148 | exit ;; |
1166 | exit ;; |
1149 | SM[BE]S:UNIX_SV:*:*) |
1167 | SM[BE]S:UNIX_SV:*:*) |
1150 | echo mips-dde-sysv${UNAME_RELEASE} |
1168 | echo mips-dde-sysv${UNAME_RELEASE} |
1151 | exit ;; |
1169 | exit ;; |
… | |
… | |
1161 | echo ${UNAME_MACHINE}-sni-sysv4 |
1179 | echo ${UNAME_MACHINE}-sni-sysv4 |
1162 | else |
1180 | else |
1163 | echo ns32k-sni-sysv |
1181 | echo ns32k-sni-sysv |
1164 | fi |
1182 | fi |
1165 | exit ;; |
1183 | exit ;; |
1166 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1184 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1167 | # says <Richard.M.Bartel@ccMail.Census.GOV> |
1185 | # says <Richard.M.Bartel@ccMail.Census.GOV> |
1168 | echo i586-unisys-sysv4 |
1186 | echo i586-unisys-sysv4 |
1169 | exit ;; |
1187 | exit ;; |
1170 | *:UNIX_System_V:4*:FTX*) |
1188 | *:UNIX_System_V:4*:FTX*) |
1171 | # From Gerald Hewes <hewes@openmarket.com>. |
1189 | # From Gerald Hewes <hewes@openmarket.com>. |
1172 | # How about differentiating between stratus architectures? -djm |
1190 | # How about differentiating between stratus architectures? -djm |
1173 | echo hppa1.1-stratus-sysv4 |
1191 | echo hppa1.1-stratus-sysv4 |
1174 | exit ;; |
1192 | exit ;; |
… | |
… | |
1190 | news*:NEWS-OS:6*:*) |
1208 | news*:NEWS-OS:6*:*) |
1191 | echo mips-sony-newsos6 |
1209 | echo mips-sony-newsos6 |
1192 | exit ;; |
1210 | exit ;; |
1193 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1211 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1194 | if [ -d /usr/nec ]; then |
1212 | if [ -d /usr/nec ]; then |
1195 | echo mips-nec-sysv${UNAME_RELEASE} |
1213 | echo mips-nec-sysv${UNAME_RELEASE} |
1196 | else |
1214 | else |
1197 | echo mips-unknown-sysv${UNAME_RELEASE} |
1215 | echo mips-unknown-sysv${UNAME_RELEASE} |
1198 | fi |
1216 | fi |
1199 | exit ;; |
1217 | exit ;; |
1200 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1218 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1201 | echo powerpc-be-beos |
1219 | echo powerpc-be-beos |
1202 | exit ;; |
1220 | exit ;; |
1203 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1221 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1204 | echo powerpc-apple-beos |
1222 | echo powerpc-apple-beos |
1205 | exit ;; |
1223 | exit ;; |
1206 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1224 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1207 | echo i586-pc-beos |
1225 | echo i586-pc-beos |
1208 | exit ;; |
1226 | exit ;; |
|
|
1227 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
|
|
1228 | echo i586-pc-haiku |
|
|
1229 | exit ;; |
|
|
1230 | x86_64:Haiku:*:*) |
|
|
1231 | echo x86_64-unknown-haiku |
|
|
1232 | exit ;; |
1209 | SX-4:SUPER-UX:*:*) |
1233 | SX-4:SUPER-UX:*:*) |
1210 | echo sx4-nec-superux${UNAME_RELEASE} |
1234 | echo sx4-nec-superux${UNAME_RELEASE} |
1211 | exit ;; |
1235 | exit ;; |
1212 | SX-5:SUPER-UX:*:*) |
1236 | SX-5:SUPER-UX:*:*) |
1213 | echo sx5-nec-superux${UNAME_RELEASE} |
1237 | echo sx5-nec-superux${UNAME_RELEASE} |
… | |
… | |
1230 | *:Rhapsody:*:*) |
1254 | *:Rhapsody:*:*) |
1231 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
1255 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
1232 | exit ;; |
1256 | exit ;; |
1233 | *:Darwin:*:*) |
1257 | *:Darwin:*:*) |
1234 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
1258 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
|
|
1259 | eval $set_cc_for_build |
|
|
1260 | if test "$UNAME_PROCESSOR" = unknown ; then |
|
|
1261 | UNAME_PROCESSOR=powerpc |
|
|
1262 | fi |
|
|
1263 | if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then |
|
|
1264 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then |
|
|
1265 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
|
|
1266 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
|
|
1267 | grep IS_64BIT_ARCH >/dev/null |
|
|
1268 | then |
1235 | case $UNAME_PROCESSOR in |
1269 | case $UNAME_PROCESSOR in |
|
|
1270 | i386) UNAME_PROCESSOR=x86_64 ;; |
1236 | unknown) UNAME_PROCESSOR=powerpc ;; |
1271 | powerpc) UNAME_PROCESSOR=powerpc64 ;; |
1237 | esac |
1272 | esac |
|
|
1273 | fi |
|
|
1274 | fi |
|
|
1275 | elif test "$UNAME_PROCESSOR" = i386 ; then |
|
|
1276 | # Avoid executing cc on OS X 10.9, as it ships with a stub |
|
|
1277 | # that puts up a graphical alert prompting to install |
|
|
1278 | # developer tools. Any system running Mac OS X 10.7 or |
|
|
1279 | # later (Darwin 11 and later) is required to have a 64-bit |
|
|
1280 | # processor. This is not true of the ARM version of Darwin |
|
|
1281 | # that Apple uses in portable devices. |
|
|
1282 | UNAME_PROCESSOR=x86_64 |
|
|
1283 | fi |
1238 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1284 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1239 | exit ;; |
1285 | exit ;; |
1240 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1286 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1241 | UNAME_PROCESSOR=`uname -p` |
1287 | UNAME_PROCESSOR=`uname -p` |
1242 | if test "$UNAME_PROCESSOR" = "x86"; then |
1288 | if test "$UNAME_PROCESSOR" = "x86"; then |
… | |
… | |
1246 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
1292 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
1247 | exit ;; |
1293 | exit ;; |
1248 | *:QNX:*:4*) |
1294 | *:QNX:*:4*) |
1249 | echo i386-pc-qnx |
1295 | echo i386-pc-qnx |
1250 | exit ;; |
1296 | exit ;; |
1251 | NSE-?:NONSTOP_KERNEL:*:*) |
1297 | NEO-?:NONSTOP_KERNEL:*:*) |
|
|
1298 | echo neo-tandem-nsk${UNAME_RELEASE} |
|
|
1299 | exit ;; |
|
|
1300 | NSE-*:NONSTOP_KERNEL:*:*) |
1252 | echo nse-tandem-nsk${UNAME_RELEASE} |
1301 | echo nse-tandem-nsk${UNAME_RELEASE} |
1253 | exit ;; |
1302 | exit ;; |
1254 | NSR-?:NONSTOP_KERNEL:*:*) |
1303 | NSR-?:NONSTOP_KERNEL:*:*) |
1255 | echo nsr-tandem-nsk${UNAME_RELEASE} |
1304 | echo nsr-tandem-nsk${UNAME_RELEASE} |
1256 | exit ;; |
1305 | exit ;; |
… | |
… | |
1291 | exit ;; |
1340 | exit ;; |
1292 | *:ITS:*:*) |
1341 | *:ITS:*:*) |
1293 | echo pdp10-unknown-its |
1342 | echo pdp10-unknown-its |
1294 | exit ;; |
1343 | exit ;; |
1295 | SEI:*:*:SEIUX) |
1344 | SEI:*:*:SEIUX) |
1296 | echo mips-sei-seiux${UNAME_RELEASE} |
1345 | echo mips-sei-seiux${UNAME_RELEASE} |
1297 | exit ;; |
1346 | exit ;; |
1298 | *:DragonFly:*:*) |
1347 | *:DragonFly:*:*) |
1299 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
1348 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
1300 | exit ;; |
1349 | exit ;; |
1301 | *:*VMS:*:*) |
1350 | *:*VMS:*:*) |
1302 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1351 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1303 | case "${UNAME_MACHINE}" in |
1352 | case "${UNAME_MACHINE}" in |
1304 | A*) echo alpha-dec-vms ; exit ;; |
1353 | A*) echo alpha-dec-vms ; exit ;; |
1305 | I*) echo ia64-dec-vms ; exit ;; |
1354 | I*) echo ia64-dec-vms ; exit ;; |
1306 | V*) echo vax-dec-vms ; exit ;; |
1355 | V*) echo vax-dec-vms ; exit ;; |
1307 | esac ;; |
1356 | esac ;; |
… | |
… | |
1312 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' |
1361 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' |
1313 | exit ;; |
1362 | exit ;; |
1314 | i*86:rdos:*:*) |
1363 | i*86:rdos:*:*) |
1315 | echo ${UNAME_MACHINE}-pc-rdos |
1364 | echo ${UNAME_MACHINE}-pc-rdos |
1316 | exit ;; |
1365 | exit ;; |
|
|
1366 | i*86:AROS:*:*) |
|
|
1367 | echo ${UNAME_MACHINE}-pc-aros |
|
|
1368 | exit ;; |
|
|
1369 | x86_64:VMkernel:*:*) |
|
|
1370 | echo ${UNAME_MACHINE}-unknown-esx |
|
|
1371 | exit ;; |
1317 | esac |
1372 | esac |
1318 | |
|
|
1319 | #echo '(No uname command or uname output not recognized.)' 1>&2 |
|
|
1320 | #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
|
|
1321 | |
|
|
1322 | eval $set_cc_for_build |
|
|
1323 | cat >$dummy.c <<EOF |
|
|
1324 | #ifdef _SEQUENT_ |
|
|
1325 | # include <sys/types.h> |
|
|
1326 | # include <sys/utsname.h> |
|
|
1327 | #endif |
|
|
1328 | main () |
|
|
1329 | { |
|
|
1330 | #if defined (sony) |
|
|
1331 | #if defined (MIPSEB) |
|
|
1332 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, |
|
|
1333 | I don't know.... */ |
|
|
1334 | printf ("mips-sony-bsd\n"); exit (0); |
|
|
1335 | #else |
|
|
1336 | #include <sys/param.h> |
|
|
1337 | printf ("m68k-sony-newsos%s\n", |
|
|
1338 | #ifdef NEWSOS4 |
|
|
1339 | "4" |
|
|
1340 | #else |
|
|
1341 | "" |
|
|
1342 | #endif |
|
|
1343 | ); exit (0); |
|
|
1344 | #endif |
|
|
1345 | #endif |
|
|
1346 | |
|
|
1347 | #if defined (__arm) && defined (__acorn) && defined (__unix) |
|
|
1348 | printf ("arm-acorn-riscix\n"); exit (0); |
|
|
1349 | #endif |
|
|
1350 | |
|
|
1351 | #if defined (hp300) && !defined (hpux) |
|
|
1352 | printf ("m68k-hp-bsd\n"); exit (0); |
|
|
1353 | #endif |
|
|
1354 | |
|
|
1355 | #if defined (NeXT) |
|
|
1356 | #if !defined (__ARCHITECTURE__) |
|
|
1357 | #define __ARCHITECTURE__ "m68k" |
|
|
1358 | #endif |
|
|
1359 | int version; |
|
|
1360 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
|
|
1361 | if (version < 4) |
|
|
1362 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
|
|
1363 | else |
|
|
1364 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
|
|
1365 | exit (0); |
|
|
1366 | #endif |
|
|
1367 | |
|
|
1368 | #if defined (MULTIMAX) || defined (n16) |
|
|
1369 | #if defined (UMAXV) |
|
|
1370 | printf ("ns32k-encore-sysv\n"); exit (0); |
|
|
1371 | #else |
|
|
1372 | #if defined (CMU) |
|
|
1373 | printf ("ns32k-encore-mach\n"); exit (0); |
|
|
1374 | #else |
|
|
1375 | printf ("ns32k-encore-bsd\n"); exit (0); |
|
|
1376 | #endif |
|
|
1377 | #endif |
|
|
1378 | #endif |
|
|
1379 | |
|
|
1380 | #if defined (__386BSD__) |
|
|
1381 | printf ("i386-pc-bsd\n"); exit (0); |
|
|
1382 | #endif |
|
|
1383 | |
|
|
1384 | #if defined (sequent) |
|
|
1385 | #if defined (i386) |
|
|
1386 | printf ("i386-sequent-dynix\n"); exit (0); |
|
|
1387 | #endif |
|
|
1388 | #if defined (ns32000) |
|
|
1389 | printf ("ns32k-sequent-dynix\n"); exit (0); |
|
|
1390 | #endif |
|
|
1391 | #endif |
|
|
1392 | |
|
|
1393 | #if defined (_SEQUENT_) |
|
|
1394 | struct utsname un; |
|
|
1395 | |
|
|
1396 | uname(&un); |
|
|
1397 | |
|
|
1398 | if (strncmp(un.version, "V2", 2) == 0) { |
|
|
1399 | printf ("i386-sequent-ptx2\n"); exit (0); |
|
|
1400 | } |
|
|
1401 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ |
|
|
1402 | printf ("i386-sequent-ptx1\n"); exit (0); |
|
|
1403 | } |
|
|
1404 | printf ("i386-sequent-ptx\n"); exit (0); |
|
|
1405 | |
|
|
1406 | #endif |
|
|
1407 | |
|
|
1408 | #if defined (vax) |
|
|
1409 | # if !defined (ultrix) |
|
|
1410 | # include <sys/param.h> |
|
|
1411 | # if defined (BSD) |
|
|
1412 | # if BSD == 43 |
|
|
1413 | printf ("vax-dec-bsd4.3\n"); exit (0); |
|
|
1414 | # else |
|
|
1415 | # if BSD == 199006 |
|
|
1416 | printf ("vax-dec-bsd4.3reno\n"); exit (0); |
|
|
1417 | # else |
|
|
1418 | printf ("vax-dec-bsd\n"); exit (0); |
|
|
1419 | # endif |
|
|
1420 | # endif |
|
|
1421 | # else |
|
|
1422 | printf ("vax-dec-bsd\n"); exit (0); |
|
|
1423 | # endif |
|
|
1424 | # else |
|
|
1425 | printf ("vax-dec-ultrix\n"); exit (0); |
|
|
1426 | # endif |
|
|
1427 | #endif |
|
|
1428 | |
|
|
1429 | #if defined (alliant) && defined (i860) |
|
|
1430 | printf ("i860-alliant-bsd\n"); exit (0); |
|
|
1431 | #endif |
|
|
1432 | |
|
|
1433 | exit (1); |
|
|
1434 | } |
|
|
1435 | EOF |
|
|
1436 | |
|
|
1437 | $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && |
|
|
1438 | { echo "$SYSTEM_NAME"; exit; } |
|
|
1439 | |
|
|
1440 | # Apollos put the system type in the environment. |
|
|
1441 | |
|
|
1442 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } |
|
|
1443 | |
|
|
1444 | # Convex versions that predate uname can use getsysinfo(1) |
|
|
1445 | |
|
|
1446 | if [ -x /usr/convex/getsysinfo ] |
|
|
1447 | then |
|
|
1448 | case `getsysinfo -f cpu_type` in |
|
|
1449 | c1*) |
|
|
1450 | echo c1-convex-bsd |
|
|
1451 | exit ;; |
|
|
1452 | c2*) |
|
|
1453 | if getsysinfo -f scalar_acc |
|
|
1454 | then echo c32-convex-bsd |
|
|
1455 | else echo c2-convex-bsd |
|
|
1456 | fi |
|
|
1457 | exit ;; |
|
|
1458 | c34*) |
|
|
1459 | echo c34-convex-bsd |
|
|
1460 | exit ;; |
|
|
1461 | c38*) |
|
|
1462 | echo c38-convex-bsd |
|
|
1463 | exit ;; |
|
|
1464 | c4*) |
|
|
1465 | echo c4-convex-bsd |
|
|
1466 | exit ;; |
|
|
1467 | esac |
|
|
1468 | fi |
|
|
1469 | |
1373 | |
1470 | cat >&2 <<EOF |
1374 | cat >&2 <<EOF |
1471 | $0: unable to guess system type |
1375 | $0: unable to guess system type |
1472 | |
1376 | |
1473 | This script, last modified $timestamp, has failed to recognize |
1377 | This script, last modified $timestamp, has failed to recognize |
1474 | the operating system you are using. It is advised that you |
1378 | the operating system you are using. It is advised that you |
1475 | download the most up to date version of the config scripts from |
1379 | download the most up to date version of the config scripts from |
1476 | |
1380 | |
1477 | http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess |
1381 | http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD |
1478 | and |
1382 | and |
1479 | http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub |
1383 | http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD |
1480 | |
1384 | |
1481 | If the version you run ($0) is already up to date, please |
1385 | If the version you run ($0) is already up to date, please |
1482 | send the following data and any information you think might be |
1386 | send the following data and any information you think might be |
1483 | pertinent to <config-patches@gnu.org> in order to provide the needed |
1387 | pertinent to <config-patches@gnu.org> in order to provide the needed |
1484 | information to handle your system. |
1388 | information to handle your system. |