Import upstream version 3.2.7
Debian Janitor
2 years ago
5 | 5 | [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
6 | 6 | and this project adheres to |
7 | 7 | [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
8 | ||
9 | ## [3.2.7] – 2022-02-19 | |
10 | ||
11 | ### Changed | |
12 | - Update autotools files. | |
13 | ||
14 | ### Fixed | |
15 | - Use only one equal sign in test command for POSIX conformance. Fixes #6 | |
8 | 16 | |
9 | 17 | |
10 | 18 | ## [3.2.6] – 2021-11-15 |
0 | 0 | #! /bin/sh |
1 | 1 | # Attempt to guess a canonical system name. |
2 | # Copyright 1992-2018 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2018-02-24' | |
2 | # Copyright 1992-2022 Free Software Foundation, Inc. | |
3 | ||
4 | # shellcheck disable=SC2006,SC2268 # see below for rationale | |
5 | ||
6 | timestamp='2022-01-09' | |
5 | 7 | |
6 | 8 | # This file is free software; you can redistribute it and/or modify it |
7 | 9 | # under the terms of the GNU General Public License as published by |
8 | # the Free Software Foundation; either version 3 of the License, or | |
10 | # the Free Software Foundation, either version 3 of the License, or | |
9 | 11 | # (at your option) any later version. |
10 | 12 | # |
11 | 13 | # This program is distributed in the hope that it will be useful, but |
26 | 28 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
27 | 29 | # |
28 | 30 | # You can get the latest version of this script from: |
29 | # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
31 | # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess | |
30 | 32 | # |
31 | 33 | # Please send patches to <config-patches@gnu.org>. |
34 | ||
35 | ||
36 | # The "shellcheck disable" line above the timestamp inhibits complaints | |
37 | # about features and limitations of the classic Bourne shell that were | |
38 | # superseded or lifted in POSIX. However, this script identifies a wide | |
39 | # variety of pre-POSIX systems that do not have POSIX shells at all, and | |
40 | # even some reasonably current systems (Solaris 10 as case-in-point) still | |
41 | # have a pre-POSIX /bin/sh. | |
32 | 42 | |
33 | 43 | |
34 | 44 | me=`echo "$0" | sed -e 's,.*/,,'` |
49 | 59 | GNU config.guess ($timestamp) |
50 | 60 | |
51 | 61 | Originally written by Per Bothner. |
52 | Copyright 1992-2018 Free Software Foundation, Inc. | |
62 | Copyright 1992-2022 Free Software Foundation, Inc. | |
53 | 63 | |
54 | 64 | This is free software; see the source for copying conditions. There is NO |
55 | 65 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
83 | 93 | exit 1 |
84 | 94 | fi |
85 | 95 | |
86 | trap 'exit 1' 1 2 15 | |
96 | # Just in case it came from the environment. | |
97 | GUESS= | |
87 | 98 | |
88 | 99 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
89 | 100 | # compiler to aid in system detection is discouraged as it requires |
95 | 106 | |
96 | 107 | # Portable tmp directory creation inspired by the Autoconf team. |
97 | 108 | |
98 | set_cc_for_build=' | |
99 | trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; | |
100 | trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; | |
101 | : ${TMPDIR=/tmp} ; | |
102 | { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
103 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || | |
104 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
105 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | |
106 | dummy=$tmp/dummy ; | |
107 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | |
108 | case $CC_FOR_BUILD,$HOST_CC,$CC in | |
109 | ,,) echo "int x;" > "$dummy.c" ; | |
110 | for c in cc gcc c89 c99 ; do | |
111 | if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then | |
112 | CC_FOR_BUILD="$c"; break ; | |
113 | fi ; | |
114 | done ; | |
115 | if test x"$CC_FOR_BUILD" = x ; then | |
116 | CC_FOR_BUILD=no_compiler_found ; | |
117 | fi | |
118 | ;; | |
119 | ,,*) CC_FOR_BUILD=$CC ;; | |
120 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
121 | esac ; set_cc_for_build= ;' | |
109 | tmp= | |
110 | # shellcheck disable=SC2172 | |
111 | trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 | |
112 | ||
113 | set_cc_for_build() { | |
114 | # prevent multiple calls if $tmp is already set | |
115 | test "$tmp" && return 0 | |
116 | : "${TMPDIR=/tmp}" | |
117 | # shellcheck disable=SC2039,SC3028 | |
118 | { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
119 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || | |
120 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
121 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } | |
122 | dummy=$tmp/dummy | |
123 | case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in | |
124 | ,,) echo "int x;" > "$dummy.c" | |
125 | for driver in cc gcc c89 c99 ; do | |
126 | if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then | |
127 | CC_FOR_BUILD=$driver | |
128 | break | |
129 | fi | |
130 | done | |
131 | if test x"$CC_FOR_BUILD" = x ; then | |
132 | CC_FOR_BUILD=no_compiler_found | |
133 | fi | |
134 | ;; | |
135 | ,,*) CC_FOR_BUILD=$CC ;; | |
136 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
137 | esac | |
138 | } | |
122 | 139 | |
123 | 140 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
124 | 141 | # (ghazi@noc.rutgers.edu 1994-08-24) |
125 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | |
142 | if test -f /.attbin/uname ; then | |
126 | 143 | PATH=$PATH:/.attbin ; export PATH |
127 | 144 | fi |
128 | 145 | |
129 | 146 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
130 | 147 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
131 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | |
148 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | |
132 | 149 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
133 | 150 | |
134 | case "$UNAME_SYSTEM" in | |
151 | case $UNAME_SYSTEM in | |
135 | 152 | Linux|GNU|GNU/*) |
136 | # If the system lacks a compiler, then just pick glibc. | |
137 | # We could probably try harder. | |
138 | LIBC=gnu | |
139 | ||
140 | eval "$set_cc_for_build" | |
153 | LIBC=unknown | |
154 | ||
155 | set_cc_for_build | |
141 | 156 | cat <<-EOF > "$dummy.c" |
142 | 157 | #include <features.h> |
143 | 158 | #if defined(__UCLIBC__) |
144 | 159 | LIBC=uclibc |
145 | 160 | #elif defined(__dietlibc__) |
146 | 161 | LIBC=dietlibc |
162 | #elif defined(__GLIBC__) | |
163 | LIBC=gnu | |
147 | 164 | #else |
148 | LIBC=gnu | |
165 | #include <stdarg.h> | |
166 | /* First heuristic to detect musl libc. */ | |
167 | #ifdef __DEFINED_va_list | |
168 | LIBC=musl | |
169 | #endif | |
149 | 170 | #endif |
150 | 171 | EOF |
151 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" | |
152 | ||
153 | # If ldd exists, use it to detect musl libc. | |
154 | if command -v ldd >/dev/null && \ | |
155 | ldd --version 2>&1 | grep -q ^musl | |
156 | then | |
157 | LIBC=musl | |
172 | cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` | |
173 | eval "$cc_set_libc" | |
174 | ||
175 | # Second heuristic to detect musl libc. | |
176 | if [ "$LIBC" = unknown ] && | |
177 | command -v ldd >/dev/null && | |
178 | ldd --version 2>&1 | grep -q ^musl; then | |
179 | LIBC=musl | |
180 | fi | |
181 | ||
182 | # If the system lacks a compiler, then just pick glibc. | |
183 | # We could probably try harder. | |
184 | if [ "$LIBC" = unknown ]; then | |
185 | LIBC=gnu | |
158 | 186 | fi |
159 | 187 | ;; |
160 | 188 | esac |
161 | 189 | |
162 | 190 | # Note: order is significant - the case branches are not exclusive. |
163 | 191 | |
164 | case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in | |
192 | case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in | |
165 | 193 | *:NetBSD:*:*) |
166 | 194 | # NetBSD (nbsd) targets should (where applicable) match one or |
167 | 195 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
173 | 201 | # |
174 | 202 | # Note: NetBSD doesn't particularly care about the vendor |
175 | 203 | # portion of the name. We always set it to "unknown". |
176 | sysctl="sysctl -n hw.machine_arch" | |
177 | 204 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
178 | "/sbin/$sysctl" 2>/dev/null || \ | |
179 | "/usr/sbin/$sysctl" 2>/dev/null || \ | |
205 | /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ | |
206 | /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ | |
180 | 207 | echo unknown)` |
181 | case "$UNAME_MACHINE_ARCH" in | |
208 | case $UNAME_MACHINE_ARCH in | |
209 | aarch64eb) machine=aarch64_be-unknown ;; | |
182 | 210 | armeb) machine=armeb-unknown ;; |
183 | 211 | arm*) machine=arm-unknown ;; |
184 | 212 | sh3el) machine=shl-unknown ;; |
187 | 215 | earmv*) |
188 | 216 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
189 | 217 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` |
190 | machine="${arch}${endian}"-unknown | |
218 | machine=${arch}${endian}-unknown | |
191 | 219 | ;; |
192 | *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | |
220 | *) machine=$UNAME_MACHINE_ARCH-unknown ;; | |
193 | 221 | esac |
194 | 222 | # The Operating System including object format, if it has switched |
195 | 223 | # to ELF recently (or will in the future) and ABI. |
196 | case "$UNAME_MACHINE_ARCH" in | |
224 | case $UNAME_MACHINE_ARCH in | |
197 | 225 | earm*) |
198 | 226 | os=netbsdelf |
199 | 227 | ;; |
200 | 228 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
201 | eval "$set_cc_for_build" | |
229 | set_cc_for_build | |
202 | 230 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
203 | 231 | | grep -q __ELF__ |
204 | 232 | then |
214 | 242 | ;; |
215 | 243 | esac |
216 | 244 | # Determine ABI tags. |
217 | case "$UNAME_MACHINE_ARCH" in | |
245 | case $UNAME_MACHINE_ARCH in | |
218 | 246 | earm*) |
219 | 247 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
220 | 248 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` |
225 | 253 | # thus, need a distinct triplet. However, they do not need |
226 | 254 | # kernel version information, so it can be replaced with a |
227 | 255 | # suitable tag, in the style of linux-gnu. |
228 | case "$UNAME_VERSION" in | |
256 | case $UNAME_VERSION in | |
229 | 257 | Debian*) |
230 | 258 | release='-gnu' |
231 | 259 | ;; |
236 | 264 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
237 | 265 | # contains redundant information, the shorter form: |
238 | 266 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
239 | echo "$machine-${os}${release}${abi}" | |
240 | exit ;; | |
267 | GUESS=$machine-${os}${release}${abi-} | |
268 | ;; | |
241 | 269 | *:Bitrig:*:*) |
242 | 270 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
243 | echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | |
244 | exit ;; | |
271 | GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE | |
272 | ;; | |
245 | 273 | *:OpenBSD:*:*) |
246 | 274 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
247 | echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | |
248 | exit ;; | |
275 | GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE | |
276 | ;; | |
277 | *:SecBSD:*:*) | |
278 | UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` | |
279 | GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE | |
280 | ;; | |
249 | 281 | *:LibertyBSD:*:*) |
250 | 282 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
251 | echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | |
252 | exit ;; | |
283 | GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE | |
284 | ;; | |
253 | 285 | *:MidnightBSD:*:*) |
254 | echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | |
255 | exit ;; | |
286 | GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE | |
287 | ;; | |
256 | 288 | *:ekkoBSD:*:*) |
257 | echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | |
258 | exit ;; | |
289 | GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE | |
290 | ;; | |
259 | 291 | *:SolidBSD:*:*) |
260 | echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | |
261 | exit ;; | |
292 | GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE | |
293 | ;; | |
294 | *:OS108:*:*) | |
295 | GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE | |
296 | ;; | |
262 | 297 | macppc:MirBSD:*:*) |
263 | echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | |
264 | exit ;; | |
298 | GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE | |
299 | ;; | |
265 | 300 | *:MirBSD:*:*) |
266 | echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | |
267 | exit ;; | |
301 | GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE | |
302 | ;; | |
268 | 303 | *:Sortix:*:*) |
269 | echo "$UNAME_MACHINE"-unknown-sortix | |
270 | exit ;; | |
304 | GUESS=$UNAME_MACHINE-unknown-sortix | |
305 | ;; | |
306 | *:Twizzler:*:*) | |
307 | GUESS=$UNAME_MACHINE-unknown-twizzler | |
308 | ;; | |
271 | 309 | *:Redox:*:*) |
272 | echo "$UNAME_MACHINE"-unknown-redox | |
273 | exit ;; | |
310 | GUESS=$UNAME_MACHINE-unknown-redox | |
311 | ;; | |
274 | 312 | mips:OSF1:*.*) |
275 | echo mips-dec-osf1 | |
276 | exit ;; | |
313 | GUESS=mips-dec-osf1 | |
314 | ;; | |
277 | 315 | alpha:OSF1:*:*) |
316 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
317 | trap '' 0 | |
278 | 318 | case $UNAME_RELEASE in |
279 | 319 | *4.0) |
280 | 320 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
288 | 328 | # covers most systems running today. This code pipes the CPU |
289 | 329 | # types through head -n 1, so we only detect the type of CPU 0. |
290 | 330 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
291 | case "$ALPHA_CPU_TYPE" in | |
331 | case $ALPHA_CPU_TYPE in | |
292 | 332 | "EV4 (21064)") |
293 | 333 | UNAME_MACHINE=alpha ;; |
294 | 334 | "EV4.5 (21064)") |
325 | 365 | # A Tn.n version is a released field test version. |
326 | 366 | # A Xn.n version is an unreleased experimental baselevel. |
327 | 367 | # 1.2 uses "1.2" for uname -r. |
328 | echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" | |
329 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
330 | exitcode=$? | |
331 | trap '' 0 | |
332 | exit $exitcode ;; | |
368 | OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` | |
369 | GUESS=$UNAME_MACHINE-dec-osf$OSF_REL | |
370 | ;; | |
333 | 371 | Amiga*:UNIX_System_V:4.0:*) |
334 | echo m68k-unknown-sysv4 | |
335 | exit ;; | |
372 | GUESS=m68k-unknown-sysv4 | |
373 | ;; | |
336 | 374 | *:[Aa]miga[Oo][Ss]:*:*) |
337 | echo "$UNAME_MACHINE"-unknown-amigaos | |
338 | exit ;; | |
375 | GUESS=$UNAME_MACHINE-unknown-amigaos | |
376 | ;; | |
339 | 377 | *:[Mm]orph[Oo][Ss]:*:*) |
340 | echo "$UNAME_MACHINE"-unknown-morphos | |
341 | exit ;; | |
378 | GUESS=$UNAME_MACHINE-unknown-morphos | |
379 | ;; | |
342 | 380 | *:OS/390:*:*) |
343 | echo i370-ibm-openedition | |
344 | exit ;; | |
381 | GUESS=i370-ibm-openedition | |
382 | ;; | |
345 | 383 | *:z/VM:*:*) |
346 | echo s390-ibm-zvmoe | |
347 | exit ;; | |
384 | GUESS=s390-ibm-zvmoe | |
385 | ;; | |
348 | 386 | *:OS400:*:*) |
349 | echo powerpc-ibm-os400 | |
350 | exit ;; | |
387 | GUESS=powerpc-ibm-os400 | |
388 | ;; | |
351 | 389 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
352 | echo arm-acorn-riscix"$UNAME_RELEASE" | |
353 | exit ;; | |
390 | GUESS=arm-acorn-riscix$UNAME_RELEASE | |
391 | ;; | |
354 | 392 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
355 | echo arm-unknown-riscos | |
356 | exit ;; | |
393 | GUESS=arm-unknown-riscos | |
394 | ;; | |
357 | 395 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
358 | echo hppa1.1-hitachi-hiuxmpp | |
359 | exit ;; | |
396 | GUESS=hppa1.1-hitachi-hiuxmpp | |
397 | ;; | |
360 | 398 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
361 | 399 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
362 | if test "`(/bin/universe) 2>/dev/null`" = att ; then | |
363 | echo pyramid-pyramid-sysv3 | |
364 | else | |
365 | echo pyramid-pyramid-bsd | |
366 | fi | |
367 | exit ;; | |
400 | case `(/bin/universe) 2>/dev/null` in | |
401 | att) GUESS=pyramid-pyramid-sysv3 ;; | |
402 | *) GUESS=pyramid-pyramid-bsd ;; | |
403 | esac | |
404 | ;; | |
368 | 405 | NILE*:*:*:dcosx) |
369 | echo pyramid-pyramid-svr4 | |
370 | exit ;; | |
406 | GUESS=pyramid-pyramid-svr4 | |
407 | ;; | |
371 | 408 | DRS?6000:unix:4.0:6*) |
372 | echo sparc-icl-nx6 | |
373 | exit ;; | |
409 | GUESS=sparc-icl-nx6 | |
410 | ;; | |
374 | 411 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
375 | 412 | case `/usr/bin/uname -p` in |
376 | sparc) echo sparc-icl-nx7; exit ;; | |
377 | esac ;; | |
413 | sparc) GUESS=sparc-icl-nx7 ;; | |
414 | esac | |
415 | ;; | |
378 | 416 | s390x:SunOS:*:*) |
379 | echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
380 | exit ;; | |
417 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
418 | GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL | |
419 | ;; | |
381 | 420 | sun4H:SunOS:5.*:*) |
382 | echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
383 | exit ;; | |
421 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
422 | GUESS=sparc-hal-solaris2$SUN_REL | |
423 | ;; | |
384 | 424 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
385 | echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
386 | exit ;; | |
425 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
426 | GUESS=sparc-sun-solaris2$SUN_REL | |
427 | ;; | |
387 | 428 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
388 | echo i386-pc-auroraux"$UNAME_RELEASE" | |
389 | exit ;; | |
429 | GUESS=i386-pc-auroraux$UNAME_RELEASE | |
430 | ;; | |
390 | 431 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
391 | eval "$set_cc_for_build" | |
432 | set_cc_for_build | |
392 | 433 | SUN_ARCH=i386 |
393 | 434 | # If there is a compiler, see if it is configured for 64-bit objects. |
394 | 435 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
395 | 436 | # This test works for both compilers. |
396 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
437 | if test "$CC_FOR_BUILD" != no_compiler_found; then | |
397 | 438 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
398 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
439 | (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ | |
399 | 440 | grep IS_64BIT_ARCH >/dev/null |
400 | 441 | then |
401 | 442 | SUN_ARCH=x86_64 |
402 | 443 | fi |
403 | 444 | fi |
404 | echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
405 | exit ;; | |
445 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
446 | GUESS=$SUN_ARCH-pc-solaris2$SUN_REL | |
447 | ;; | |
406 | 448 | sun4*:SunOS:6*:*) |
407 | 449 | # According to config.sub, this is the proper way to canonicalize |
408 | 450 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
409 | 451 | # it's likely to be more like Solaris than SunOS4. |
410 | echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
411 | exit ;; | |
452 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
453 | GUESS=sparc-sun-solaris3$SUN_REL | |
454 | ;; | |
412 | 455 | sun4*:SunOS:*:*) |
413 | case "`/usr/bin/arch -k`" in | |
456 | case `/usr/bin/arch -k` in | |
414 | 457 | Series*|S4*) |
415 | 458 | UNAME_RELEASE=`uname -v` |
416 | 459 | ;; |
417 | 460 | esac |
418 | 461 | # Japanese Language versions have a version number like `4.1.3-JL'. |
419 | echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" | |
420 | exit ;; | |
462 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` | |
463 | GUESS=sparc-sun-sunos$SUN_REL | |
464 | ;; | |
421 | 465 | sun3*:SunOS:*:*) |
422 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
423 | exit ;; | |
466 | GUESS=m68k-sun-sunos$UNAME_RELEASE | |
467 | ;; | |
424 | 468 | sun*:*:4.2BSD:*) |
425 | 469 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
426 | 470 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
427 | case "`/bin/arch`" in | |
471 | case `/bin/arch` in | |
428 | 472 | sun3) |
429 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
473 | GUESS=m68k-sun-sunos$UNAME_RELEASE | |
430 | 474 | ;; |
431 | 475 | sun4) |
432 | echo sparc-sun-sunos"$UNAME_RELEASE" | |
476 | GUESS=sparc-sun-sunos$UNAME_RELEASE | |
433 | 477 | ;; |
434 | 478 | esac |
435 | exit ;; | |
479 | ;; | |
436 | 480 | aushp:SunOS:*:*) |
437 | echo sparc-auspex-sunos"$UNAME_RELEASE" | |
438 | exit ;; | |
481 | GUESS=sparc-auspex-sunos$UNAME_RELEASE | |
482 | ;; | |
439 | 483 | # The situation for MiNT is a little confusing. The machine name |
440 | 484 | # can be virtually everything (everything which is not |
441 | 485 | # "atarist" or "atariste" at least should have a processor |
445 | 489 | # MiNT. But MiNT is downward compatible to TOS, so this should |
446 | 490 | # be no problem. |
447 | 491 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
448 | echo m68k-atari-mint"$UNAME_RELEASE" | |
449 | exit ;; | |
492 | GUESS=m68k-atari-mint$UNAME_RELEASE | |
493 | ;; | |
450 | 494 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
451 | echo m68k-atari-mint"$UNAME_RELEASE" | |
452 | exit ;; | |
495 | GUESS=m68k-atari-mint$UNAME_RELEASE | |
496 | ;; | |
453 | 497 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
454 | echo m68k-atari-mint"$UNAME_RELEASE" | |
455 | exit ;; | |
498 | GUESS=m68k-atari-mint$UNAME_RELEASE | |
499 | ;; | |
456 | 500 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
457 | echo m68k-milan-mint"$UNAME_RELEASE" | |
458 | exit ;; | |
501 | GUESS=m68k-milan-mint$UNAME_RELEASE | |
502 | ;; | |
459 | 503 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
460 | echo m68k-hades-mint"$UNAME_RELEASE" | |
461 | exit ;; | |
504 | GUESS=m68k-hades-mint$UNAME_RELEASE | |
505 | ;; | |
462 | 506 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
463 | echo m68k-unknown-mint"$UNAME_RELEASE" | |
464 | exit ;; | |
507 | GUESS=m68k-unknown-mint$UNAME_RELEASE | |
508 | ;; | |
465 | 509 | m68k:machten:*:*) |
466 | echo m68k-apple-machten"$UNAME_RELEASE" | |
467 | exit ;; | |
510 | GUESS=m68k-apple-machten$UNAME_RELEASE | |
511 | ;; | |
468 | 512 | powerpc:machten:*:*) |
469 | echo powerpc-apple-machten"$UNAME_RELEASE" | |
470 | exit ;; | |
513 | GUESS=powerpc-apple-machten$UNAME_RELEASE | |
514 | ;; | |
471 | 515 | RISC*:Mach:*:*) |
472 | echo mips-dec-mach_bsd4.3 | |
473 | exit ;; | |
516 | GUESS=mips-dec-mach_bsd4.3 | |
517 | ;; | |
474 | 518 | RISC*:ULTRIX:*:*) |
475 | echo mips-dec-ultrix"$UNAME_RELEASE" | |
476 | exit ;; | |
519 | GUESS=mips-dec-ultrix$UNAME_RELEASE | |
520 | ;; | |
477 | 521 | VAX*:ULTRIX*:*:*) |
478 | echo vax-dec-ultrix"$UNAME_RELEASE" | |
479 | exit ;; | |
522 | GUESS=vax-dec-ultrix$UNAME_RELEASE | |
523 | ;; | |
480 | 524 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
481 | echo clipper-intergraph-clix"$UNAME_RELEASE" | |
482 | exit ;; | |
525 | GUESS=clipper-intergraph-clix$UNAME_RELEASE | |
526 | ;; | |
483 | 527 | mips:*:*:UMIPS | mips:*:*:RISCos) |
484 | eval "$set_cc_for_build" | |
528 | set_cc_for_build | |
485 | 529 | sed 's/^ //' << EOF > "$dummy.c" |
486 | 530 | #ifdef __cplusplus |
487 | 531 | #include <stdio.h> /* for printf() prototype */ |
507 | 551 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && |
508 | 552 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && |
509 | 553 | { echo "$SYSTEM_NAME"; exit; } |
510 | echo mips-mips-riscos"$UNAME_RELEASE" | |
511 | exit ;; | |
554 | GUESS=mips-mips-riscos$UNAME_RELEASE | |
555 | ;; | |
512 | 556 | Motorola:PowerMAX_OS:*:*) |
513 | echo powerpc-motorola-powermax | |
514 | exit ;; | |
557 | GUESS=powerpc-motorola-powermax | |
558 | ;; | |
515 | 559 | Motorola:*:4.3:PL8-*) |
516 | echo powerpc-harris-powermax | |
517 | exit ;; | |
560 | GUESS=powerpc-harris-powermax | |
561 | ;; | |
518 | 562 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
519 | echo powerpc-harris-powermax | |
520 | exit ;; | |
563 | GUESS=powerpc-harris-powermax | |
564 | ;; | |
521 | 565 | Night_Hawk:Power_UNIX:*:*) |
522 | echo powerpc-harris-powerunix | |
523 | exit ;; | |
566 | GUESS=powerpc-harris-powerunix | |
567 | ;; | |
524 | 568 | m88k:CX/UX:7*:*) |
525 | echo m88k-harris-cxux7 | |
526 | exit ;; | |
569 | GUESS=m88k-harris-cxux7 | |
570 | ;; | |
527 | 571 | m88k:*:4*:R4*) |
528 | echo m88k-motorola-sysv4 | |
529 | exit ;; | |
572 | GUESS=m88k-motorola-sysv4 | |
573 | ;; | |
530 | 574 | m88k:*:3*:R3*) |
531 | echo m88k-motorola-sysv3 | |
532 | exit ;; | |
575 | GUESS=m88k-motorola-sysv3 | |
576 | ;; | |
533 | 577 | AViiON:dgux:*:*) |
534 | 578 | # DG/UX returns AViiON for all architectures |
535 | 579 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
536 | if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] | |
580 | if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 | |
537 | 581 | then |
538 | if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ | |
539 | [ "$TARGET_BINARY_INTERFACE"x = x ] | |
582 | if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ | |
583 | test "$TARGET_BINARY_INTERFACE"x = x | |
540 | 584 | then |
541 | echo m88k-dg-dgux"$UNAME_RELEASE" | |
585 | GUESS=m88k-dg-dgux$UNAME_RELEASE | |
542 | 586 | else |
543 | echo m88k-dg-dguxbcs"$UNAME_RELEASE" | |
587 | GUESS=m88k-dg-dguxbcs$UNAME_RELEASE | |
544 | 588 | fi |
545 | 589 | else |
546 | echo i586-dg-dgux"$UNAME_RELEASE" | |
547 | fi | |
548 | exit ;; | |
590 | GUESS=i586-dg-dgux$UNAME_RELEASE | |
591 | fi | |
592 | ;; | |
549 | 593 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
550 | echo m88k-dolphin-sysv3 | |
551 | exit ;; | |
594 | GUESS=m88k-dolphin-sysv3 | |
595 | ;; | |
552 | 596 | M88*:*:R3*:*) |
553 | 597 | # Delta 88k system running SVR3 |
554 | echo m88k-motorola-sysv3 | |
555 | exit ;; | |
598 | GUESS=m88k-motorola-sysv3 | |
599 | ;; | |
556 | 600 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
557 | echo m88k-tektronix-sysv3 | |
558 | exit ;; | |
601 | GUESS=m88k-tektronix-sysv3 | |
602 | ;; | |
559 | 603 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
560 | echo m68k-tektronix-bsd | |
561 | exit ;; | |
604 | GUESS=m68k-tektronix-bsd | |
605 | ;; | |
562 | 606 | *:IRIX*:*:*) |
563 | echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" | |
564 | exit ;; | |
607 | IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` | |
608 | GUESS=mips-sgi-irix$IRIX_REL | |
609 | ;; | |
565 | 610 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
566 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
567 | exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
611 | GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
612 | ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
568 | 613 | i*86:AIX:*:*) |
569 | echo i386-ibm-aix | |
570 | exit ;; | |
614 | GUESS=i386-ibm-aix | |
615 | ;; | |
571 | 616 | ia64:AIX:*:*) |
572 | if [ -x /usr/bin/oslevel ] ; then | |
617 | if test -x /usr/bin/oslevel ; then | |
573 | 618 | IBM_REV=`/usr/bin/oslevel` |
574 | 619 | else |
575 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
576 | fi | |
577 | echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | |
578 | exit ;; | |
620 | IBM_REV=$UNAME_VERSION.$UNAME_RELEASE | |
621 | fi | |
622 | GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV | |
623 | ;; | |
579 | 624 | *:AIX:2:3) |
580 | 625 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
581 | eval "$set_cc_for_build" | |
626 | set_cc_for_build | |
582 | 627 | sed 's/^ //' << EOF > "$dummy.c" |
583 | 628 | #include <sys/systemcfg.h> |
584 | 629 | |
592 | 637 | EOF |
593 | 638 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` |
594 | 639 | then |
595 | echo "$SYSTEM_NAME" | |
640 | GUESS=$SYSTEM_NAME | |
596 | 641 | else |
597 | echo rs6000-ibm-aix3.2.5 | |
642 | GUESS=rs6000-ibm-aix3.2.5 | |
598 | 643 | fi |
599 | 644 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
600 | echo rs6000-ibm-aix3.2.4 | |
645 | GUESS=rs6000-ibm-aix3.2.4 | |
601 | 646 | else |
602 | echo rs6000-ibm-aix3.2 | |
603 | fi | |
604 | exit ;; | |
647 | GUESS=rs6000-ibm-aix3.2 | |
648 | fi | |
649 | ;; | |
605 | 650 | *:AIX:*:[4567]) |
606 | 651 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
607 | 652 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
609 | 654 | else |
610 | 655 | IBM_ARCH=powerpc |
611 | 656 | fi |
612 | if [ -x /usr/bin/lslpp ] ; then | |
613 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | | |
657 | if test -x /usr/bin/lslpp ; then | |
658 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ | |
614 | 659 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
615 | 660 | else |
616 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
617 | fi | |
618 | echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | |
619 | exit ;; | |
661 | IBM_REV=$UNAME_VERSION.$UNAME_RELEASE | |
662 | fi | |
663 | GUESS=$IBM_ARCH-ibm-aix$IBM_REV | |
664 | ;; | |
620 | 665 | *:AIX:*:*) |
621 | echo rs6000-ibm-aix | |
622 | exit ;; | |
666 | GUESS=rs6000-ibm-aix | |
667 | ;; | |
623 | 668 | ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
624 | echo romp-ibm-bsd4.4 | |
625 | exit ;; | |
669 | GUESS=romp-ibm-bsd4.4 | |
670 | ;; | |
626 | 671 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
627 | echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to | |
628 | exit ;; # report: romp-ibm BSD 4.3 | |
672 | GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to | |
673 | ;; # report: romp-ibm BSD 4.3 | |
629 | 674 | *:BOSX:*:*) |
630 | echo rs6000-bull-bosx | |
631 | exit ;; | |
675 | GUESS=rs6000-bull-bosx | |
676 | ;; | |
632 | 677 | DPX/2?00:B.O.S.:*:*) |
633 | echo m68k-bull-sysv3 | |
634 | exit ;; | |
678 | GUESS=m68k-bull-sysv3 | |
679 | ;; | |
635 | 680 | 9000/[34]??:4.3bsd:1.*:*) |
636 | echo m68k-hp-bsd | |
637 | exit ;; | |
681 | GUESS=m68k-hp-bsd | |
682 | ;; | |
638 | 683 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
639 | echo m68k-hp-bsd4.4 | |
640 | exit ;; | |
684 | GUESS=m68k-hp-bsd4.4 | |
685 | ;; | |
641 | 686 | 9000/[34678]??:HP-UX:*:*) |
642 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
643 | case "$UNAME_MACHINE" in | |
687 | HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` | |
688 | case $UNAME_MACHINE in | |
644 | 689 | 9000/31?) HP_ARCH=m68000 ;; |
645 | 690 | 9000/[34]??) HP_ARCH=m68k ;; |
646 | 691 | 9000/[678][0-9][0-9]) |
647 | if [ -x /usr/bin/getconf ]; then | |
692 | if test -x /usr/bin/getconf; then | |
648 | 693 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
649 | 694 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
650 | case "$sc_cpu_version" in | |
695 | case $sc_cpu_version in | |
651 | 696 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
652 | 697 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
653 | 698 | 532) # CPU_PA_RISC2_0 |
654 | case "$sc_kernel_bits" in | |
699 | case $sc_kernel_bits in | |
655 | 700 | 32) HP_ARCH=hppa2.0n ;; |
656 | 701 | 64) HP_ARCH=hppa2.0w ;; |
657 | 702 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
658 | 703 | esac ;; |
659 | 704 | esac |
660 | 705 | fi |
661 | if [ "$HP_ARCH" = "" ]; then | |
662 | eval "$set_cc_for_build" | |
706 | if test "$HP_ARCH" = ""; then | |
707 | set_cc_for_build | |
663 | 708 | sed 's/^ //' << EOF > "$dummy.c" |
664 | 709 | |
665 | 710 | #define _HPUX_SOURCE |
697 | 742 | test -z "$HP_ARCH" && HP_ARCH=hppa |
698 | 743 | fi ;; |
699 | 744 | esac |
700 | if [ "$HP_ARCH" = hppa2.0w ] | |
745 | if test "$HP_ARCH" = hppa2.0w | |
701 | 746 | then |
702 | eval "$set_cc_for_build" | |
747 | set_cc_for_build | |
703 | 748 | |
704 | 749 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
705 | 750 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
718 | 763 | HP_ARCH=hppa64 |
719 | 764 | fi |
720 | 765 | fi |
721 | echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | |
722 | exit ;; | |
766 | GUESS=$HP_ARCH-hp-hpux$HPUX_REV | |
767 | ;; | |
723 | 768 | ia64:HP-UX:*:*) |
724 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
725 | echo ia64-hp-hpux"$HPUX_REV" | |
726 | exit ;; | |
769 | HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` | |
770 | GUESS=ia64-hp-hpux$HPUX_REV | |
771 | ;; | |
727 | 772 | 3050*:HI-UX:*:*) |
728 | eval "$set_cc_for_build" | |
773 | set_cc_for_build | |
729 | 774 | sed 's/^ //' << EOF > "$dummy.c" |
730 | 775 | #include <unistd.h> |
731 | 776 | int |
753 | 798 | EOF |
754 | 799 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && |
755 | 800 | { echo "$SYSTEM_NAME"; exit; } |
756 | echo unknown-hitachi-hiuxwe2 | |
757 | exit ;; | |
801 | GUESS=unknown-hitachi-hiuxwe2 | |
802 | ;; | |
758 | 803 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
759 | echo hppa1.1-hp-bsd | |
760 | exit ;; | |
804 | GUESS=hppa1.1-hp-bsd | |
805 | ;; | |
761 | 806 | 9000/8??:4.3bsd:*:*) |
762 | echo hppa1.0-hp-bsd | |
763 | exit ;; | |
807 | GUESS=hppa1.0-hp-bsd | |
808 | ;; | |
764 | 809 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
765 | echo hppa1.0-hp-mpeix | |
766 | exit ;; | |
810 | GUESS=hppa1.0-hp-mpeix | |
811 | ;; | |
767 | 812 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) |
768 | echo hppa1.1-hp-osf | |
769 | exit ;; | |
813 | GUESS=hppa1.1-hp-osf | |
814 | ;; | |
770 | 815 | hp8??:OSF1:*:*) |
771 | echo hppa1.0-hp-osf | |
772 | exit ;; | |
816 | GUESS=hppa1.0-hp-osf | |
817 | ;; | |
773 | 818 | i*86:OSF1:*:*) |
774 | if [ -x /usr/sbin/sysversion ] ; then | |
775 | echo "$UNAME_MACHINE"-unknown-osf1mk | |
819 | if test -x /usr/sbin/sysversion ; then | |
820 | GUESS=$UNAME_MACHINE-unknown-osf1mk | |
776 | 821 | else |
777 | echo "$UNAME_MACHINE"-unknown-osf1 | |
778 | fi | |
779 | exit ;; | |
822 | GUESS=$UNAME_MACHINE-unknown-osf1 | |
823 | fi | |
824 | ;; | |
780 | 825 | parisc*:Lites*:*:*) |
781 | echo hppa1.1-hp-lites | |
782 | exit ;; | |
826 | GUESS=hppa1.1-hp-lites | |
827 | ;; | |
783 | 828 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
784 | echo c1-convex-bsd | |
785 | exit ;; | |
829 | GUESS=c1-convex-bsd | |
830 | ;; | |
786 | 831 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
787 | 832 | if getsysinfo -f scalar_acc |
788 | 833 | then echo c32-convex-bsd |
790 | 835 | fi |
791 | 836 | exit ;; |
792 | 837 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
793 | echo c34-convex-bsd | |
794 | exit ;; | |
838 | GUESS=c34-convex-bsd | |
839 | ;; | |
795 | 840 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
796 | echo c38-convex-bsd | |
797 | exit ;; | |
841 | GUESS=c38-convex-bsd | |
842 | ;; | |
798 | 843 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
799 | echo c4-convex-bsd | |
800 | exit ;; | |
844 | GUESS=c4-convex-bsd | |
845 | ;; | |
801 | 846 | CRAY*Y-MP:*:*:*) |
802 | echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
803 | exit ;; | |
847 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
848 | GUESS=ymp-cray-unicos$CRAY_REL | |
849 | ;; | |
804 | 850 | CRAY*[A-Z]90:*:*:*) |
805 | 851 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ |
806 | 852 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
808 | 854 | -e 's/\.[^.]*$/.X/' |
809 | 855 | exit ;; |
810 | 856 | CRAY*TS:*:*:*) |
811 | echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
812 | exit ;; | |
857 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
858 | GUESS=t90-cray-unicos$CRAY_REL | |
859 | ;; | |
813 | 860 | CRAY*T3E:*:*:*) |
814 | echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
815 | exit ;; | |
861 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
862 | GUESS=alphaev5-cray-unicosmk$CRAY_REL | |
863 | ;; | |
816 | 864 | CRAY*SV1:*:*:*) |
817 | echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
818 | exit ;; | |
865 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
866 | GUESS=sv1-cray-unicos$CRAY_REL | |
867 | ;; | |
819 | 868 | *:UNICOS/mp:*:*) |
820 | echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
821 | exit ;; | |
869 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
870 | GUESS=craynv-cray-unicosmp$CRAY_REL | |
871 | ;; | |
822 | 872 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
823 | 873 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
824 | 874 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
825 | 875 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` |
826 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
827 | exit ;; | |
876 | GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} | |
877 | ;; | |
828 | 878 | 5000:UNIX_System_V:4.*:*) |
829 | 879 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
830 | 880 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
831 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
832 | exit ;; | |
881 | GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} | |
882 | ;; | |
833 | 883 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
834 | echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | |
835 | exit ;; | |
884 | GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE | |
885 | ;; | |
836 | 886 | sparc*:BSD/OS:*:*) |
837 | echo sparc-unknown-bsdi"$UNAME_RELEASE" | |
838 | exit ;; | |
887 | GUESS=sparc-unknown-bsdi$UNAME_RELEASE | |
888 | ;; | |
839 | 889 | *:BSD/OS:*:*) |
840 | echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | |
841 | exit ;; | |
890 | GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE | |
891 | ;; | |
892 | arm:FreeBSD:*:*) | |
893 | UNAME_PROCESSOR=`uname -p` | |
894 | set_cc_for_build | |
895 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
896 | | grep -q __ARM_PCS_VFP | |
897 | then | |
898 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
899 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi | |
900 | else | |
901 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
902 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf | |
903 | fi | |
904 | ;; | |
842 | 905 | *:FreeBSD:*:*) |
843 | 906 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
844 | case "$UNAME_PROCESSOR" in | |
907 | case $UNAME_PROCESSOR in | |
845 | 908 | amd64) |
846 | 909 | UNAME_PROCESSOR=x86_64 ;; |
847 | 910 | i386) |
848 | 911 | UNAME_PROCESSOR=i586 ;; |
849 | 912 | esac |
850 | echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
851 | exit ;; | |
913 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
914 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL | |
915 | ;; | |
852 | 916 | i*:CYGWIN*:*) |
853 | echo "$UNAME_MACHINE"-pc-cygwin | |
854 | exit ;; | |
917 | GUESS=$UNAME_MACHINE-pc-cygwin | |
918 | ;; | |
855 | 919 | *:MINGW64*:*) |
856 | echo "$UNAME_MACHINE"-pc-mingw64 | |
857 | exit ;; | |
920 | GUESS=$UNAME_MACHINE-pc-mingw64 | |
921 | ;; | |
858 | 922 | *:MINGW*:*) |
859 | echo "$UNAME_MACHINE"-pc-mingw32 | |
860 | exit ;; | |
923 | GUESS=$UNAME_MACHINE-pc-mingw32 | |
924 | ;; | |
861 | 925 | *:MSYS*:*) |
862 | echo "$UNAME_MACHINE"-pc-msys | |
863 | exit ;; | |
926 | GUESS=$UNAME_MACHINE-pc-msys | |
927 | ;; | |
864 | 928 | i*:PW*:*) |
865 | echo "$UNAME_MACHINE"-pc-pw32 | |
866 | exit ;; | |
929 | GUESS=$UNAME_MACHINE-pc-pw32 | |
930 | ;; | |
931 | *:SerenityOS:*:*) | |
932 | GUESS=$UNAME_MACHINE-pc-serenity | |
933 | ;; | |
867 | 934 | *:Interix*:*) |
868 | case "$UNAME_MACHINE" in | |
935 | case $UNAME_MACHINE in | |
869 | 936 | x86) |
870 | echo i586-pc-interix"$UNAME_RELEASE" | |
871 | exit ;; | |
937 | GUESS=i586-pc-interix$UNAME_RELEASE | |
938 | ;; | |
872 | 939 | authenticamd | genuineintel | EM64T) |
873 | echo x86_64-unknown-interix"$UNAME_RELEASE" | |
874 | exit ;; | |
940 | GUESS=x86_64-unknown-interix$UNAME_RELEASE | |
941 | ;; | |
875 | 942 | IA64) |
876 | echo ia64-unknown-interix"$UNAME_RELEASE" | |
877 | exit ;; | |
943 | GUESS=ia64-unknown-interix$UNAME_RELEASE | |
944 | ;; | |
878 | 945 | esac ;; |
879 | 946 | i*:UWIN*:*) |
880 | echo "$UNAME_MACHINE"-pc-uwin | |
881 | exit ;; | |
947 | GUESS=$UNAME_MACHINE-pc-uwin | |
948 | ;; | |
882 | 949 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
883 | echo x86_64-unknown-cygwin | |
884 | exit ;; | |
950 | GUESS=x86_64-pc-cygwin | |
951 | ;; | |
885 | 952 | prep*:SunOS:5.*:*) |
886 | echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
887 | exit ;; | |
953 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
954 | GUESS=powerpcle-unknown-solaris2$SUN_REL | |
955 | ;; | |
888 | 956 | *:GNU:*:*) |
889 | 957 | # the GNU system |
890 | echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" | |
891 | exit ;; | |
958 | GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` | |
959 | GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` | |
960 | GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL | |
961 | ;; | |
892 | 962 | *:GNU/*:*:*) |
893 | 963 | # other systems with GNU libc and userland |
894 | echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" | |
895 | exit ;; | |
896 | i*86:Minix:*:*) | |
897 | echo "$UNAME_MACHINE"-pc-minix | |
898 | exit ;; | |
964 | GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` | |
965 | GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
966 | GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC | |
967 | ;; | |
968 | *:Minix:*:*) | |
969 | GUESS=$UNAME_MACHINE-unknown-minix | |
970 | ;; | |
899 | 971 | aarch64:Linux:*:*) |
900 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
901 | exit ;; | |
972 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
973 | ;; | |
902 | 974 | aarch64_be:Linux:*:*) |
903 | 975 | UNAME_MACHINE=aarch64_be |
904 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
905 | exit ;; | |
976 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
977 | ;; | |
906 | 978 | alpha:Linux:*:*) |
907 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
979 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in | |
908 | 980 | EV5) UNAME_MACHINE=alphaev5 ;; |
909 | 981 | EV56) UNAME_MACHINE=alphaev56 ;; |
910 | 982 | PCA56) UNAME_MACHINE=alphapca56 ;; |
915 | 987 | esac |
916 | 988 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
917 | 989 | if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
918 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
919 | exit ;; | |
920 | arc:Linux:*:* | arceb:Linux:*:*) | |
921 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
922 | exit ;; | |
990 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
991 | ;; | |
992 | arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) | |
993 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
994 | ;; | |
923 | 995 | arm*:Linux:*:*) |
924 | eval "$set_cc_for_build" | |
996 | set_cc_for_build | |
925 | 997 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
926 | 998 | | grep -q __ARM_EABI__ |
927 | 999 | then |
928 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1000 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
929 | 1001 | else |
930 | 1002 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
931 | 1003 | | grep -q __ARM_PCS_VFP |
932 | 1004 | then |
933 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi | |
1005 | GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi | |
934 | 1006 | else |
935 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf | |
1007 | GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf | |
936 | 1008 | fi |
937 | 1009 | fi |
938 | exit ;; | |
1010 | ;; | |
939 | 1011 | avr32*:Linux:*:*) |
940 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
941 | exit ;; | |
1012 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1013 | ;; | |
942 | 1014 | cris:Linux:*:*) |
943 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
944 | exit ;; | |
1015 | GUESS=$UNAME_MACHINE-axis-linux-$LIBC | |
1016 | ;; | |
945 | 1017 | crisv32:Linux:*:*) |
946 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
947 | exit ;; | |
1018 | GUESS=$UNAME_MACHINE-axis-linux-$LIBC | |
1019 | ;; | |
948 | 1020 | e2k:Linux:*:*) |
949 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
950 | exit ;; | |
1021 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1022 | ;; | |
951 | 1023 | frv:Linux:*:*) |
952 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
953 | exit ;; | |
1024 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1025 | ;; | |
954 | 1026 | hexagon:Linux:*:*) |
955 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
956 | exit ;; | |
1027 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1028 | ;; | |
957 | 1029 | i*86:Linux:*:*) |
958 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
959 | exit ;; | |
1030 | GUESS=$UNAME_MACHINE-pc-linux-$LIBC | |
1031 | ;; | |
960 | 1032 | ia64:Linux:*:*) |
961 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
962 | exit ;; | |
1033 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1034 | ;; | |
963 | 1035 | k1om:Linux:*:*) |
964 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
965 | exit ;; | |
1036 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1037 | ;; | |
1038 | loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) | |
1039 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1040 | ;; | |
966 | 1041 | m32r*:Linux:*:*) |
967 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
968 | exit ;; | |
1042 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1043 | ;; | |
969 | 1044 | m68*:Linux:*:*) |
970 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
971 | exit ;; | |
1045 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1046 | ;; | |
972 | 1047 | mips:Linux:*:* | mips64:Linux:*:*) |
973 | eval "$set_cc_for_build" | |
1048 | set_cc_for_build | |
1049 | IS_GLIBC=0 | |
1050 | test x"${LIBC}" = xgnu && IS_GLIBC=1 | |
974 | 1051 | sed 's/^ //' << EOF > "$dummy.c" |
975 | 1052 | #undef CPU |
976 | #undef ${UNAME_MACHINE} | |
977 | #undef ${UNAME_MACHINE}el | |
1053 | #undef mips | |
1054 | #undef mipsel | |
1055 | #undef mips64 | |
1056 | #undef mips64el | |
1057 | #if ${IS_GLIBC} && defined(_ABI64) | |
1058 | LIBCABI=gnuabi64 | |
1059 | #else | |
1060 | #if ${IS_GLIBC} && defined(_ABIN32) | |
1061 | LIBCABI=gnuabin32 | |
1062 | #else | |
1063 | LIBCABI=${LIBC} | |
1064 | #endif | |
1065 | #endif | |
1066 | ||
1067 | #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
1068 | CPU=mipsisa64r6 | |
1069 | #else | |
1070 | #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
1071 | CPU=mipsisa32r6 | |
1072 | #else | |
1073 | #if defined(__mips64) | |
1074 | CPU=mips64 | |
1075 | #else | |
1076 | CPU=mips | |
1077 | #endif | |
1078 | #endif | |
1079 | #endif | |
1080 | ||
978 | 1081 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
979 | CPU=${UNAME_MACHINE}el | |
1082 | MIPS_ENDIAN=el | |
980 | 1083 | #else |
981 | 1084 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
982 | CPU=${UNAME_MACHINE} | |
1085 | MIPS_ENDIAN= | |
983 | 1086 | #else |
984 | CPU= | |
1087 | MIPS_ENDIAN= | |
985 | 1088 | #endif |
986 | 1089 | #endif |
987 | 1090 | EOF |
988 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" | |
989 | test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } | |
1091 | cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` | |
1092 | eval "$cc_set_vars" | |
1093 | test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } | |
990 | 1094 | ;; |
991 | 1095 | mips64el:Linux:*:*) |
992 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
993 | exit ;; | |
1096 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1097 | ;; | |
994 | 1098 | openrisc*:Linux:*:*) |
995 | echo or1k-unknown-linux-"$LIBC" | |
996 | exit ;; | |
1099 | GUESS=or1k-unknown-linux-$LIBC | |
1100 | ;; | |
997 | 1101 | or32:Linux:*:* | or1k*:Linux:*:*) |
998 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
999 | exit ;; | |
1102 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1103 | ;; | |
1000 | 1104 | padre:Linux:*:*) |
1001 | echo sparc-unknown-linux-"$LIBC" | |
1002 | exit ;; | |
1105 | GUESS=sparc-unknown-linux-$LIBC | |
1106 | ;; | |
1003 | 1107 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
1004 | echo hppa64-unknown-linux-"$LIBC" | |
1005 | exit ;; | |
1108 | GUESS=hppa64-unknown-linux-$LIBC | |
1109 | ;; | |
1006 | 1110 | parisc:Linux:*:* | hppa:Linux:*:*) |
1007 | 1111 | # Look for CPU level |
1008 | 1112 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
1009 | PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; | |
1010 | PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; | |
1011 | *) echo hppa-unknown-linux-"$LIBC" ;; | |
1113 | PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; | |
1114 | PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; | |
1115 | *) GUESS=hppa-unknown-linux-$LIBC ;; | |
1012 | 1116 | esac |
1013 | exit ;; | |
1117 | ;; | |
1014 | 1118 | ppc64:Linux:*:*) |
1015 | echo powerpc64-unknown-linux-"$LIBC" | |
1016 | exit ;; | |
1119 | GUESS=powerpc64-unknown-linux-$LIBC | |
1120 | ;; | |
1017 | 1121 | ppc:Linux:*:*) |
1018 | echo powerpc-unknown-linux-"$LIBC" | |
1019 | exit ;; | |
1122 | GUESS=powerpc-unknown-linux-$LIBC | |
1123 | ;; | |
1020 | 1124 | ppc64le:Linux:*:*) |
1021 | echo powerpc64le-unknown-linux-"$LIBC" | |
1022 | exit ;; | |
1125 | GUESS=powerpc64le-unknown-linux-$LIBC | |
1126 | ;; | |
1023 | 1127 | ppcle:Linux:*:*) |
1024 | echo powerpcle-unknown-linux-"$LIBC" | |
1025 | exit ;; | |
1026 | riscv32:Linux:*:* | riscv64:Linux:*:*) | |
1027 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1028 | exit ;; | |
1128 | GUESS=powerpcle-unknown-linux-$LIBC | |
1129 | ;; | |
1130 | riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) | |
1131 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1132 | ;; | |
1029 | 1133 | s390:Linux:*:* | s390x:Linux:*:*) |
1030 | echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | |
1031 | exit ;; | |
1134 | GUESS=$UNAME_MACHINE-ibm-linux-$LIBC | |
1135 | ;; | |
1032 | 1136 | sh64*:Linux:*:*) |
1033 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1034 | exit ;; | |
1137 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1138 | ;; | |
1035 | 1139 | sh*:Linux:*:*) |
1036 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1037 | exit ;; | |
1140 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1141 | ;; | |
1038 | 1142 | sparc:Linux:*:* | sparc64:Linux:*:*) |
1039 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1040 | exit ;; | |
1143 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1144 | ;; | |
1041 | 1145 | tile*:Linux:*:*) |
1042 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1043 | exit ;; | |
1146 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1147 | ;; | |
1044 | 1148 | vax:Linux:*:*) |
1045 | echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | |
1046 | exit ;; | |
1149 | GUESS=$UNAME_MACHINE-dec-linux-$LIBC | |
1150 | ;; | |
1047 | 1151 | x86_64:Linux:*:*) |
1048 | if objdump -f /bin/sh | grep -q elf32-x86-64; then | |
1049 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 | |
1050 | else | |
1051 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
1052 | fi | |
1053 | exit ;; | |
1152 | set_cc_for_build | |
1153 | LIBCABI=$LIBC | |
1154 | if test "$CC_FOR_BUILD" != no_compiler_found; then | |
1155 | if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ | |
1156 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1157 | grep IS_X32 >/dev/null | |
1158 | then | |
1159 | LIBCABI=${LIBC}x32 | |
1160 | fi | |
1161 | fi | |
1162 | GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI | |
1163 | ;; | |
1054 | 1164 | xtensa*:Linux:*:*) |
1055 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1056 | exit ;; | |
1165 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1166 | ;; | |
1057 | 1167 | i*86:DYNIX/ptx:4*:*) |
1058 | 1168 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1059 | 1169 | # earlier versions are messed up and put the nodename in both |
1060 | 1170 | # sysname and nodename. |
1061 | echo i386-sequent-sysv4 | |
1062 | exit ;; | |
1171 | GUESS=i386-sequent-sysv4 | |
1172 | ;; | |
1063 | 1173 | i*86:UNIX_SV:4.2MP:2.*) |
1064 | 1174 | # Unixware is an offshoot of SVR4, but it has its own version |
1065 | 1175 | # number series starting with 2... |
1066 | 1176 | # I am not positive that other SVR4 systems won't match this, |
1067 | 1177 | # I just have to hope. -- rms. |
1068 | 1178 | # Use sysv4.2uw... so that sysv4* matches it. |
1069 | echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" | |
1070 | exit ;; | |
1179 | GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION | |
1180 | ;; | |
1071 | 1181 | i*86:OS/2:*:*) |
1072 | 1182 | # If we were able to find `uname', then EMX Unix compatibility |
1073 | 1183 | # is probably installed. |
1074 | echo "$UNAME_MACHINE"-pc-os2-emx | |
1075 | exit ;; | |
1184 | GUESS=$UNAME_MACHINE-pc-os2-emx | |
1185 | ;; | |
1076 | 1186 | i*86:XTS-300:*:STOP) |
1077 | echo "$UNAME_MACHINE"-unknown-stop | |
1078 | exit ;; | |
1187 | GUESS=$UNAME_MACHINE-unknown-stop | |
1188 | ;; | |
1079 | 1189 | i*86:atheos:*:*) |
1080 | echo "$UNAME_MACHINE"-unknown-atheos | |
1081 | exit ;; | |
1190 | GUESS=$UNAME_MACHINE-unknown-atheos | |
1191 | ;; | |
1082 | 1192 | i*86:syllable:*:*) |
1083 | echo "$UNAME_MACHINE"-pc-syllable | |
1084 | exit ;; | |
1193 | GUESS=$UNAME_MACHINE-pc-syllable | |
1194 | ;; | |
1085 | 1195 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
1086 | echo i386-unknown-lynxos"$UNAME_RELEASE" | |
1087 | exit ;; | |
1196 | GUESS=i386-unknown-lynxos$UNAME_RELEASE | |
1197 | ;; | |
1088 | 1198 | i*86:*DOS:*:*) |
1089 | echo "$UNAME_MACHINE"-pc-msdosdjgpp | |
1090 | exit ;; | |
1199 | GUESS=$UNAME_MACHINE-pc-msdosdjgpp | |
1200 | ;; | |
1091 | 1201 | i*86:*:4.*:*) |
1092 | 1202 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` |
1093 | 1203 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1094 | echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | |
1204 | GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL | |
1095 | 1205 | else |
1096 | echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | |
1097 | fi | |
1098 | exit ;; | |
1206 | GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL | |
1207 | fi | |
1208 | ;; | |
1099 | 1209 | i*86:*:5:[678]*) |
1100 | 1210 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
1101 | 1211 | case `/bin/uname -X | grep "^Machine"` in |
1103 | 1213 | *Pentium) UNAME_MACHINE=i586 ;; |
1104 | 1214 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1105 | 1215 | esac |
1106 | echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" | |
1107 | exit ;; | |
1216 | GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
1217 | ;; | |
1108 | 1218 | i*86:*:3.2:*) |
1109 | 1219 | if test -f /usr/options/cb.name; then |
1110 | 1220 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
1111 | echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | |
1221 | GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL | |
1112 | 1222 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1113 | 1223 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1114 | 1224 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1118 | 1228 | && UNAME_MACHINE=i686 |
1119 | 1229 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1120 | 1230 | && UNAME_MACHINE=i686 |
1121 | echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" | |
1231 | GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL | |
1122 | 1232 | else |
1123 | echo "$UNAME_MACHINE"-pc-sysv32 | |
1124 | fi | |
1125 | exit ;; | |
1233 | GUESS=$UNAME_MACHINE-pc-sysv32 | |
1234 | fi | |
1235 | ;; | |
1126 | 1236 | pc:*:*:*) |
1127 | 1237 | # Left here for compatibility: |
1128 | 1238 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1130 | 1240 | # Note: whatever this is, it MUST be the same as what config.sub |
1131 | 1241 | # prints for the "djgpp" host, or else GDB configure will decide that |
1132 | 1242 | # this is a cross-build. |
1133 | echo i586-pc-msdosdjgpp | |
1134 | exit ;; | |
1243 | GUESS=i586-pc-msdosdjgpp | |
1244 | ;; | |
1135 | 1245 | Intel:Mach:3*:*) |
1136 | echo i386-pc-mach3 | |
1137 | exit ;; | |
1246 | GUESS=i386-pc-mach3 | |
1247 | ;; | |
1138 | 1248 | paragon:*:*:*) |
1139 | echo i860-intel-osf1 | |
1140 | exit ;; | |
1249 | GUESS=i860-intel-osf1 | |
1250 | ;; | |
1141 | 1251 | i860:*:4.*:*) # i860-SVR4 |
1142 | 1252 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
1143 | echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 | |
1253 | GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 | |
1144 | 1254 | else # Add other i860-SVR4 vendors below as they are discovered. |
1145 | echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 | |
1146 | fi | |
1147 | exit ;; | |
1255 | GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 | |
1256 | fi | |
1257 | ;; | |
1148 | 1258 | mini*:CTIX:SYS*5:*) |
1149 | 1259 | # "miniframe" |
1150 | echo m68010-convergent-sysv | |
1151 | exit ;; | |
1260 | GUESS=m68010-convergent-sysv | |
1261 | ;; | |
1152 | 1262 | mc68k:UNIX:SYSTEM5:3.51m) |
1153 | echo m68k-convergent-sysv | |
1154 | exit ;; | |
1263 | GUESS=m68k-convergent-sysv | |
1264 | ;; | |
1155 | 1265 | M680?0:D-NIX:5.3:*) |
1156 | echo m68k-diab-dnix | |
1157 | exit ;; | |
1266 | GUESS=m68k-diab-dnix | |
1267 | ;; | |
1158 | 1268 | M68*:*:R3V[5678]*:*) |
1159 | 1269 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
1160 | 1270 | 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) |
1179 | 1289 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
1180 | 1290 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
1181 | 1291 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1182 | echo m68k-unknown-lynxos"$UNAME_RELEASE" | |
1183 | exit ;; | |
1292 | GUESS=m68k-unknown-lynxos$UNAME_RELEASE | |
1293 | ;; | |
1184 | 1294 | mc68030:UNIX_System_V:4.*:*) |
1185 | echo m68k-atari-sysv4 | |
1186 | exit ;; | |
1295 | GUESS=m68k-atari-sysv4 | |
1296 | ;; | |
1187 | 1297 | TSUNAMI:LynxOS:2.*:*) |
1188 | echo sparc-unknown-lynxos"$UNAME_RELEASE" | |
1189 | exit ;; | |
1298 | GUESS=sparc-unknown-lynxos$UNAME_RELEASE | |
1299 | ;; | |
1190 | 1300 | rs6000:LynxOS:2.*:*) |
1191 | echo rs6000-unknown-lynxos"$UNAME_RELEASE" | |
1192 | exit ;; | |
1301 | GUESS=rs6000-unknown-lynxos$UNAME_RELEASE | |
1302 | ;; | |
1193 | 1303 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
1194 | echo powerpc-unknown-lynxos"$UNAME_RELEASE" | |
1195 | exit ;; | |
1304 | GUESS=powerpc-unknown-lynxos$UNAME_RELEASE | |
1305 | ;; | |
1196 | 1306 | SM[BE]S:UNIX_SV:*:*) |
1197 | echo mips-dde-sysv"$UNAME_RELEASE" | |
1198 | exit ;; | |
1307 | GUESS=mips-dde-sysv$UNAME_RELEASE | |
1308 | ;; | |
1199 | 1309 | RM*:ReliantUNIX-*:*:*) |
1200 | echo mips-sni-sysv4 | |
1201 | exit ;; | |
1310 | GUESS=mips-sni-sysv4 | |
1311 | ;; | |
1202 | 1312 | RM*:SINIX-*:*:*) |
1203 | echo mips-sni-sysv4 | |
1204 | exit ;; | |
1313 | GUESS=mips-sni-sysv4 | |
1314 | ;; | |
1205 | 1315 | *:SINIX-*:*:*) |
1206 | 1316 | if uname -p 2>/dev/null >/dev/null ; then |
1207 | 1317 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1208 | echo "$UNAME_MACHINE"-sni-sysv4 | |
1318 | GUESS=$UNAME_MACHINE-sni-sysv4 | |
1209 | 1319 | else |
1210 | echo ns32k-sni-sysv | |
1211 | fi | |
1212 | exit ;; | |
1320 | GUESS=ns32k-sni-sysv | |
1321 | fi | |
1322 | ;; | |
1213 | 1323 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1214 | 1324 | # says <Richard.M.Bartel@ccMail.Census.GOV> |
1215 | echo i586-unisys-sysv4 | |
1216 | exit ;; | |
1325 | GUESS=i586-unisys-sysv4 | |
1326 | ;; | |
1217 | 1327 | *:UNIX_System_V:4*:FTX*) |
1218 | 1328 | # From Gerald Hewes <hewes@openmarket.com>. |
1219 | 1329 | # How about differentiating between stratus architectures? -djm |
1220 | echo hppa1.1-stratus-sysv4 | |
1221 | exit ;; | |
1330 | GUESS=hppa1.1-stratus-sysv4 | |
1331 | ;; | |
1222 | 1332 | *:*:*:FTX*) |
1223 | 1333 | # From seanf@swdc.stratus.com. |
1224 | echo i860-stratus-sysv4 | |
1225 | exit ;; | |
1334 | GUESS=i860-stratus-sysv4 | |
1335 | ;; | |
1226 | 1336 | i*86:VOS:*:*) |
1227 | 1337 | # From Paul.Green@stratus.com. |
1228 | echo "$UNAME_MACHINE"-stratus-vos | |
1229 | exit ;; | |
1338 | GUESS=$UNAME_MACHINE-stratus-vos | |
1339 | ;; | |
1230 | 1340 | *:VOS:*:*) |
1231 | 1341 | # From Paul.Green@stratus.com. |
1232 | echo hppa1.1-stratus-vos | |
1233 | exit ;; | |
1342 | GUESS=hppa1.1-stratus-vos | |
1343 | ;; | |
1234 | 1344 | mc68*:A/UX:*:*) |
1235 | echo m68k-apple-aux"$UNAME_RELEASE" | |
1236 | exit ;; | |
1345 | GUESS=m68k-apple-aux$UNAME_RELEASE | |
1346 | ;; | |
1237 | 1347 | news*:NEWS-OS:6*:*) |
1238 | echo mips-sony-newsos6 | |
1239 | exit ;; | |
1348 | GUESS=mips-sony-newsos6 | |
1349 | ;; | |
1240 | 1350 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1241 | if [ -d /usr/nec ]; then | |
1242 | echo mips-nec-sysv"$UNAME_RELEASE" | |
1351 | if test -d /usr/nec; then | |
1352 | GUESS=mips-nec-sysv$UNAME_RELEASE | |
1243 | 1353 | else |
1244 | echo mips-unknown-sysv"$UNAME_RELEASE" | |
1245 | fi | |
1246 | exit ;; | |
1354 | GUESS=mips-unknown-sysv$UNAME_RELEASE | |
1355 | fi | |
1356 | ;; | |
1247 | 1357 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1248 | echo powerpc-be-beos | |
1249 | exit ;; | |
1358 | GUESS=powerpc-be-beos | |
1359 | ;; | |
1250 | 1360 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1251 | echo powerpc-apple-beos | |
1252 | exit ;; | |
1361 | GUESS=powerpc-apple-beos | |
1362 | ;; | |
1253 | 1363 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1254 | echo i586-pc-beos | |
1255 | exit ;; | |
1364 | GUESS=i586-pc-beos | |
1365 | ;; | |
1256 | 1366 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
1257 | echo i586-pc-haiku | |
1258 | exit ;; | |
1367 | GUESS=i586-pc-haiku | |
1368 | ;; | |
1259 | 1369 | x86_64:Haiku:*:*) |
1260 | echo x86_64-unknown-haiku | |
1261 | exit ;; | |
1370 | GUESS=x86_64-unknown-haiku | |
1371 | ;; | |
1262 | 1372 | SX-4:SUPER-UX:*:*) |
1263 | echo sx4-nec-superux"$UNAME_RELEASE" | |
1264 | exit ;; | |
1373 | GUESS=sx4-nec-superux$UNAME_RELEASE | |
1374 | ;; | |
1265 | 1375 | SX-5:SUPER-UX:*:*) |
1266 | echo sx5-nec-superux"$UNAME_RELEASE" | |
1267 | exit ;; | |
1376 | GUESS=sx5-nec-superux$UNAME_RELEASE | |
1377 | ;; | |
1268 | 1378 | SX-6:SUPER-UX:*:*) |
1269 | echo sx6-nec-superux"$UNAME_RELEASE" | |
1270 | exit ;; | |
1379 | GUESS=sx6-nec-superux$UNAME_RELEASE | |
1380 | ;; | |
1271 | 1381 | SX-7:SUPER-UX:*:*) |
1272 | echo sx7-nec-superux"$UNAME_RELEASE" | |
1273 | exit ;; | |
1382 | GUESS=sx7-nec-superux$UNAME_RELEASE | |
1383 | ;; | |
1274 | 1384 | SX-8:SUPER-UX:*:*) |
1275 | echo sx8-nec-superux"$UNAME_RELEASE" | |
1276 | exit ;; | |
1385 | GUESS=sx8-nec-superux$UNAME_RELEASE | |
1386 | ;; | |
1277 | 1387 | SX-8R:SUPER-UX:*:*) |
1278 | echo sx8r-nec-superux"$UNAME_RELEASE" | |
1279 | exit ;; | |
1388 | GUESS=sx8r-nec-superux$UNAME_RELEASE | |
1389 | ;; | |
1280 | 1390 | SX-ACE:SUPER-UX:*:*) |
1281 | echo sxace-nec-superux"$UNAME_RELEASE" | |
1282 | exit ;; | |
1391 | GUESS=sxace-nec-superux$UNAME_RELEASE | |
1392 | ;; | |
1283 | 1393 | Power*:Rhapsody:*:*) |
1284 | echo powerpc-apple-rhapsody"$UNAME_RELEASE" | |
1285 | exit ;; | |
1394 | GUESS=powerpc-apple-rhapsody$UNAME_RELEASE | |
1395 | ;; | |
1286 | 1396 | *:Rhapsody:*:*) |
1287 | echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | |
1288 | exit ;; | |
1397 | GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE | |
1398 | ;; | |
1399 | arm64:Darwin:*:*) | |
1400 | GUESS=aarch64-apple-darwin$UNAME_RELEASE | |
1401 | ;; | |
1289 | 1402 | *:Darwin:*:*) |
1290 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | |
1291 | eval "$set_cc_for_build" | |
1292 | if test "$UNAME_PROCESSOR" = unknown ; then | |
1293 | UNAME_PROCESSOR=powerpc | |
1294 | fi | |
1295 | if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then | |
1296 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
1297 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1298 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1299 | grep IS_64BIT_ARCH >/dev/null | |
1300 | then | |
1301 | case $UNAME_PROCESSOR in | |
1302 | i386) UNAME_PROCESSOR=x86_64 ;; | |
1303 | powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
1304 | esac | |
1305 | fi | |
1306 | # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
1307 | if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
1308 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1309 | grep IS_PPC >/dev/null | |
1310 | then | |
1311 | UNAME_PROCESSOR=powerpc | |
1312 | fi | |
1403 | UNAME_PROCESSOR=`uname -p` | |
1404 | case $UNAME_PROCESSOR in | |
1405 | unknown) UNAME_PROCESSOR=powerpc ;; | |
1406 | esac | |
1407 | if command -v xcode-select > /dev/null 2> /dev/null && \ | |
1408 | ! xcode-select --print-path > /dev/null 2> /dev/null ; then | |
1409 | # Avoid executing cc if there is no toolchain installed as | |
1410 | # cc will be a stub that puts up a graphical alert | |
1411 | # prompting the user to install developer tools. | |
1412 | CC_FOR_BUILD=no_compiler_found | |
1413 | else | |
1414 | set_cc_for_build | |
1415 | fi | |
1416 | if test "$CC_FOR_BUILD" != no_compiler_found; then | |
1417 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1418 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1419 | grep IS_64BIT_ARCH >/dev/null | |
1420 | then | |
1421 | case $UNAME_PROCESSOR in | |
1422 | i386) UNAME_PROCESSOR=x86_64 ;; | |
1423 | powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
1424 | esac | |
1425 | fi | |
1426 | # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
1427 | if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
1428 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1429 | grep IS_PPC >/dev/null | |
1430 | then | |
1431 | UNAME_PROCESSOR=powerpc | |
1313 | 1432 | fi |
1314 | 1433 | elif test "$UNAME_PROCESSOR" = i386 ; then |
1315 | # Avoid executing cc on OS X 10.9, as it ships with a stub | |
1316 | # that puts up a graphical alert prompting to install | |
1317 | # developer tools. Any system running Mac OS X 10.7 or | |
1318 | # later (Darwin 11 and later) is required to have a 64-bit | |
1319 | # processor. This is not true of the ARM version of Darwin | |
1320 | # that Apple uses in portable devices. | |
1321 | UNAME_PROCESSOR=x86_64 | |
1322 | fi | |
1323 | echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" | |
1324 | exit ;; | |
1434 | # uname -m returns i386 or x86_64 | |
1435 | UNAME_PROCESSOR=$UNAME_MACHINE | |
1436 | fi | |
1437 | GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE | |
1438 | ;; | |
1325 | 1439 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1326 | 1440 | UNAME_PROCESSOR=`uname -p` |
1327 | 1441 | if test "$UNAME_PROCESSOR" = x86; then |
1328 | 1442 | UNAME_PROCESSOR=i386 |
1329 | 1443 | UNAME_MACHINE=pc |
1330 | 1444 | fi |
1331 | echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | |
1332 | exit ;; | |
1445 | GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE | |
1446 | ;; | |
1333 | 1447 | *:QNX:*:4*) |
1334 | echo i386-pc-qnx | |
1335 | exit ;; | |
1448 | GUESS=i386-pc-qnx | |
1449 | ;; | |
1336 | 1450 | NEO-*:NONSTOP_KERNEL:*:*) |
1337 | echo neo-tandem-nsk"$UNAME_RELEASE" | |
1338 | exit ;; | |
1451 | GUESS=neo-tandem-nsk$UNAME_RELEASE | |
1452 | ;; | |
1339 | 1453 | NSE-*:NONSTOP_KERNEL:*:*) |
1340 | echo nse-tandem-nsk"$UNAME_RELEASE" | |
1341 | exit ;; | |
1454 | GUESS=nse-tandem-nsk$UNAME_RELEASE | |
1455 | ;; | |
1342 | 1456 | NSR-*:NONSTOP_KERNEL:*:*) |
1343 | echo nsr-tandem-nsk"$UNAME_RELEASE" | |
1344 | exit ;; | |
1457 | GUESS=nsr-tandem-nsk$UNAME_RELEASE | |
1458 | ;; | |
1345 | 1459 | NSV-*:NONSTOP_KERNEL:*:*) |
1346 | echo nsv-tandem-nsk"$UNAME_RELEASE" | |
1347 | exit ;; | |
1460 | GUESS=nsv-tandem-nsk$UNAME_RELEASE | |
1461 | ;; | |
1348 | 1462 | NSX-*:NONSTOP_KERNEL:*:*) |
1349 | echo nsx-tandem-nsk"$UNAME_RELEASE" | |
1350 | exit ;; | |
1463 | GUESS=nsx-tandem-nsk$UNAME_RELEASE | |
1464 | ;; | |
1351 | 1465 | *:NonStop-UX:*:*) |
1352 | echo mips-compaq-nonstopux | |
1353 | exit ;; | |
1466 | GUESS=mips-compaq-nonstopux | |
1467 | ;; | |
1354 | 1468 | BS2000:POSIX*:*:*) |
1355 | echo bs2000-siemens-sysv | |
1356 | exit ;; | |
1469 | GUESS=bs2000-siemens-sysv | |
1470 | ;; | |
1357 | 1471 | DS/*:UNIX_System_V:*:*) |
1358 | echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" | |
1359 | exit ;; | |
1472 | GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE | |
1473 | ;; | |
1360 | 1474 | *:Plan9:*:*) |
1361 | 1475 | # "uname -m" is not consistent, so use $cputype instead. 386 |
1362 | 1476 | # is converted to i386 for consistency with other x86 |
1363 | 1477 | # operating systems. |
1364 | if test "$cputype" = 386; then | |
1478 | if test "${cputype-}" = 386; then | |
1365 | 1479 | UNAME_MACHINE=i386 |
1366 | else | |
1367 | UNAME_MACHINE="$cputype" | |
1368 | fi | |
1369 | echo "$UNAME_MACHINE"-unknown-plan9 | |
1370 | exit ;; | |
1480 | elif test "x${cputype-}" != x; then | |
1481 | UNAME_MACHINE=$cputype | |
1482 | fi | |
1483 | GUESS=$UNAME_MACHINE-unknown-plan9 | |
1484 | ;; | |
1371 | 1485 | *:TOPS-10:*:*) |
1372 | echo pdp10-unknown-tops10 | |
1373 | exit ;; | |
1486 | GUESS=pdp10-unknown-tops10 | |
1487 | ;; | |
1374 | 1488 | *:TENEX:*:*) |
1375 | echo pdp10-unknown-tenex | |
1376 | exit ;; | |
1489 | GUESS=pdp10-unknown-tenex | |
1490 | ;; | |
1377 | 1491 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
1378 | echo pdp10-dec-tops20 | |
1379 | exit ;; | |
1492 | GUESS=pdp10-dec-tops20 | |
1493 | ;; | |
1380 | 1494 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
1381 | echo pdp10-xkl-tops20 | |
1382 | exit ;; | |
1495 | GUESS=pdp10-xkl-tops20 | |
1496 | ;; | |
1383 | 1497 | *:TOPS-20:*:*) |
1384 | echo pdp10-unknown-tops20 | |
1385 | exit ;; | |
1498 | GUESS=pdp10-unknown-tops20 | |
1499 | ;; | |
1386 | 1500 | *:ITS:*:*) |
1387 | echo pdp10-unknown-its | |
1388 | exit ;; | |
1501 | GUESS=pdp10-unknown-its | |
1502 | ;; | |
1389 | 1503 | SEI:*:*:SEIUX) |
1390 | echo mips-sei-seiux"$UNAME_RELEASE" | |
1391 | exit ;; | |
1504 | GUESS=mips-sei-seiux$UNAME_RELEASE | |
1505 | ;; | |
1392 | 1506 | *:DragonFly:*:*) |
1393 | echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
1394 | exit ;; | |
1507 | DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
1508 | GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL | |
1509 | ;; | |
1395 | 1510 | *:*VMS:*:*) |
1396 | 1511 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1397 | case "$UNAME_MACHINE" in | |
1398 | A*) echo alpha-dec-vms ; exit ;; | |
1399 | I*) echo ia64-dec-vms ; exit ;; | |
1400 | V*) echo vax-dec-vms ; exit ;; | |
1512 | case $UNAME_MACHINE in | |
1513 | A*) GUESS=alpha-dec-vms ;; | |
1514 | I*) GUESS=ia64-dec-vms ;; | |
1515 | V*) GUESS=vax-dec-vms ;; | |
1401 | 1516 | esac ;; |
1402 | 1517 | *:XENIX:*:SysV) |
1403 | echo i386-pc-xenix | |
1404 | exit ;; | |
1518 | GUESS=i386-pc-xenix | |
1519 | ;; | |
1405 | 1520 | i*86:skyos:*:*) |
1406 | echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" | |
1407 | exit ;; | |
1521 | SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` | |
1522 | GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL | |
1523 | ;; | |
1408 | 1524 | i*86:rdos:*:*) |
1409 | echo "$UNAME_MACHINE"-pc-rdos | |
1410 | exit ;; | |
1411 | i*86:AROS:*:*) | |
1412 | echo "$UNAME_MACHINE"-pc-aros | |
1413 | exit ;; | |
1525 | GUESS=$UNAME_MACHINE-pc-rdos | |
1526 | ;; | |
1527 | i*86:Fiwix:*:*) | |
1528 | GUESS=$UNAME_MACHINE-pc-fiwix | |
1529 | ;; | |
1530 | *:AROS:*:*) | |
1531 | GUESS=$UNAME_MACHINE-unknown-aros | |
1532 | ;; | |
1414 | 1533 | x86_64:VMkernel:*:*) |
1415 | echo "$UNAME_MACHINE"-unknown-esx | |
1416 | exit ;; | |
1534 | GUESS=$UNAME_MACHINE-unknown-esx | |
1535 | ;; | |
1417 | 1536 | amd64:Isilon\ OneFS:*:*) |
1418 | echo x86_64-unknown-onefs | |
1419 | exit ;; | |
1537 | GUESS=x86_64-unknown-onefs | |
1538 | ;; | |
1539 | *:Unleashed:*:*) | |
1540 | GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE | |
1541 | ;; | |
1420 | 1542 | esac |
1421 | 1543 | |
1544 | # Do we have a guess based on uname results? | |
1545 | if test "x$GUESS" != x; then | |
1546 | echo "$GUESS" | |
1547 | exit | |
1548 | fi | |
1549 | ||
1550 | # No uname command or uname output not recognized. | |
1551 | set_cc_for_build | |
1552 | cat > "$dummy.c" <<EOF | |
1553 | #ifdef _SEQUENT_ | |
1554 | #include <sys/types.h> | |
1555 | #include <sys/utsname.h> | |
1556 | #endif | |
1557 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1558 | #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1559 | #include <signal.h> | |
1560 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1561 | #include <sys/utsname.h> | |
1562 | #endif | |
1563 | #endif | |
1564 | #endif | |
1565 | main () | |
1566 | { | |
1567 | #if defined (sony) | |
1568 | #if defined (MIPSEB) | |
1569 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | |
1570 | I don't know.... */ | |
1571 | printf ("mips-sony-bsd\n"); exit (0); | |
1572 | #else | |
1573 | #include <sys/param.h> | |
1574 | printf ("m68k-sony-newsos%s\n", | |
1575 | #ifdef NEWSOS4 | |
1576 | "4" | |
1577 | #else | |
1578 | "" | |
1579 | #endif | |
1580 | ); exit (0); | |
1581 | #endif | |
1582 | #endif | |
1583 | ||
1584 | #if defined (NeXT) | |
1585 | #if !defined (__ARCHITECTURE__) | |
1586 | #define __ARCHITECTURE__ "m68k" | |
1587 | #endif | |
1588 | int version; | |
1589 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | |
1590 | if (version < 4) | |
1591 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
1592 | else | |
1593 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
1594 | exit (0); | |
1595 | #endif | |
1596 | ||
1597 | #if defined (MULTIMAX) || defined (n16) | |
1598 | #if defined (UMAXV) | |
1599 | printf ("ns32k-encore-sysv\n"); exit (0); | |
1600 | #else | |
1601 | #if defined (CMU) | |
1602 | printf ("ns32k-encore-mach\n"); exit (0); | |
1603 | #else | |
1604 | printf ("ns32k-encore-bsd\n"); exit (0); | |
1605 | #endif | |
1606 | #endif | |
1607 | #endif | |
1608 | ||
1609 | #if defined (__386BSD__) | |
1610 | printf ("i386-pc-bsd\n"); exit (0); | |
1611 | #endif | |
1612 | ||
1613 | #if defined (sequent) | |
1614 | #if defined (i386) | |
1615 | printf ("i386-sequent-dynix\n"); exit (0); | |
1616 | #endif | |
1617 | #if defined (ns32000) | |
1618 | printf ("ns32k-sequent-dynix\n"); exit (0); | |
1619 | #endif | |
1620 | #endif | |
1621 | ||
1622 | #if defined (_SEQUENT_) | |
1623 | struct utsname un; | |
1624 | ||
1625 | uname(&un); | |
1626 | if (strncmp(un.version, "V2", 2) == 0) { | |
1627 | printf ("i386-sequent-ptx2\n"); exit (0); | |
1628 | } | |
1629 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1630 | printf ("i386-sequent-ptx1\n"); exit (0); | |
1631 | } | |
1632 | printf ("i386-sequent-ptx\n"); exit (0); | |
1633 | #endif | |
1634 | ||
1635 | #if defined (vax) | |
1636 | #if !defined (ultrix) | |
1637 | #include <sys/param.h> | |
1638 | #if defined (BSD) | |
1639 | #if BSD == 43 | |
1640 | printf ("vax-dec-bsd4.3\n"); exit (0); | |
1641 | #else | |
1642 | #if BSD == 199006 | |
1643 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1644 | #else | |
1645 | printf ("vax-dec-bsd\n"); exit (0); | |
1646 | #endif | |
1647 | #endif | |
1648 | #else | |
1649 | printf ("vax-dec-bsd\n"); exit (0); | |
1650 | #endif | |
1651 | #else | |
1652 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1653 | struct utsname un; | |
1654 | uname (&un); | |
1655 | printf ("vax-dec-ultrix%s\n", un.release); exit (0); | |
1656 | #else | |
1657 | printf ("vax-dec-ultrix\n"); exit (0); | |
1658 | #endif | |
1659 | #endif | |
1660 | #endif | |
1661 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1662 | #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1663 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1664 | struct utsname *un; | |
1665 | uname (&un); | |
1666 | printf ("mips-dec-ultrix%s\n", un.release); exit (0); | |
1667 | #else | |
1668 | printf ("mips-dec-ultrix\n"); exit (0); | |
1669 | #endif | |
1670 | #endif | |
1671 | #endif | |
1672 | ||
1673 | #if defined (alliant) && defined (i860) | |
1674 | printf ("i860-alliant-bsd\n"); exit (0); | |
1675 | #endif | |
1676 | ||
1677 | exit (1); | |
1678 | } | |
1679 | EOF | |
1680 | ||
1681 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && | |
1682 | { echo "$SYSTEM_NAME"; exit; } | |
1683 | ||
1684 | # Apollos put the system type in the environment. | |
1685 | test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } | |
1686 | ||
1422 | 1687 | echo "$0: unable to guess system type" >&2 |
1423 | 1688 | |
1424 | case "$UNAME_MACHINE:$UNAME_SYSTEM" in | |
1689 | case $UNAME_MACHINE:$UNAME_SYSTEM in | |
1425 | 1690 | mips:Linux | mips64:Linux) |
1426 | 1691 | # If we got here on MIPS GNU/Linux, output extra information. |
1427 | 1692 | cat >&2 <<EOF |
1438 | 1703 | operating system you are using. If your script is old, overwrite *all* |
1439 | 1704 | copies of config.guess and config.sub with the latest versions from: |
1440 | 1705 | |
1441 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
1706 | https://git.savannah.gnu.org/cgit/config.git/plain/config.guess | |
1442 | 1707 | and |
1443 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
1708 | https://git.savannah.gnu.org/cgit/config.git/plain/config.sub | |
1709 | EOF | |
1710 | ||
1711 | our_year=`echo $timestamp | sed 's,-.*,,'` | |
1712 | thisyear=`date +%Y` | |
1713 | # shellcheck disable=SC2003 | |
1714 | script_age=`expr "$thisyear" - "$our_year"` | |
1715 | if test "$script_age" -lt 3 ; then | |
1716 | cat >&2 <<EOF | |
1444 | 1717 | |
1445 | 1718 | If $0 has already been updated, send the following data and any |
1446 | 1719 | information you think might be pertinent to config-patches@gnu.org to |
1468 | 1741 | UNAME_SYSTEM = "$UNAME_SYSTEM" |
1469 | 1742 | UNAME_VERSION = "$UNAME_VERSION" |
1470 | 1743 | EOF |
1744 | fi | |
1471 | 1745 | |
1472 | 1746 | exit 1 |
1473 | 1747 | |
1474 | 1748 | # Local variables: |
1475 | # eval: (add-hook 'write-file-functions 'time-stamp) | |
1749 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1476 | 1750 | # time-stamp-start: "timestamp='" |
1477 | 1751 | # time-stamp-format: "%:y-%02m-%02d" |
1478 | 1752 | # time-stamp-end: "'" |
0 | 0 | #! /bin/sh |
1 | 1 | # Configuration validation subroutine script. |
2 | # Copyright 1992-2018 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2018-02-22' | |
2 | # Copyright 1992-2022 Free Software Foundation, Inc. | |
3 | ||
4 | # shellcheck disable=SC2006,SC2268 # see below for rationale | |
5 | ||
6 | timestamp='2022-01-03' | |
5 | 7 | |
6 | 8 | # This file is free software; you can redistribute it and/or modify it |
7 | 9 | # under the terms of the GNU General Public License as published by |
8 | # the Free Software Foundation; either version 3 of the License, or | |
10 | # the Free Software Foundation, either version 3 of the License, or | |
9 | 11 | # (at your option) any later version. |
10 | 12 | # |
11 | 13 | # This program is distributed in the hope that it will be useful, but |
32 | 34 | # Otherwise, we print the canonical config type on stdout and succeed. |
33 | 35 | |
34 | 36 | # You can get the latest version of this script from: |
35 | # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
37 | # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub | |
36 | 38 | |
37 | 39 | # This file is supposed to be the same for all GNU packages |
38 | 40 | # and recognize all the CPU types, system types and aliases |
49 | 51 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
50 | 52 | # It is wrong to echo any other type of specification. |
51 | 53 | |
54 | # The "shellcheck disable" line above the timestamp inhibits complaints | |
55 | # about features and limitations of the classic Bourne shell that were | |
56 | # superseded or lifted in POSIX. However, this script identifies a wide | |
57 | # variety of pre-POSIX systems that do not have POSIX shells at all, and | |
58 | # even some reasonably current systems (Solaris 10 as case-in-point) still | |
59 | # have a pre-POSIX /bin/sh. | |
60 | ||
52 | 61 | me=`echo "$0" | sed -e 's,.*/,,'` |
53 | 62 | |
54 | 63 | usage="\ |
66 | 75 | version="\ |
67 | 76 | GNU config.sub ($timestamp) |
68 | 77 | |
69 | Copyright 1992-2018 Free Software Foundation, Inc. | |
78 | Copyright 1992-2022 Free Software Foundation, Inc. | |
70 | 79 | |
71 | 80 | This is free software; see the source for copying conditions. There is NO |
72 | 81 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
88 | 97 | - ) # Use stdin as input. |
89 | 98 | break ;; |
90 | 99 | -* ) |
91 | echo "$me: invalid option $1$help" | |
100 | echo "$me: invalid option $1$help" >&2 | |
92 | 101 | exit 1 ;; |
93 | 102 | |
94 | 103 | *local*) |
109 | 118 | exit 1;; |
110 | 119 | esac |
111 | 120 | |
112 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | |
113 | # Here we must recognize all the valid KERNEL-OS combinations. | |
114 | maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
115 | case $maybe_os in | |
116 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ | |
117 | linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ | |
118 | knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ | |
119 | kopensolaris*-gnu* | cloudabi*-eabi* | \ | |
120 | storm-chaos* | os2-emx* | rtmk-nova*) | |
121 | os=-$maybe_os | |
122 | basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
123 | ;; | |
124 | android-linux) | |
125 | os=-linux-android | |
126 | basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown | |
127 | ;; | |
128 | *) | |
129 | basic_machine=`echo "$1" | sed 's/-[^-]*$//'` | |
130 | if [ "$basic_machine" != "$1" ] | |
131 | then os=`echo "$1" | sed 's/.*-/-/'` | |
132 | else os=; fi | |
133 | ;; | |
121 | # Split fields of configuration type | |
122 | # shellcheck disable=SC2162 | |
123 | saved_IFS=$IFS | |
124 | IFS="-" read field1 field2 field3 field4 <<EOF | |
125 | $1 | |
126 | EOF | |
127 | IFS=$saved_IFS | |
128 | ||
129 | # Separate into logical components for further validation | |
130 | case $1 in | |
131 | *-*-*-*-*) | |
132 | echo Invalid configuration \`"$1"\': more than four components >&2 | |
133 | exit 1 | |
134 | ;; | |
135 | *-*-*-*) | |
136 | basic_machine=$field1-$field2 | |
137 | basic_os=$field3-$field4 | |
138 | ;; | |
139 | *-*-*) | |
140 | # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two | |
141 | # parts | |
142 | maybe_os=$field2-$field3 | |
143 | case $maybe_os in | |
144 | nto-qnx* | linux-* | uclinux-uclibc* \ | |
145 | | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | |
146 | | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | |
147 | | storm-chaos* | os2-emx* | rtmk-nova*) | |
148 | basic_machine=$field1 | |
149 | basic_os=$maybe_os | |
150 | ;; | |
151 | android-linux) | |
152 | basic_machine=$field1-unknown | |
153 | basic_os=linux-android | |
154 | ;; | |
155 | *) | |
156 | basic_machine=$field1-$field2 | |
157 | basic_os=$field3 | |
158 | ;; | |
159 | esac | |
160 | ;; | |
161 | *-*) | |
162 | # A lone config we happen to match not fitting any pattern | |
163 | case $field1-$field2 in | |
164 | decstation-3100) | |
165 | basic_machine=mips-dec | |
166 | basic_os= | |
167 | ;; | |
168 | *-*) | |
169 | # Second component is usually, but not always the OS | |
170 | case $field2 in | |
171 | # Prevent following clause from handling this valid os | |
172 | sun*os*) | |
173 | basic_machine=$field1 | |
174 | basic_os=$field2 | |
175 | ;; | |
176 | zephyr*) | |
177 | basic_machine=$field1-unknown | |
178 | basic_os=$field2 | |
179 | ;; | |
180 | # Manufacturers | |
181 | dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | |
182 | | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | |
183 | | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | |
184 | | convergent* | ncr* | news | 32* | 3600* | 3100* \ | |
185 | | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | |
186 | | ultra | tti* | harris | dolphin | highlevel | gould \ | |
187 | | cbm | ns | masscomp | apple | axis | knuth | cray \ | |
188 | | microblaze* | sim | cisco \ | |
189 | | oki | wec | wrs | winbond) | |
190 | basic_machine=$field1-$field2 | |
191 | basic_os= | |
192 | ;; | |
193 | *) | |
194 | basic_machine=$field1 | |
195 | basic_os=$field2 | |
196 | ;; | |
197 | esac | |
198 | ;; | |
199 | esac | |
200 | ;; | |
201 | *) | |
202 | # Convert single-component short-hands not valid as part of | |
203 | # multi-component configurations. | |
204 | case $field1 in | |
205 | 386bsd) | |
206 | basic_machine=i386-pc | |
207 | basic_os=bsd | |
208 | ;; | |
209 | a29khif) | |
210 | basic_machine=a29k-amd | |
211 | basic_os=udi | |
212 | ;; | |
213 | adobe68k) | |
214 | basic_machine=m68010-adobe | |
215 | basic_os=scout | |
216 | ;; | |
217 | alliant) | |
218 | basic_machine=fx80-alliant | |
219 | basic_os= | |
220 | ;; | |
221 | altos | altos3068) | |
222 | basic_machine=m68k-altos | |
223 | basic_os= | |
224 | ;; | |
225 | am29k) | |
226 | basic_machine=a29k-none | |
227 | basic_os=bsd | |
228 | ;; | |
229 | amdahl) | |
230 | basic_machine=580-amdahl | |
231 | basic_os=sysv | |
232 | ;; | |
233 | amiga) | |
234 | basic_machine=m68k-unknown | |
235 | basic_os= | |
236 | ;; | |
237 | amigaos | amigados) | |
238 | basic_machine=m68k-unknown | |
239 | basic_os=amigaos | |
240 | ;; | |
241 | amigaunix | amix) | |
242 | basic_machine=m68k-unknown | |
243 | basic_os=sysv4 | |
244 | ;; | |
245 | apollo68) | |
246 | basic_machine=m68k-apollo | |
247 | basic_os=sysv | |
248 | ;; | |
249 | apollo68bsd) | |
250 | basic_machine=m68k-apollo | |
251 | basic_os=bsd | |
252 | ;; | |
253 | aros) | |
254 | basic_machine=i386-pc | |
255 | basic_os=aros | |
256 | ;; | |
257 | aux) | |
258 | basic_machine=m68k-apple | |
259 | basic_os=aux | |
260 | ;; | |
261 | balance) | |
262 | basic_machine=ns32k-sequent | |
263 | basic_os=dynix | |
264 | ;; | |
265 | blackfin) | |
266 | basic_machine=bfin-unknown | |
267 | basic_os=linux | |
268 | ;; | |
269 | cegcc) | |
270 | basic_machine=arm-unknown | |
271 | basic_os=cegcc | |
272 | ;; | |
273 | convex-c1) | |
274 | basic_machine=c1-convex | |
275 | basic_os=bsd | |
276 | ;; | |
277 | convex-c2) | |
278 | basic_machine=c2-convex | |
279 | basic_os=bsd | |
280 | ;; | |
281 | convex-c32) | |
282 | basic_machine=c32-convex | |
283 | basic_os=bsd | |
284 | ;; | |
285 | convex-c34) | |
286 | basic_machine=c34-convex | |
287 | basic_os=bsd | |
288 | ;; | |
289 | convex-c38) | |
290 | basic_machine=c38-convex | |
291 | basic_os=bsd | |
292 | ;; | |
293 | cray) | |
294 | basic_machine=j90-cray | |
295 | basic_os=unicos | |
296 | ;; | |
297 | crds | unos) | |
298 | basic_machine=m68k-crds | |
299 | basic_os= | |
300 | ;; | |
301 | da30) | |
302 | basic_machine=m68k-da30 | |
303 | basic_os= | |
304 | ;; | |
305 | decstation | pmax | pmin | dec3100 | decstatn) | |
306 | basic_machine=mips-dec | |
307 | basic_os= | |
308 | ;; | |
309 | delta88) | |
310 | basic_machine=m88k-motorola | |
311 | basic_os=sysv3 | |
312 | ;; | |
313 | dicos) | |
314 | basic_machine=i686-pc | |
315 | basic_os=dicos | |
316 | ;; | |
317 | djgpp) | |
318 | basic_machine=i586-pc | |
319 | basic_os=msdosdjgpp | |
320 | ;; | |
321 | ebmon29k) | |
322 | basic_machine=a29k-amd | |
323 | basic_os=ebmon | |
324 | ;; | |
325 | es1800 | OSE68k | ose68k | ose | OSE) | |
326 | basic_machine=m68k-ericsson | |
327 | basic_os=ose | |
328 | ;; | |
329 | gmicro) | |
330 | basic_machine=tron-gmicro | |
331 | basic_os=sysv | |
332 | ;; | |
333 | go32) | |
334 | basic_machine=i386-pc | |
335 | basic_os=go32 | |
336 | ;; | |
337 | h8300hms) | |
338 | basic_machine=h8300-hitachi | |
339 | basic_os=hms | |
340 | ;; | |
341 | h8300xray) | |
342 | basic_machine=h8300-hitachi | |
343 | basic_os=xray | |
344 | ;; | |
345 | h8500hms) | |
346 | basic_machine=h8500-hitachi | |
347 | basic_os=hms | |
348 | ;; | |
349 | harris) | |
350 | basic_machine=m88k-harris | |
351 | basic_os=sysv3 | |
352 | ;; | |
353 | hp300 | hp300hpux) | |
354 | basic_machine=m68k-hp | |
355 | basic_os=hpux | |
356 | ;; | |
357 | hp300bsd) | |
358 | basic_machine=m68k-hp | |
359 | basic_os=bsd | |
360 | ;; | |
361 | hppaosf) | |
362 | basic_machine=hppa1.1-hp | |
363 | basic_os=osf | |
364 | ;; | |
365 | hppro) | |
366 | basic_machine=hppa1.1-hp | |
367 | basic_os=proelf | |
368 | ;; | |
369 | i386mach) | |
370 | basic_machine=i386-mach | |
371 | basic_os=mach | |
372 | ;; | |
373 | isi68 | isi) | |
374 | basic_machine=m68k-isi | |
375 | basic_os=sysv | |
376 | ;; | |
377 | m68knommu) | |
378 | basic_machine=m68k-unknown | |
379 | basic_os=linux | |
380 | ;; | |
381 | magnum | m3230) | |
382 | basic_machine=mips-mips | |
383 | basic_os=sysv | |
384 | ;; | |
385 | merlin) | |
386 | basic_machine=ns32k-utek | |
387 | basic_os=sysv | |
388 | ;; | |
389 | mingw64) | |
390 | basic_machine=x86_64-pc | |
391 | basic_os=mingw64 | |
392 | ;; | |
393 | mingw32) | |
394 | basic_machine=i686-pc | |
395 | basic_os=mingw32 | |
396 | ;; | |
397 | mingw32ce) | |
398 | basic_machine=arm-unknown | |
399 | basic_os=mingw32ce | |
400 | ;; | |
401 | monitor) | |
402 | basic_machine=m68k-rom68k | |
403 | basic_os=coff | |
404 | ;; | |
405 | morphos) | |
406 | basic_machine=powerpc-unknown | |
407 | basic_os=morphos | |
408 | ;; | |
409 | moxiebox) | |
410 | basic_machine=moxie-unknown | |
411 | basic_os=moxiebox | |
412 | ;; | |
413 | msdos) | |
414 | basic_machine=i386-pc | |
415 | basic_os=msdos | |
416 | ;; | |
417 | msys) | |
418 | basic_machine=i686-pc | |
419 | basic_os=msys | |
420 | ;; | |
421 | mvs) | |
422 | basic_machine=i370-ibm | |
423 | basic_os=mvs | |
424 | ;; | |
425 | nacl) | |
426 | basic_machine=le32-unknown | |
427 | basic_os=nacl | |
428 | ;; | |
429 | ncr3000) | |
430 | basic_machine=i486-ncr | |
431 | basic_os=sysv4 | |
432 | ;; | |
433 | netbsd386) | |
434 | basic_machine=i386-pc | |
435 | basic_os=netbsd | |
436 | ;; | |
437 | netwinder) | |
438 | basic_machine=armv4l-rebel | |
439 | basic_os=linux | |
440 | ;; | |
441 | news | news700 | news800 | news900) | |
442 | basic_machine=m68k-sony | |
443 | basic_os=newsos | |
444 | ;; | |
445 | news1000) | |
446 | basic_machine=m68030-sony | |
447 | basic_os=newsos | |
448 | ;; | |
449 | necv70) | |
450 | basic_machine=v70-nec | |
451 | basic_os=sysv | |
452 | ;; | |
453 | nh3000) | |
454 | basic_machine=m68k-harris | |
455 | basic_os=cxux | |
456 | ;; | |
457 | nh[45]000) | |
458 | basic_machine=m88k-harris | |
459 | basic_os=cxux | |
460 | ;; | |
461 | nindy960) | |
462 | basic_machine=i960-intel | |
463 | basic_os=nindy | |
464 | ;; | |
465 | mon960) | |
466 | basic_machine=i960-intel | |
467 | basic_os=mon960 | |
468 | ;; | |
469 | nonstopux) | |
470 | basic_machine=mips-compaq | |
471 | basic_os=nonstopux | |
472 | ;; | |
473 | os400) | |
474 | basic_machine=powerpc-ibm | |
475 | basic_os=os400 | |
476 | ;; | |
477 | OSE68000 | ose68000) | |
478 | basic_machine=m68000-ericsson | |
479 | basic_os=ose | |
480 | ;; | |
481 | os68k) | |
482 | basic_machine=m68k-none | |
483 | basic_os=os68k | |
484 | ;; | |
485 | paragon) | |
486 | basic_machine=i860-intel | |
487 | basic_os=osf | |
488 | ;; | |
489 | parisc) | |
490 | basic_machine=hppa-unknown | |
491 | basic_os=linux | |
492 | ;; | |
493 | psp) | |
494 | basic_machine=mipsallegrexel-sony | |
495 | basic_os=psp | |
496 | ;; | |
497 | pw32) | |
498 | basic_machine=i586-unknown | |
499 | basic_os=pw32 | |
500 | ;; | |
501 | rdos | rdos64) | |
502 | basic_machine=x86_64-pc | |
503 | basic_os=rdos | |
504 | ;; | |
505 | rdos32) | |
506 | basic_machine=i386-pc | |
507 | basic_os=rdos | |
508 | ;; | |
509 | rom68k) | |
510 | basic_machine=m68k-rom68k | |
511 | basic_os=coff | |
512 | ;; | |
513 | sa29200) | |
514 | basic_machine=a29k-amd | |
515 | basic_os=udi | |
516 | ;; | |
517 | sei) | |
518 | basic_machine=mips-sei | |
519 | basic_os=seiux | |
520 | ;; | |
521 | sequent) | |
522 | basic_machine=i386-sequent | |
523 | basic_os= | |
524 | ;; | |
525 | sps7) | |
526 | basic_machine=m68k-bull | |
527 | basic_os=sysv2 | |
528 | ;; | |
529 | st2000) | |
530 | basic_machine=m68k-tandem | |
531 | basic_os= | |
532 | ;; | |
533 | stratus) | |
534 | basic_machine=i860-stratus | |
535 | basic_os=sysv4 | |
536 | ;; | |
537 | sun2) | |
538 | basic_machine=m68000-sun | |
539 | basic_os= | |
540 | ;; | |
541 | sun2os3) | |
542 | basic_machine=m68000-sun | |
543 | basic_os=sunos3 | |
544 | ;; | |
545 | sun2os4) | |
546 | basic_machine=m68000-sun | |
547 | basic_os=sunos4 | |
548 | ;; | |
549 | sun3) | |
550 | basic_machine=m68k-sun | |
551 | basic_os= | |
552 | ;; | |
553 | sun3os3) | |
554 | basic_machine=m68k-sun | |
555 | basic_os=sunos3 | |
556 | ;; | |
557 | sun3os4) | |
558 | basic_machine=m68k-sun | |
559 | basic_os=sunos4 | |
560 | ;; | |
561 | sun4) | |
562 | basic_machine=sparc-sun | |
563 | basic_os= | |
564 | ;; | |
565 | sun4os3) | |
566 | basic_machine=sparc-sun | |
567 | basic_os=sunos3 | |
568 | ;; | |
569 | sun4os4) | |
570 | basic_machine=sparc-sun | |
571 | basic_os=sunos4 | |
572 | ;; | |
573 | sun4sol2) | |
574 | basic_machine=sparc-sun | |
575 | basic_os=solaris2 | |
576 | ;; | |
577 | sun386 | sun386i | roadrunner) | |
578 | basic_machine=i386-sun | |
579 | basic_os= | |
580 | ;; | |
581 | sv1) | |
582 | basic_machine=sv1-cray | |
583 | basic_os=unicos | |
584 | ;; | |
585 | symmetry) | |
586 | basic_machine=i386-sequent | |
587 | basic_os=dynix | |
588 | ;; | |
589 | t3e) | |
590 | basic_machine=alphaev5-cray | |
591 | basic_os=unicos | |
592 | ;; | |
593 | t90) | |
594 | basic_machine=t90-cray | |
595 | basic_os=unicos | |
596 | ;; | |
597 | toad1) | |
598 | basic_machine=pdp10-xkl | |
599 | basic_os=tops20 | |
600 | ;; | |
601 | tpf) | |
602 | basic_machine=s390x-ibm | |
603 | basic_os=tpf | |
604 | ;; | |
605 | udi29k) | |
606 | basic_machine=a29k-amd | |
607 | basic_os=udi | |
608 | ;; | |
609 | ultra3) | |
610 | basic_machine=a29k-nyu | |
611 | basic_os=sym1 | |
612 | ;; | |
613 | v810 | necv810) | |
614 | basic_machine=v810-nec | |
615 | basic_os=none | |
616 | ;; | |
617 | vaxv) | |
618 | basic_machine=vax-dec | |
619 | basic_os=sysv | |
620 | ;; | |
621 | vms) | |
622 | basic_machine=vax-dec | |
623 | basic_os=vms | |
624 | ;; | |
625 | vsta) | |
626 | basic_machine=i386-pc | |
627 | basic_os=vsta | |
628 | ;; | |
629 | vxworks960) | |
630 | basic_machine=i960-wrs | |
631 | basic_os=vxworks | |
632 | ;; | |
633 | vxworks68) | |
634 | basic_machine=m68k-wrs | |
635 | basic_os=vxworks | |
636 | ;; | |
637 | vxworks29k) | |
638 | basic_machine=a29k-wrs | |
639 | basic_os=vxworks | |
640 | ;; | |
641 | xbox) | |
642 | basic_machine=i686-pc | |
643 | basic_os=mingw32 | |
644 | ;; | |
645 | ymp) | |
646 | basic_machine=ymp-cray | |
647 | basic_os=unicos | |
648 | ;; | |
649 | *) | |
650 | basic_machine=$1 | |
651 | basic_os= | |
652 | ;; | |
653 | esac | |
654 | ;; | |
134 | 655 | esac |
135 | 656 | |
136 | ### Let's recognize common machines as not being operating systems so | |
137 | ### that things like config.sub decstation-3100 work. We also | |
138 | ### recognize some manufacturers as not being operating systems, so we | |
139 | ### can provide default operating systems below. | |
140 | case $os in | |
141 | -sun*os*) | |
142 | # Prevent following clause from handling this invalid input. | |
143 | ;; | |
144 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
145 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
146 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
147 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
148 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
149 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
150 | -apple | -axis | -knuth | -cray | -microblaze*) | |
151 | os= | |
152 | basic_machine=$1 | |
153 | ;; | |
154 | -bluegene*) | |
155 | os=-cnk | |
156 | ;; | |
157 | -sim | -cisco | -oki | -wec | -winbond) | |
158 | os= | |
159 | basic_machine=$1 | |
160 | ;; | |
161 | -scout) | |
162 | ;; | |
163 | -wrs) | |
164 | os=-vxworks | |
165 | basic_machine=$1 | |
166 | ;; | |
167 | -chorusos*) | |
168 | os=-chorusos | |
169 | basic_machine=$1 | |
170 | ;; | |
171 | -chorusrdb) | |
172 | os=-chorusrdb | |
173 | basic_machine=$1 | |
174 | ;; | |
175 | -hiux*) | |
176 | os=-hiuxwe2 | |
177 | ;; | |
178 | -sco6) | |
179 | os=-sco5v6 | |
180 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
181 | ;; | |
182 | -sco5) | |
183 | os=-sco3.2v5 | |
184 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
185 | ;; | |
186 | -sco4) | |
187 | os=-sco3.2v4 | |
188 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
189 | ;; | |
190 | -sco3.2.[4-9]*) | |
191 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
192 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
193 | ;; | |
194 | -sco3.2v[4-9]*) | |
195 | # Don't forget version if it is 3.2v4 or newer. | |
196 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
197 | ;; | |
198 | -sco5v6*) | |
199 | # Don't forget version if it is 3.2v4 or newer. | |
200 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
201 | ;; | |
202 | -sco*) | |
203 | os=-sco3.2v2 | |
204 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
205 | ;; | |
206 | -udk*) | |
207 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
208 | ;; | |
209 | -isc) | |
210 | os=-isc2.2 | |
211 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
212 | ;; | |
213 | -clix*) | |
214 | basic_machine=clipper-intergraph | |
215 | ;; | |
216 | -isc*) | |
217 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
218 | ;; | |
219 | -lynx*178) | |
220 | os=-lynxos178 | |
221 | ;; | |
222 | -lynx*5) | |
223 | os=-lynxos5 | |
224 | ;; | |
225 | -lynx*) | |
226 | os=-lynxos | |
227 | ;; | |
228 | -ptx*) | |
229 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` | |
230 | ;; | |
231 | -psos*) | |
232 | os=-psos | |
233 | ;; | |
234 | -mint | -mint[0-9]*) | |
235 | basic_machine=m68k-atari | |
236 | os=-mint | |
237 | ;; | |
238 | esac | |
239 | ||
240 | # Decode aliases for certain CPU-COMPANY combinations. | |
657 | # Decode 1-component or ad-hoc basic machines | |
241 | 658 | case $basic_machine in |
242 | # Recognize the basic CPU types without company name. | |
243 | # Some are omitted here because they have special meanings below. | |
244 | 1750a | 580 \ | |
245 | | a29k \ | |
246 | | aarch64 | aarch64_be \ | |
247 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
248 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
249 | | am33_2.0 \ | |
250 | | arc | arceb \ | |
251 | | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | |
252 | | avr | avr32 \ | |
253 | | ba \ | |
254 | | be32 | be64 \ | |
255 | | bfin \ | |
256 | | c4x | c8051 | clipper \ | |
257 | | d10v | d30v | dlx | dsp16xx \ | |
258 | | e2k | epiphany \ | |
259 | | fido | fr30 | frv | ft32 \ | |
260 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
261 | | hexagon \ | |
262 | | i370 | i860 | i960 | ia16 | ia64 \ | |
263 | | ip2k | iq2000 \ | |
264 | | k1om \ | |
265 | | le32 | le64 \ | |
266 | | lm32 \ | |
267 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ | |
268 | | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | |
269 | | mips | mipsbe | mipseb | mipsel | mipsle \ | |
270 | | mips16 \ | |
271 | | mips64 | mips64el \ | |
272 | | mips64octeon | mips64octeonel \ | |
273 | | mips64orion | mips64orionel \ | |
274 | | mips64r5900 | mips64r5900el \ | |
275 | | mips64vr | mips64vrel \ | |
276 | | mips64vr4100 | mips64vr4100el \ | |
277 | | mips64vr4300 | mips64vr4300el \ | |
278 | | mips64vr5000 | mips64vr5000el \ | |
279 | | mips64vr5900 | mips64vr5900el \ | |
280 | | mipsisa32 | mipsisa32el \ | |
281 | | mipsisa32r2 | mipsisa32r2el \ | |
282 | | mipsisa32r6 | mipsisa32r6el \ | |
283 | | mipsisa64 | mipsisa64el \ | |
284 | | mipsisa64r2 | mipsisa64r2el \ | |
285 | | mipsisa64r6 | mipsisa64r6el \ | |
286 | | mipsisa64sb1 | mipsisa64sb1el \ | |
287 | | mipsisa64sr71k | mipsisa64sr71kel \ | |
288 | | mipsr5900 | mipsr5900el \ | |
289 | | mipstx39 | mipstx39el \ | |
290 | | mn10200 | mn10300 \ | |
291 | | moxie \ | |
292 | | mt \ | |
293 | | msp430 \ | |
294 | | nds32 | nds32le | nds32be \ | |
295 | | nios | nios2 | nios2eb | nios2el \ | |
296 | | ns16k | ns32k \ | |
297 | | open8 | or1k | or1knd | or32 \ | |
298 | | pdp10 | pj | pjl \ | |
299 | | powerpc | powerpc64 | powerpc64le | powerpcle \ | |
300 | | pru \ | |
301 | | pyramid \ | |
302 | | riscv32 | riscv64 \ | |
303 | | rl78 | rx \ | |
304 | | score \ | |
305 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | |
306 | | sh64 | sh64le \ | |
307 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | |
308 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
309 | | spu \ | |
310 | | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | |
311 | | ubicom32 \ | |
312 | | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | |
313 | | visium \ | |
314 | | wasm32 \ | |
315 | | x86 | xc16x | xstormy16 | xtensa \ | |
316 | | z8k | z80) | |
317 | basic_machine=$basic_machine-unknown | |
318 | ;; | |
319 | c54x) | |
320 | basic_machine=tic54x-unknown | |
321 | ;; | |
322 | c55x) | |
323 | basic_machine=tic55x-unknown | |
324 | ;; | |
325 | c6x) | |
326 | basic_machine=tic6x-unknown | |
659 | # Here we handle the default manufacturer of certain CPU types. It is in | |
660 | # some cases the only manufacturer, in others, it is the most popular. | |
661 | w89k) | |
662 | cpu=hppa1.1 | |
663 | vendor=winbond | |
664 | ;; | |
665 | op50n) | |
666 | cpu=hppa1.1 | |
667 | vendor=oki | |
668 | ;; | |
669 | op60c) | |
670 | cpu=hppa1.1 | |
671 | vendor=oki | |
672 | ;; | |
673 | ibm*) | |
674 | cpu=i370 | |
675 | vendor=ibm | |
676 | ;; | |
677 | orion105) | |
678 | cpu=clipper | |
679 | vendor=highlevel | |
680 | ;; | |
681 | mac | mpw | mac-mpw) | |
682 | cpu=m68k | |
683 | vendor=apple | |
684 | ;; | |
685 | pmac | pmac-mpw) | |
686 | cpu=powerpc | |
687 | vendor=apple | |
688 | ;; | |
689 | ||
690 | # Recognize the various machine names and aliases which stand | |
691 | # for a CPU type and a company and sometimes even an OS. | |
692 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
693 | cpu=m68000 | |
694 | vendor=att | |
695 | ;; | |
696 | 3b*) | |
697 | cpu=we32k | |
698 | vendor=att | |
699 | ;; | |
700 | bluegene*) | |
701 | cpu=powerpc | |
702 | vendor=ibm | |
703 | basic_os=cnk | |
704 | ;; | |
705 | decsystem10* | dec10*) | |
706 | cpu=pdp10 | |
707 | vendor=dec | |
708 | basic_os=tops10 | |
709 | ;; | |
710 | decsystem20* | dec20*) | |
711 | cpu=pdp10 | |
712 | vendor=dec | |
713 | basic_os=tops20 | |
714 | ;; | |
715 | delta | 3300 | motorola-3300 | motorola-delta \ | |
716 | | 3300-motorola | delta-motorola) | |
717 | cpu=m68k | |
718 | vendor=motorola | |
719 | ;; | |
720 | dpx2*) | |
721 | cpu=m68k | |
722 | vendor=bull | |
723 | basic_os=sysv3 | |
724 | ;; | |
725 | encore | umax | mmax) | |
726 | cpu=ns32k | |
727 | vendor=encore | |
728 | ;; | |
729 | elxsi) | |
730 | cpu=elxsi | |
731 | vendor=elxsi | |
732 | basic_os=${basic_os:-bsd} | |
733 | ;; | |
734 | fx2800) | |
735 | cpu=i860 | |
736 | vendor=alliant | |
737 | ;; | |
738 | genix) | |
739 | cpu=ns32k | |
740 | vendor=ns | |
741 | ;; | |
742 | h3050r* | hiux*) | |
743 | cpu=hppa1.1 | |
744 | vendor=hitachi | |
745 | basic_os=hiuxwe2 | |
746 | ;; | |
747 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
748 | cpu=hppa1.0 | |
749 | vendor=hp | |
750 | ;; | |
751 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
752 | cpu=m68000 | |
753 | vendor=hp | |
754 | ;; | |
755 | hp9k3[2-9][0-9]) | |
756 | cpu=m68k | |
757 | vendor=hp | |
758 | ;; | |
759 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
760 | cpu=hppa1.0 | |
761 | vendor=hp | |
762 | ;; | |
763 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
764 | cpu=hppa1.1 | |
765 | vendor=hp | |
766 | ;; | |
767 | hp9k78[0-9] | hp78[0-9]) | |
768 | # FIXME: really hppa2.0-hp | |
769 | cpu=hppa1.1 | |
770 | vendor=hp | |
771 | ;; | |
772 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
773 | # FIXME: really hppa2.0-hp | |
774 | cpu=hppa1.1 | |
775 | vendor=hp | |
776 | ;; | |
777 | hp9k8[0-9][13679] | hp8[0-9][13679]) | |
778 | cpu=hppa1.1 | |
779 | vendor=hp | |
780 | ;; | |
781 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
782 | cpu=hppa1.0 | |
783 | vendor=hp | |
784 | ;; | |
785 | i*86v32) | |
786 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
787 | vendor=pc | |
788 | basic_os=sysv32 | |
789 | ;; | |
790 | i*86v4*) | |
791 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
792 | vendor=pc | |
793 | basic_os=sysv4 | |
794 | ;; | |
795 | i*86v) | |
796 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
797 | vendor=pc | |
798 | basic_os=sysv | |
799 | ;; | |
800 | i*86sol2) | |
801 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
802 | vendor=pc | |
803 | basic_os=solaris2 | |
804 | ;; | |
805 | j90 | j90-cray) | |
806 | cpu=j90 | |
807 | vendor=cray | |
808 | basic_os=${basic_os:-unicos} | |
809 | ;; | |
810 | iris | iris4d) | |
811 | cpu=mips | |
812 | vendor=sgi | |
813 | case $basic_os in | |
814 | irix*) | |
815 | ;; | |
816 | *) | |
817 | basic_os=irix4 | |
818 | ;; | |
819 | esac | |
820 | ;; | |
821 | miniframe) | |
822 | cpu=m68000 | |
823 | vendor=convergent | |
824 | ;; | |
825 | *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
826 | cpu=m68k | |
827 | vendor=atari | |
828 | basic_os=mint | |
829 | ;; | |
830 | news-3600 | risc-news) | |
831 | cpu=mips | |
832 | vendor=sony | |
833 | basic_os=newsos | |
834 | ;; | |
835 | next | m*-next) | |
836 | cpu=m68k | |
837 | vendor=next | |
838 | case $basic_os in | |
839 | openstep*) | |
840 | ;; | |
841 | nextstep*) | |
842 | ;; | |
843 | ns2*) | |
844 | basic_os=nextstep2 | |
845 | ;; | |
846 | *) | |
847 | basic_os=nextstep3 | |
848 | ;; | |
849 | esac | |
850 | ;; | |
851 | np1) | |
852 | cpu=np1 | |
853 | vendor=gould | |
854 | ;; | |
855 | op50n-* | op60c-*) | |
856 | cpu=hppa1.1 | |
857 | vendor=oki | |
858 | basic_os=proelf | |
859 | ;; | |
860 | pa-hitachi) | |
861 | cpu=hppa1.1 | |
862 | vendor=hitachi | |
863 | basic_os=hiuxwe2 | |
864 | ;; | |
865 | pbd) | |
866 | cpu=sparc | |
867 | vendor=tti | |
868 | ;; | |
869 | pbb) | |
870 | cpu=m68k | |
871 | vendor=tti | |
872 | ;; | |
873 | pc532) | |
874 | cpu=ns32k | |
875 | vendor=pc532 | |
876 | ;; | |
877 | pn) | |
878 | cpu=pn | |
879 | vendor=gould | |
880 | ;; | |
881 | power) | |
882 | cpu=power | |
883 | vendor=ibm | |
884 | ;; | |
885 | ps2) | |
886 | cpu=i386 | |
887 | vendor=ibm | |
888 | ;; | |
889 | rm[46]00) | |
890 | cpu=mips | |
891 | vendor=siemens | |
892 | ;; | |
893 | rtpc | rtpc-*) | |
894 | cpu=romp | |
895 | vendor=ibm | |
896 | ;; | |
897 | sde) | |
898 | cpu=mipsisa32 | |
899 | vendor=sde | |
900 | basic_os=${basic_os:-elf} | |
901 | ;; | |
902 | simso-wrs) | |
903 | cpu=sparclite | |
904 | vendor=wrs | |
905 | basic_os=vxworks | |
906 | ;; | |
907 | tower | tower-32) | |
908 | cpu=m68k | |
909 | vendor=ncr | |
910 | ;; | |
911 | vpp*|vx|vx-*) | |
912 | cpu=f301 | |
913 | vendor=fujitsu | |
914 | ;; | |
915 | w65) | |
916 | cpu=w65 | |
917 | vendor=wdc | |
918 | ;; | |
919 | w89k-*) | |
920 | cpu=hppa1.1 | |
921 | vendor=winbond | |
922 | basic_os=proelf | |
923 | ;; | |
924 | none) | |
925 | cpu=none | |
926 | vendor=none | |
327 | 927 | ;; |
328 | 928 | leon|leon[3-9]) |
329 | basic_machine=sparc-$basic_machine | |
330 | ;; | |
331 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) | |
332 | basic_machine=$basic_machine-unknown | |
333 | os=-none | |
334 | ;; | |
335 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) | |
336 | ;; | |
337 | ms1) | |
338 | basic_machine=mt-unknown | |
339 | ;; | |
340 | ||
341 | strongarm | thumb | xscale) | |
342 | basic_machine=arm-unknown | |
343 | ;; | |
344 | xgate) | |
345 | basic_machine=$basic_machine-unknown | |
346 | os=-none | |
347 | ;; | |
348 | xscaleeb) | |
349 | basic_machine=armeb-unknown | |
350 | ;; | |
351 | ||
352 | xscaleel) | |
353 | basic_machine=armel-unknown | |
354 | ;; | |
355 | ||
929 | cpu=sparc | |
930 | vendor=$basic_machine | |
931 | ;; | |
932 | leon-*|leon[3-9]-*) | |
933 | cpu=sparc | |
934 | vendor=`echo "$basic_machine" | sed 's/-.*//'` | |
935 | ;; | |
936 | ||
937 | *-*) | |
938 | # shellcheck disable=SC2162 | |
939 | saved_IFS=$IFS | |
940 | IFS="-" read cpu vendor <<EOF | |
941 | $basic_machine | |
942 | EOF | |
943 | IFS=$saved_IFS | |
944 | ;; | |
356 | 945 | # We use `pc' rather than `unknown' |
357 | 946 | # because (1) that's what they normally are, and |
358 | 947 | # (2) the word "unknown" tends to confuse beginning users. |
359 | 948 | i*86 | x86_64) |
360 | basic_machine=$basic_machine-pc | |
361 | ;; | |
362 | # Object if more than one company name word. | |
363 | *-*-*) | |
364 | echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 | |
365 | exit 1 | |
366 | ;; | |
367 | # Recognize the basic CPU types with company name. | |
368 | 580-* \ | |
369 | | a29k-* \ | |
370 | | aarch64-* | aarch64_be-* \ | |
371 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | |
372 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | |
373 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | |
374 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | |
375 | | avr-* | avr32-* \ | |
376 | | ba-* \ | |
377 | | be32-* | be64-* \ | |
378 | | bfin-* | bs2000-* \ | |
379 | | c[123]* | c30-* | [cjt]90-* | c4x-* \ | |
380 | | c8051-* | clipper-* | craynv-* | cydra-* \ | |
381 | | d10v-* | d30v-* | dlx-* \ | |
382 | | e2k-* | elxsi-* \ | |
383 | | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | |
384 | | h8300-* | h8500-* \ | |
385 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | |
386 | | hexagon-* \ | |
387 | | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | |
388 | | ip2k-* | iq2000-* \ | |
389 | | k1om-* \ | |
390 | | le32-* | le64-* \ | |
391 | | lm32-* \ | |
392 | | m32c-* | m32r-* | m32rle-* \ | |
393 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | |
394 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | |
395 | | microblaze-* | microblazeel-* \ | |
396 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | |
397 | | mips16-* \ | |
398 | | mips64-* | mips64el-* \ | |
399 | | mips64octeon-* | mips64octeonel-* \ | |
400 | | mips64orion-* | mips64orionel-* \ | |
401 | | mips64r5900-* | mips64r5900el-* \ | |
402 | | mips64vr-* | mips64vrel-* \ | |
403 | | mips64vr4100-* | mips64vr4100el-* \ | |
404 | | mips64vr4300-* | mips64vr4300el-* \ | |
405 | | mips64vr5000-* | mips64vr5000el-* \ | |
406 | | mips64vr5900-* | mips64vr5900el-* \ | |
407 | | mipsisa32-* | mipsisa32el-* \ | |
408 | | mipsisa32r2-* | mipsisa32r2el-* \ | |
409 | | mipsisa32r6-* | mipsisa32r6el-* \ | |
410 | | mipsisa64-* | mipsisa64el-* \ | |
411 | | mipsisa64r2-* | mipsisa64r2el-* \ | |
412 | | mipsisa64r6-* | mipsisa64r6el-* \ | |
413 | | mipsisa64sb1-* | mipsisa64sb1el-* \ | |
414 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | |
415 | | mipsr5900-* | mipsr5900el-* \ | |
416 | | mipstx39-* | mipstx39el-* \ | |
417 | | mmix-* \ | |
418 | | mt-* \ | |
419 | | msp430-* \ | |
420 | | nds32-* | nds32le-* | nds32be-* \ | |
421 | | nios-* | nios2-* | nios2eb-* | nios2el-* \ | |
422 | | none-* | np1-* | ns16k-* | ns32k-* \ | |
423 | | open8-* \ | |
424 | | or1k*-* \ | |
425 | | orion-* \ | |
426 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | |
427 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | |
428 | | pru-* \ | |
429 | | pyramid-* \ | |
430 | | riscv32-* | riscv64-* \ | |
431 | | rl78-* | romp-* | rs6000-* | rx-* \ | |
432 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | |
433 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | |
434 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | |
435 | | sparclite-* \ | |
436 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | |
437 | | tahoe-* \ | |
438 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
439 | | tile*-* \ | |
440 | | tron-* \ | |
441 | | ubicom32-* \ | |
442 | | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | |
443 | | vax-* \ | |
444 | | visium-* \ | |
445 | | wasm32-* \ | |
446 | | we32k-* \ | |
447 | | x86-* | x86_64-* | xc16x-* | xps100-* \ | |
448 | | xstormy16-* | xtensa*-* \ | |
449 | | ymp-* \ | |
450 | | z8k-* | z80-*) | |
451 | ;; | |
452 | # Recognize the basic CPU types without company name, with glob match. | |
453 | xtensa*) | |
454 | basic_machine=$basic_machine-unknown | |
455 | ;; | |
456 | # Recognize the various machine names and aliases which stand | |
457 | # for a CPU type and a company and sometimes even an OS. | |
458 | 386bsd) | |
459 | basic_machine=i386-pc | |
460 | os=-bsd | |
461 | ;; | |
462 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
463 | basic_machine=m68000-att | |
464 | ;; | |
465 | 3b*) | |
466 | basic_machine=we32k-att | |
467 | ;; | |
468 | a29khif) | |
469 | basic_machine=a29k-amd | |
470 | os=-udi | |
471 | ;; | |
472 | abacus) | |
473 | basic_machine=abacus-unknown | |
474 | ;; | |
475 | adobe68k) | |
476 | basic_machine=m68010-adobe | |
477 | os=-scout | |
478 | ;; | |
479 | alliant | fx80) | |
480 | basic_machine=fx80-alliant | |
481 | ;; | |
482 | altos | altos3068) | |
483 | basic_machine=m68k-altos | |
484 | ;; | |
485 | am29k) | |
486 | basic_machine=a29k-none | |
487 | os=-bsd | |
488 | ;; | |
489 | amd64) | |
490 | basic_machine=x86_64-pc | |
491 | ;; | |
949 | cpu=$basic_machine | |
950 | vendor=pc | |
951 | ;; | |
952 | # These rules are duplicated from below for sake of the special case above; | |
953 | # i.e. things that normalized to x86 arches should also default to "pc" | |
954 | pc98) | |
955 | cpu=i386 | |
956 | vendor=pc | |
957 | ;; | |
958 | x64 | amd64) | |
959 | cpu=x86_64 | |
960 | vendor=pc | |
961 | ;; | |
962 | # Recognize the basic CPU types without company name. | |
963 | *) | |
964 | cpu=$basic_machine | |
965 | vendor=unknown | |
966 | ;; | |
967 | esac | |
968 | ||
969 | unset -v basic_machine | |
970 | ||
971 | # Decode basic machines in the full and proper CPU-Company form. | |
972 | case $cpu-$vendor in | |
973 | # Here we handle the default manufacturer of certain CPU types in canonical form. It is in | |
974 | # some cases the only manufacturer, in others, it is the most popular. | |
975 | craynv-unknown) | |
976 | vendor=cray | |
977 | basic_os=${basic_os:-unicosmp} | |
978 | ;; | |
979 | c90-unknown | c90-cray) | |
980 | vendor=cray | |
981 | basic_os=${Basic_os:-unicos} | |
982 | ;; | |
983 | fx80-unknown) | |
984 | vendor=alliant | |
985 | ;; | |
986 | romp-unknown) | |
987 | vendor=ibm | |
988 | ;; | |
989 | mmix-unknown) | |
990 | vendor=knuth | |
991 | ;; | |
992 | microblaze-unknown | microblazeel-unknown) | |
993 | vendor=xilinx | |
994 | ;; | |
995 | rs6000-unknown) | |
996 | vendor=ibm | |
997 | ;; | |
998 | vax-unknown) | |
999 | vendor=dec | |
1000 | ;; | |
1001 | pdp11-unknown) | |
1002 | vendor=dec | |
1003 | ;; | |
1004 | we32k-unknown) | |
1005 | vendor=att | |
1006 | ;; | |
1007 | cydra-unknown) | |
1008 | vendor=cydrome | |
1009 | ;; | |
1010 | i370-ibm*) | |
1011 | vendor=ibm | |
1012 | ;; | |
1013 | orion-unknown) | |
1014 | vendor=highlevel | |
1015 | ;; | |
1016 | xps-unknown | xps100-unknown) | |
1017 | cpu=xps100 | |
1018 | vendor=honeywell | |
1019 | ;; | |
1020 | ||
1021 | # Here we normalize CPU types with a missing or matching vendor | |
1022 | armh-unknown | armh-alt) | |
1023 | cpu=armv7l | |
1024 | vendor=alt | |
1025 | basic_os=${basic_os:-linux-gnueabihf} | |
1026 | ;; | |
1027 | dpx20-unknown | dpx20-bull) | |
1028 | cpu=rs6000 | |
1029 | vendor=bull | |
1030 | basic_os=${basic_os:-bosx} | |
1031 | ;; | |
1032 | ||
1033 | # Here we normalize CPU types irrespective of the vendor | |
492 | 1034 | amd64-*) |
493 | basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
494 | ;; | |
495 | amdahl) | |
496 | basic_machine=580-amdahl | |
497 | os=-sysv | |
498 | ;; | |
499 | amiga | amiga-*) | |
500 | basic_machine=m68k-unknown | |
501 | ;; | |
502 | amigaos | amigados) | |
503 | basic_machine=m68k-unknown | |
504 | os=-amigaos | |
505 | ;; | |
506 | amigaunix | amix) | |
507 | basic_machine=m68k-unknown | |
508 | os=-sysv4 | |
509 | ;; | |
510 | apollo68) | |
511 | basic_machine=m68k-apollo | |
512 | os=-sysv | |
513 | ;; | |
514 | apollo68bsd) | |
515 | basic_machine=m68k-apollo | |
516 | os=-bsd | |
517 | ;; | |
518 | aros) | |
519 | basic_machine=i386-pc | |
520 | os=-aros | |
521 | ;; | |
522 | asmjs) | |
523 | basic_machine=asmjs-unknown | |
524 | ;; | |
525 | aux) | |
526 | basic_machine=m68k-apple | |
527 | os=-aux | |
528 | ;; | |
529 | balance) | |
530 | basic_machine=ns32k-sequent | |
531 | os=-dynix | |
532 | ;; | |
533 | blackfin) | |
534 | basic_machine=bfin-unknown | |
535 | os=-linux | |
1035 | cpu=x86_64 | |
536 | 1036 | ;; |
537 | 1037 | blackfin-*) |
538 | basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
539 | os=-linux | |
540 | ;; | |
541 | bluegene*) | |
542 | basic_machine=powerpc-ibm | |
543 | os=-cnk | |
1038 | cpu=bfin | |
1039 | basic_os=linux | |
544 | 1040 | ;; |
545 | 1041 | c54x-*) |
546 | basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1042 | cpu=tic54x | |
547 | 1043 | ;; |
548 | 1044 | c55x-*) |
549 | basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1045 | cpu=tic55x | |
550 | 1046 | ;; |
551 | 1047 | c6x-*) |
552 | basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
553 | ;; | |
554 | c90) | |
555 | basic_machine=c90-cray | |
556 | os=-unicos | |
557 | ;; | |
558 | cegcc) | |
559 | basic_machine=arm-unknown | |
560 | os=-cegcc | |
561 | ;; | |
562 | convex-c1) | |
563 | basic_machine=c1-convex | |
564 | os=-bsd | |
565 | ;; | |
566 | convex-c2) | |
567 | basic_machine=c2-convex | |
568 | os=-bsd | |
569 | ;; | |
570 | convex-c32) | |
571 | basic_machine=c32-convex | |
572 | os=-bsd | |
573 | ;; | |
574 | convex-c34) | |
575 | basic_machine=c34-convex | |
576 | os=-bsd | |
577 | ;; | |
578 | convex-c38) | |
579 | basic_machine=c38-convex | |
580 | os=-bsd | |
581 | ;; | |
582 | cray | j90) | |
583 | basic_machine=j90-cray | |
584 | os=-unicos | |
585 | ;; | |
586 | craynv) | |
587 | basic_machine=craynv-cray | |
588 | os=-unicosmp | |
589 | ;; | |
590 | cr16 | cr16-*) | |
591 | basic_machine=cr16-unknown | |
592 | os=-elf | |
593 | ;; | |
594 | crds | unos) | |
595 | basic_machine=m68k-crds | |
596 | ;; | |
597 | crisv32 | crisv32-* | etraxfs*) | |
598 | basic_machine=crisv32-axis | |
599 | ;; | |
600 | cris | cris-* | etrax*) | |
601 | basic_machine=cris-axis | |
602 | ;; | |
603 | crx) | |
604 | basic_machine=crx-unknown | |
605 | os=-elf | |
606 | ;; | |
607 | da30 | da30-*) | |
608 | basic_machine=m68k-da30 | |
609 | ;; | |
610 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
611 | basic_machine=mips-dec | |
612 | ;; | |
613 | decsystem10* | dec10*) | |
614 | basic_machine=pdp10-dec | |
615 | os=-tops10 | |
616 | ;; | |
617 | decsystem20* | dec20*) | |
618 | basic_machine=pdp10-dec | |
619 | os=-tops20 | |
620 | ;; | |
621 | delta | 3300 | motorola-3300 | motorola-delta \ | |
622 | | 3300-motorola | delta-motorola) | |
623 | basic_machine=m68k-motorola | |
624 | ;; | |
625 | delta88) | |
626 | basic_machine=m88k-motorola | |
627 | os=-sysv3 | |
628 | ;; | |
629 | dicos) | |
630 | basic_machine=i686-pc | |
631 | os=-dicos | |
632 | ;; | |
633 | djgpp) | |
634 | basic_machine=i586-pc | |
635 | os=-msdosdjgpp | |
636 | ;; | |
637 | dpx20 | dpx20-*) | |
638 | basic_machine=rs6000-bull | |
639 | os=-bosx | |
640 | ;; | |
641 | dpx2*) | |
642 | basic_machine=m68k-bull | |
643 | os=-sysv3 | |
644 | ;; | |
645 | e500v[12]) | |
646 | basic_machine=powerpc-unknown | |
647 | os=$os"spe" | |
1048 | cpu=tic6x | |
648 | 1049 | ;; |
649 | 1050 | e500v[12]-*) |
650 | basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
651 | os=$os"spe" | |
652 | ;; | |
653 | ebmon29k) | |
654 | basic_machine=a29k-amd | |
655 | os=-ebmon | |
656 | ;; | |
657 | elxsi) | |
658 | basic_machine=elxsi-elxsi | |
659 | os=-bsd | |
660 | ;; | |
661 | encore | umax | mmax) | |
662 | basic_machine=ns32k-encore | |
663 | ;; | |
664 | es1800 | OSE68k | ose68k | ose | OSE) | |
665 | basic_machine=m68k-ericsson | |
666 | os=-ose | |
667 | ;; | |
668 | fx2800) | |
669 | basic_machine=i860-alliant | |
670 | ;; | |
671 | genix) | |
672 | basic_machine=ns32k-ns | |
673 | ;; | |
674 | gmicro) | |
675 | basic_machine=tron-gmicro | |
676 | os=-sysv | |
677 | ;; | |
678 | go32) | |
679 | basic_machine=i386-pc | |
680 | os=-go32 | |
681 | ;; | |
682 | h3050r* | hiux*) | |
683 | basic_machine=hppa1.1-hitachi | |
684 | os=-hiuxwe2 | |
685 | ;; | |
686 | h8300hms) | |
687 | basic_machine=h8300-hitachi | |
688 | os=-hms | |
689 | ;; | |
690 | h8300xray) | |
691 | basic_machine=h8300-hitachi | |
692 | os=-xray | |
693 | ;; | |
694 | h8500hms) | |
695 | basic_machine=h8500-hitachi | |
696 | os=-hms | |
697 | ;; | |
698 | harris) | |
699 | basic_machine=m88k-harris | |
700 | os=-sysv3 | |
701 | ;; | |
702 | hp300-*) | |
703 | basic_machine=m68k-hp | |
704 | ;; | |
705 | hp300bsd) | |
706 | basic_machine=m68k-hp | |
707 | os=-bsd | |
708 | ;; | |
709 | hp300hpux) | |
710 | basic_machine=m68k-hp | |
711 | os=-hpux | |
712 | ;; | |
713 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
714 | basic_machine=hppa1.0-hp | |
715 | ;; | |
716 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
717 | basic_machine=m68000-hp | |
718 | ;; | |
719 | hp9k3[2-9][0-9]) | |
720 | basic_machine=m68k-hp | |
721 | ;; | |
722 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
723 | basic_machine=hppa1.0-hp | |
724 | ;; | |
725 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
726 | basic_machine=hppa1.1-hp | |
727 | ;; | |
728 | hp9k78[0-9] | hp78[0-9]) | |
729 | # FIXME: really hppa2.0-hp | |
730 | basic_machine=hppa1.1-hp | |
731 | ;; | |
732 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
733 | # FIXME: really hppa2.0-hp | |
734 | basic_machine=hppa1.1-hp | |
735 | ;; | |
736 | hp9k8[0-9][13679] | hp8[0-9][13679]) | |
737 | basic_machine=hppa1.1-hp | |
738 | ;; | |
739 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
740 | basic_machine=hppa1.0-hp | |
741 | ;; | |
742 | hppaosf) | |
743 | basic_machine=hppa1.1-hp | |
744 | os=-osf | |
745 | ;; | |
746 | hppro) | |
747 | basic_machine=hppa1.1-hp | |
748 | os=-proelf | |
749 | ;; | |
750 | i370-ibm* | ibm*) | |
751 | basic_machine=i370-ibm | |
752 | ;; | |
753 | i*86v32) | |
754 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
755 | os=-sysv32 | |
756 | ;; | |
757 | i*86v4*) | |
758 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
759 | os=-sysv4 | |
760 | ;; | |
761 | i*86v) | |
762 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
763 | os=-sysv | |
764 | ;; | |
765 | i*86sol2) | |
766 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
767 | os=-solaris2 | |
768 | ;; | |
769 | i386mach) | |
770 | basic_machine=i386-mach | |
771 | os=-mach | |
772 | ;; | |
773 | vsta) | |
774 | basic_machine=i386-unknown | |
775 | os=-vsta | |
776 | ;; | |
777 | iris | iris4d) | |
778 | basic_machine=mips-sgi | |
779 | case $os in | |
780 | -irix*) | |
781 | ;; | |
782 | *) | |
783 | os=-irix4 | |
784 | ;; | |
1051 | cpu=powerpc | |
1052 | basic_os=${basic_os}"spe" | |
1053 | ;; | |
1054 | mips3*-*) | |
1055 | cpu=mips64 | |
1056 | ;; | |
1057 | ms1-*) | |
1058 | cpu=mt | |
1059 | ;; | |
1060 | m68knommu-*) | |
1061 | cpu=m68k | |
1062 | basic_os=linux | |
1063 | ;; | |
1064 | m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) | |
1065 | cpu=s12z | |
1066 | ;; | |
1067 | openrisc-*) | |
1068 | cpu=or32 | |
1069 | ;; | |
1070 | parisc-*) | |
1071 | cpu=hppa | |
1072 | basic_os=linux | |
1073 | ;; | |
1074 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
1075 | cpu=i586 | |
1076 | ;; | |
1077 | pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) | |
1078 | cpu=i686 | |
1079 | ;; | |
1080 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
1081 | cpu=i686 | |
1082 | ;; | |
1083 | pentium4-*) | |
1084 | cpu=i786 | |
1085 | ;; | |
1086 | pc98-*) | |
1087 | cpu=i386 | |
1088 | ;; | |
1089 | ppc-* | ppcbe-*) | |
1090 | cpu=powerpc | |
1091 | ;; | |
1092 | ppcle-* | powerpclittle-*) | |
1093 | cpu=powerpcle | |
1094 | ;; | |
1095 | ppc64-*) | |
1096 | cpu=powerpc64 | |
1097 | ;; | |
1098 | ppc64le-* | powerpc64little-*) | |
1099 | cpu=powerpc64le | |
1100 | ;; | |
1101 | sb1-*) | |
1102 | cpu=mipsisa64sb1 | |
1103 | ;; | |
1104 | sb1el-*) | |
1105 | cpu=mipsisa64sb1el | |
1106 | ;; | |
1107 | sh5e[lb]-*) | |
1108 | cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` | |
1109 | ;; | |
1110 | spur-*) | |
1111 | cpu=spur | |
1112 | ;; | |
1113 | strongarm-* | thumb-*) | |
1114 | cpu=arm | |
1115 | ;; | |
1116 | tx39-*) | |
1117 | cpu=mipstx39 | |
1118 | ;; | |
1119 | tx39el-*) | |
1120 | cpu=mipstx39el | |
1121 | ;; | |
1122 | x64-*) | |
1123 | cpu=x86_64 | |
1124 | ;; | |
1125 | xscale-* | xscalee[bl]-*) | |
1126 | cpu=`echo "$cpu" | sed 's/^xscale/arm/'` | |
1127 | ;; | |
1128 | arm64-* | aarch64le-*) | |
1129 | cpu=aarch64 | |
1130 | ;; | |
1131 | ||
1132 | # Recognize the canonical CPU Types that limit and/or modify the | |
1133 | # company names they are paired with. | |
1134 | cr16-*) | |
1135 | basic_os=${basic_os:-elf} | |
1136 | ;; | |
1137 | crisv32-* | etraxfs*-*) | |
1138 | cpu=crisv32 | |
1139 | vendor=axis | |
1140 | ;; | |
1141 | cris-* | etrax*-*) | |
1142 | cpu=cris | |
1143 | vendor=axis | |
1144 | ;; | |
1145 | crx-*) | |
1146 | basic_os=${basic_os:-elf} | |
1147 | ;; | |
1148 | neo-tandem) | |
1149 | cpu=neo | |
1150 | vendor=tandem | |
1151 | ;; | |
1152 | nse-tandem) | |
1153 | cpu=nse | |
1154 | vendor=tandem | |
1155 | ;; | |
1156 | nsr-tandem) | |
1157 | cpu=nsr | |
1158 | vendor=tandem | |
1159 | ;; | |
1160 | nsv-tandem) | |
1161 | cpu=nsv | |
1162 | vendor=tandem | |
1163 | ;; | |
1164 | nsx-tandem) | |
1165 | cpu=nsx | |
1166 | vendor=tandem | |
1167 | ;; | |
1168 | mipsallegrexel-sony) | |
1169 | cpu=mipsallegrexel | |
1170 | vendor=sony | |
1171 | ;; | |
1172 | tile*-*) | |
1173 | basic_os=${basic_os:-linux-gnu} | |
1174 | ;; | |
1175 | ||
1176 | *) | |
1177 | # Recognize the canonical CPU types that are allowed with any | |
1178 | # company name. | |
1179 | case $cpu in | |
1180 | 1750a | 580 \ | |
1181 | | a29k \ | |
1182 | | aarch64 | aarch64_be \ | |
1183 | | abacus \ | |
1184 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | |
1185 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | |
1186 | | alphapca5[67] | alpha64pca5[67] \ | |
1187 | | am33_2.0 \ | |
1188 | | amdgcn \ | |
1189 | | arc | arceb | arc32 | arc64 \ | |
1190 | | arm | arm[lb]e | arme[lb] | armv* \ | |
1191 | | avr | avr32 \ | |
1192 | | asmjs \ | |
1193 | | ba \ | |
1194 | | be32 | be64 \ | |
1195 | | bfin | bpf | bs2000 \ | |
1196 | | c[123]* | c30 | [cjt]90 | c4x \ | |
1197 | | c8051 | clipper | craynv | csky | cydra \ | |
1198 | | d10v | d30v | dlx | dsp16xx \ | |
1199 | | e2k | elxsi | epiphany \ | |
1200 | | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ | |
1201 | | h8300 | h8500 \ | |
1202 | | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
1203 | | hexagon \ | |
1204 | | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | |
1205 | | ip2k | iq2000 \ | |
1206 | | k1om \ | |
1207 | | le32 | le64 \ | |
1208 | | lm32 \ | |
1209 | | loongarch32 | loongarch64 | loongarchx32 \ | |
1210 | | m32c | m32r | m32rle \ | |
1211 | | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | |
1212 | | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | |
1213 | | m88110 | m88k | maxq | mb | mcore | mep | metag \ | |
1214 | | microblaze | microblazeel \ | |
1215 | | mips | mipsbe | mipseb | mipsel | mipsle \ | |
1216 | | mips16 \ | |
1217 | | mips64 | mips64eb | mips64el \ | |
1218 | | mips64octeon | mips64octeonel \ | |
1219 | | mips64orion | mips64orionel \ | |
1220 | | mips64r5900 | mips64r5900el \ | |
1221 | | mips64vr | mips64vrel \ | |
1222 | | mips64vr4100 | mips64vr4100el \ | |
1223 | | mips64vr4300 | mips64vr4300el \ | |
1224 | | mips64vr5000 | mips64vr5000el \ | |
1225 | | mips64vr5900 | mips64vr5900el \ | |
1226 | | mipsisa32 | mipsisa32el \ | |
1227 | | mipsisa32r2 | mipsisa32r2el \ | |
1228 | | mipsisa32r3 | mipsisa32r3el \ | |
1229 | | mipsisa32r5 | mipsisa32r5el \ | |
1230 | | mipsisa32r6 | mipsisa32r6el \ | |
1231 | | mipsisa64 | mipsisa64el \ | |
1232 | | mipsisa64r2 | mipsisa64r2el \ | |
1233 | | mipsisa64r3 | mipsisa64r3el \ | |
1234 | | mipsisa64r5 | mipsisa64r5el \ | |
1235 | | mipsisa64r6 | mipsisa64r6el \ | |
1236 | | mipsisa64sb1 | mipsisa64sb1el \ | |
1237 | | mipsisa64sr71k | mipsisa64sr71kel \ | |
1238 | | mipsr5900 | mipsr5900el \ | |
1239 | | mipstx39 | mipstx39el \ | |
1240 | | mmix \ | |
1241 | | mn10200 | mn10300 \ | |
1242 | | moxie \ | |
1243 | | mt \ | |
1244 | | msp430 \ | |
1245 | | nds32 | nds32le | nds32be \ | |
1246 | | nfp \ | |
1247 | | nios | nios2 | nios2eb | nios2el \ | |
1248 | | none | np1 | ns16k | ns32k | nvptx \ | |
1249 | | open8 \ | |
1250 | | or1k* \ | |
1251 | | or32 \ | |
1252 | | orion \ | |
1253 | | picochip \ | |
1254 | | pdp10 | pdp11 | pj | pjl | pn | power \ | |
1255 | | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | |
1256 | | pru \ | |
1257 | | pyramid \ | |
1258 | | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ | |
1259 | | rl78 | romp | rs6000 | rx \ | |
1260 | | s390 | s390x \ | |
1261 | | score \ | |
1262 | | sh | shl \ | |
1263 | | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | |
1264 | | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ | |
1265 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | |
1266 | | sparclite \ | |
1267 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | |
1268 | | spu \ | |
1269 | | tahoe \ | |
1270 | | thumbv7* \ | |
1271 | | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | |
1272 | | tron \ | |
1273 | | ubicom32 \ | |
1274 | | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | |
1275 | | vax \ | |
1276 | | visium \ | |
1277 | | w65 \ | |
1278 | | wasm32 | wasm64 \ | |
1279 | | we32k \ | |
1280 | | x86 | x86_64 | xc16x | xgate | xps100 \ | |
1281 | | xstormy16 | xtensa* \ | |
1282 | | ymp \ | |
1283 | | z8k | z80) | |
1284 | ;; | |
1285 | ||
1286 | *) | |
1287 | echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 | |
1288 | exit 1 | |
1289 | ;; | |
785 | 1290 | esac |
786 | 1291 | ;; |
787 | isi68 | isi) | |
788 | basic_machine=m68k-isi | |
789 | os=-sysv | |
790 | ;; | |
791 | leon-*|leon[3-9]-*) | |
792 | basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` | |
793 | ;; | |
794 | m68knommu) | |
795 | basic_machine=m68k-unknown | |
796 | os=-linux | |
797 | ;; | |
798 | m68knommu-*) | |
799 | basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
800 | os=-linux | |
801 | ;; | |
802 | magnum | m3230) | |
803 | basic_machine=mips-mips | |
804 | os=-sysv | |
805 | ;; | |
806 | merlin) | |
807 | basic_machine=ns32k-utek | |
808 | os=-sysv | |
809 | ;; | |
810 | microblaze*) | |
811 | basic_machine=microblaze-xilinx | |
812 | ;; | |
813 | mingw64) | |
814 | basic_machine=x86_64-pc | |
815 | os=-mingw64 | |
816 | ;; | |
817 | mingw32) | |
818 | basic_machine=i686-pc | |
819 | os=-mingw32 | |
820 | ;; | |
821 | mingw32ce) | |
822 | basic_machine=arm-unknown | |
823 | os=-mingw32ce | |
824 | ;; | |
825 | miniframe) | |
826 | basic_machine=m68000-convergent | |
827 | ;; | |
828 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
829 | basic_machine=m68k-atari | |
830 | os=-mint | |
831 | ;; | |
832 | mips3*-*) | |
833 | basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` | |
834 | ;; | |
835 | mips3*) | |
836 | basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown | |
837 | ;; | |
838 | monitor) | |
839 | basic_machine=m68k-rom68k | |
840 | os=-coff | |
841 | ;; | |
842 | morphos) | |
843 | basic_machine=powerpc-unknown | |
844 | os=-morphos | |
845 | ;; | |
846 | moxiebox) | |
847 | basic_machine=moxie-unknown | |
848 | os=-moxiebox | |
849 | ;; | |
850 | msdos) | |
851 | basic_machine=i386-pc | |
852 | os=-msdos | |
853 | ;; | |
854 | ms1-*) | |
855 | basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` | |
856 | ;; | |
857 | msys) | |
858 | basic_machine=i686-pc | |
859 | os=-msys | |
860 | ;; | |
861 | mvs) | |
862 | basic_machine=i370-ibm | |
863 | os=-mvs | |
864 | ;; | |
865 | nacl) | |
866 | basic_machine=le32-unknown | |
867 | os=-nacl | |
868 | ;; | |
869 | ncr3000) | |
870 | basic_machine=i486-ncr | |
871 | os=-sysv4 | |
872 | ;; | |
873 | netbsd386) | |
874 | basic_machine=i386-unknown | |
875 | os=-netbsd | |
876 | ;; | |
877 | netwinder) | |
878 | basic_machine=armv4l-rebel | |
879 | os=-linux | |
880 | ;; | |
881 | news | news700 | news800 | news900) | |
882 | basic_machine=m68k-sony | |
883 | os=-newsos | |
884 | ;; | |
885 | news1000) | |
886 | basic_machine=m68030-sony | |
887 | os=-newsos | |
888 | ;; | |
889 | news-3600 | risc-news) | |
890 | basic_machine=mips-sony | |
891 | os=-newsos | |
892 | ;; | |
893 | necv70) | |
894 | basic_machine=v70-nec | |
895 | os=-sysv | |
896 | ;; | |
897 | next | m*-next) | |
898 | basic_machine=m68k-next | |
899 | case $os in | |
900 | -nextstep* ) | |
901 | ;; | |
902 | -ns2*) | |
903 | os=-nextstep2 | |
904 | ;; | |
905 | *) | |
906 | os=-nextstep3 | |
907 | ;; | |
908 | esac | |
909 | ;; | |
910 | nh3000) | |
911 | basic_machine=m68k-harris | |
912 | os=-cxux | |
913 | ;; | |
914 | nh[45]000) | |
915 | basic_machine=m88k-harris | |
916 | os=-cxux | |
917 | ;; | |
918 | nindy960) | |
919 | basic_machine=i960-intel | |
920 | os=-nindy | |
921 | ;; | |
922 | mon960) | |
923 | basic_machine=i960-intel | |
924 | os=-mon960 | |
925 | ;; | |
926 | nonstopux) | |
927 | basic_machine=mips-compaq | |
928 | os=-nonstopux | |
929 | ;; | |
930 | np1) | |
931 | basic_machine=np1-gould | |
932 | ;; | |
933 | neo-tandem) | |
934 | basic_machine=neo-tandem | |
935 | ;; | |
936 | nse-tandem) | |
937 | basic_machine=nse-tandem | |
938 | ;; | |
939 | nsr-tandem) | |
940 | basic_machine=nsr-tandem | |
941 | ;; | |
942 | nsv-tandem) | |
943 | basic_machine=nsv-tandem | |
944 | ;; | |
945 | nsx-tandem) | |
946 | basic_machine=nsx-tandem | |
947 | ;; | |
948 | op50n-* | op60c-*) | |
949 | basic_machine=hppa1.1-oki | |
950 | os=-proelf | |
951 | ;; | |
952 | openrisc | openrisc-*) | |
953 | basic_machine=or32-unknown | |
954 | ;; | |
955 | os400) | |
956 | basic_machine=powerpc-ibm | |
957 | os=-os400 | |
958 | ;; | |
959 | OSE68000 | ose68000) | |
960 | basic_machine=m68000-ericsson | |
961 | os=-ose | |
962 | ;; | |
963 | os68k) | |
964 | basic_machine=m68k-none | |
965 | os=-os68k | |
966 | ;; | |
967 | pa-hitachi) | |
968 | basic_machine=hppa1.1-hitachi | |
969 | os=-hiuxwe2 | |
970 | ;; | |
971 | paragon) | |
972 | basic_machine=i860-intel | |
973 | os=-osf | |
974 | ;; | |
975 | parisc) | |
976 | basic_machine=hppa-unknown | |
977 | os=-linux | |
978 | ;; | |
979 | parisc-*) | |
980 | basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
981 | os=-linux | |
982 | ;; | |
983 | pbd) | |
984 | basic_machine=sparc-tti | |
985 | ;; | |
986 | pbb) | |
987 | basic_machine=m68k-tti | |
988 | ;; | |
989 | pc532 | pc532-*) | |
990 | basic_machine=ns32k-pc532 | |
991 | ;; | |
992 | pc98) | |
993 | basic_machine=i386-pc | |
994 | ;; | |
995 | pc98-*) | |
996 | basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
997 | ;; | |
998 | pentium | p5 | k5 | k6 | nexgen | viac3) | |
999 | basic_machine=i586-pc | |
1000 | ;; | |
1001 | pentiumpro | p6 | 6x86 | athlon | athlon_*) | |
1002 | basic_machine=i686-pc | |
1003 | ;; | |
1004 | pentiumii | pentium2 | pentiumiii | pentium3) | |
1005 | basic_machine=i686-pc | |
1006 | ;; | |
1007 | pentium4) | |
1008 | basic_machine=i786-pc | |
1009 | ;; | |
1010 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
1011 | basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1012 | ;; | |
1013 | pentiumpro-* | p6-* | 6x86-* | athlon-*) | |
1014 | basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1015 | ;; | |
1016 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
1017 | basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1018 | ;; | |
1019 | pentium4-*) | |
1020 | basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1021 | ;; | |
1022 | pn) | |
1023 | basic_machine=pn-gould | |
1024 | ;; | |
1025 | power) basic_machine=power-ibm | |
1026 | ;; | |
1027 | ppc | ppcbe) basic_machine=powerpc-unknown | |
1028 | ;; | |
1029 | ppc-* | ppcbe-*) | |
1030 | basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1031 | ;; | |
1032 | ppcle | powerpclittle) | |
1033 | basic_machine=powerpcle-unknown | |
1034 | ;; | |
1035 | ppcle-* | powerpclittle-*) | |
1036 | basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1037 | ;; | |
1038 | ppc64) basic_machine=powerpc64-unknown | |
1039 | ;; | |
1040 | ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1041 | ;; | |
1042 | ppc64le | powerpc64little) | |
1043 | basic_machine=powerpc64le-unknown | |
1044 | ;; | |
1045 | ppc64le-* | powerpc64little-*) | |
1046 | basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1047 | ;; | |
1048 | ps2) | |
1049 | basic_machine=i386-ibm | |
1050 | ;; | |
1051 | pw32) | |
1052 | basic_machine=i586-unknown | |
1053 | os=-pw32 | |
1054 | ;; | |
1055 | rdos | rdos64) | |
1056 | basic_machine=x86_64-pc | |
1057 | os=-rdos | |
1058 | ;; | |
1059 | rdos32) | |
1060 | basic_machine=i386-pc | |
1061 | os=-rdos | |
1062 | ;; | |
1063 | rom68k) | |
1064 | basic_machine=m68k-rom68k | |
1065 | os=-coff | |
1066 | ;; | |
1067 | rm[46]00) | |
1068 | basic_machine=mips-siemens | |
1069 | ;; | |
1070 | rtpc | rtpc-*) | |
1071 | basic_machine=romp-ibm | |
1072 | ;; | |
1073 | s390 | s390-*) | |
1074 | basic_machine=s390-ibm | |
1075 | ;; | |
1076 | s390x | s390x-*) | |
1077 | basic_machine=s390x-ibm | |
1078 | ;; | |
1079 | sa29200) | |
1080 | basic_machine=a29k-amd | |
1081 | os=-udi | |
1082 | ;; | |
1083 | sb1) | |
1084 | basic_machine=mipsisa64sb1-unknown | |
1085 | ;; | |
1086 | sb1el) | |
1087 | basic_machine=mipsisa64sb1el-unknown | |
1088 | ;; | |
1089 | sde) | |
1090 | basic_machine=mipsisa32-sde | |
1091 | os=-elf | |
1092 | ;; | |
1093 | sei) | |
1094 | basic_machine=mips-sei | |
1095 | os=-seiux | |
1096 | ;; | |
1097 | sequent) | |
1098 | basic_machine=i386-sequent | |
1099 | ;; | |
1100 | sh5el) | |
1101 | basic_machine=sh5le-unknown | |
1102 | ;; | |
1103 | simso-wrs) | |
1104 | basic_machine=sparclite-wrs | |
1105 | os=-vxworks | |
1106 | ;; | |
1107 | sps7) | |
1108 | basic_machine=m68k-bull | |
1109 | os=-sysv2 | |
1110 | ;; | |
1111 | spur) | |
1112 | basic_machine=spur-unknown | |
1113 | ;; | |
1114 | st2000) | |
1115 | basic_machine=m68k-tandem | |
1116 | ;; | |
1117 | stratus) | |
1118 | basic_machine=i860-stratus | |
1119 | os=-sysv4 | |
1120 | ;; | |
1121 | strongarm-* | thumb-*) | |
1122 | basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
1123 | ;; | |
1124 | sun2) | |
1125 | basic_machine=m68000-sun | |
1126 | ;; | |
1127 | sun2os3) | |
1128 | basic_machine=m68000-sun | |
1129 | os=-sunos3 | |
1130 | ;; | |
1131 | sun2os4) | |
1132 | basic_machine=m68000-sun | |
1133 | os=-sunos4 | |
1134 | ;; | |
1135 | sun3os3) | |
1136 | basic_machine=m68k-sun | |
1137 | os=-sunos3 | |
1138 | ;; | |
1139 | sun3os4) | |
1140 | basic_machine=m68k-sun | |
1141 | os=-sunos4 | |
1142 | ;; | |
1143 | sun4os3) | |
1144 | basic_machine=sparc-sun | |
1145 | os=-sunos3 | |
1146 | ;; | |
1147 | sun4os4) | |
1148 | basic_machine=sparc-sun | |
1149 | os=-sunos4 | |
1150 | ;; | |
1151 | sun4sol2) | |
1152 | basic_machine=sparc-sun | |
1153 | os=-solaris2 | |
1154 | ;; | |
1155 | sun3 | sun3-*) | |
1156 | basic_machine=m68k-sun | |
1157 | ;; | |
1158 | sun4) | |
1159 | basic_machine=sparc-sun | |
1160 | ;; | |
1161 | sun386 | sun386i | roadrunner) | |
1162 | basic_machine=i386-sun | |
1163 | ;; | |
1164 | sv1) | |
1165 | basic_machine=sv1-cray | |
1166 | os=-unicos | |
1167 | ;; | |
1168 | symmetry) | |
1169 | basic_machine=i386-sequent | |
1170 | os=-dynix | |
1171 | ;; | |
1172 | t3e) | |
1173 | basic_machine=alphaev5-cray | |
1174 | os=-unicos | |
1175 | ;; | |
1176 | t90) | |
1177 | basic_machine=t90-cray | |
1178 | os=-unicos | |
1179 | ;; | |
1180 | tile*) | |
1181 | basic_machine=$basic_machine-unknown | |
1182 | os=-linux-gnu | |
1183 | ;; | |
1184 | tx39) | |
1185 | basic_machine=mipstx39-unknown | |
1186 | ;; | |
1187 | tx39el) | |
1188 | basic_machine=mipstx39el-unknown | |
1189 | ;; | |
1190 | toad1) | |
1191 | basic_machine=pdp10-xkl | |
1192 | os=-tops20 | |
1193 | ;; | |
1194 | tower | tower-32) | |
1195 | basic_machine=m68k-ncr | |
1196 | ;; | |
1197 | tpf) | |
1198 | basic_machine=s390x-ibm | |
1199 | os=-tpf | |
1200 | ;; | |
1201 | udi29k) | |
1202 | basic_machine=a29k-amd | |
1203 | os=-udi | |
1204 | ;; | |
1205 | ultra3) | |
1206 | basic_machine=a29k-nyu | |
1207 | os=-sym1 | |
1208 | ;; | |
1209 | v810 | necv810) | |
1210 | basic_machine=v810-nec | |
1211 | os=-none | |
1212 | ;; | |
1213 | vaxv) | |
1214 | basic_machine=vax-dec | |
1215 | os=-sysv | |
1216 | ;; | |
1217 | vms) | |
1218 | basic_machine=vax-dec | |
1219 | os=-vms | |
1220 | ;; | |
1221 | vpp*|vx|vx-*) | |
1222 | basic_machine=f301-fujitsu | |
1223 | ;; | |
1224 | vxworks960) | |
1225 | basic_machine=i960-wrs | |
1226 | os=-vxworks | |
1227 | ;; | |
1228 | vxworks68) | |
1229 | basic_machine=m68k-wrs | |
1230 | os=-vxworks | |
1231 | ;; | |
1232 | vxworks29k) | |
1233 | basic_machine=a29k-wrs | |
1234 | os=-vxworks | |
1235 | ;; | |
1236 | w65*) | |
1237 | basic_machine=w65-wdc | |
1238 | os=-none | |
1239 | ;; | |
1240 | w89k-*) | |
1241 | basic_machine=hppa1.1-winbond | |
1242 | os=-proelf | |
1243 | ;; | |
1244 | x64) | |
1245 | basic_machine=x86_64-pc | |
1246 | ;; | |
1247 | xbox) | |
1248 | basic_machine=i686-pc | |
1249 | os=-mingw32 | |
1250 | ;; | |
1251 | xps | xps100) | |
1252 | basic_machine=xps100-honeywell | |
1253 | ;; | |
1254 | xscale-* | xscalee[bl]-*) | |
1255 | basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` | |
1256 | ;; | |
1257 | ymp) | |
1258 | basic_machine=ymp-cray | |
1259 | os=-unicos | |
1260 | ;; | |
1261 | none) | |
1262 | basic_machine=none-none | |
1263 | os=-none | |
1264 | ;; | |
1265 | ||
1266 | # Here we handle the default manufacturer of certain CPU types. It is in | |
1267 | # some cases the only manufacturer, in others, it is the most popular. | |
1268 | w89k) | |
1269 | basic_machine=hppa1.1-winbond | |
1270 | ;; | |
1271 | op50n) | |
1272 | basic_machine=hppa1.1-oki | |
1273 | ;; | |
1274 | op60c) | |
1275 | basic_machine=hppa1.1-oki | |
1276 | ;; | |
1277 | romp) | |
1278 | basic_machine=romp-ibm | |
1279 | ;; | |
1280 | mmix) | |
1281 | basic_machine=mmix-knuth | |
1282 | ;; | |
1283 | rs6000) | |
1284 | basic_machine=rs6000-ibm | |
1285 | ;; | |
1286 | vax) | |
1287 | basic_machine=vax-dec | |
1288 | ;; | |
1289 | pdp11) | |
1290 | basic_machine=pdp11-dec | |
1291 | ;; | |
1292 | we32k) | |
1293 | basic_machine=we32k-att | |
1294 | ;; | |
1295 | sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) | |
1296 | basic_machine=sh-unknown | |
1297 | ;; | |
1298 | cydra) | |
1299 | basic_machine=cydra-cydrome | |
1300 | ;; | |
1301 | orion) | |
1302 | basic_machine=orion-highlevel | |
1303 | ;; | |
1304 | orion105) | |
1305 | basic_machine=clipper-highlevel | |
1306 | ;; | |
1307 | mac | mpw | mac-mpw) | |
1308 | basic_machine=m68k-apple | |
1309 | ;; | |
1310 | pmac | pmac-mpw) | |
1311 | basic_machine=powerpc-apple | |
1312 | ;; | |
1313 | *-unknown) | |
1314 | # Make sure to match an already-canonicalized machine name. | |
1292 | esac | |
1293 | ||
1294 | # Here we canonicalize certain aliases for manufacturers. | |
1295 | case $vendor in | |
1296 | digital*) | |
1297 | vendor=dec | |
1298 | ;; | |
1299 | commodore*) | |
1300 | vendor=cbm | |
1315 | 1301 | ;; |
1316 | 1302 | *) |
1317 | echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 | |
1318 | exit 1 | |
1319 | 1303 | ;; |
1320 | 1304 | esac |
1321 | 1305 | |
1322 | # Here we canonicalize certain aliases for manufacturers. | |
1323 | case $basic_machine in | |
1324 | *-digital*) | |
1325 | basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` | |
1326 | ;; | |
1327 | *-commodore*) | |
1328 | basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` | |
1306 | # Decode manufacturer-specific aliases for certain operating systems. | |
1307 | ||
1308 | if test x$basic_os != x | |
1309 | then | |
1310 | ||
1311 | # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just | |
1312 | # set os. | |
1313 | case $basic_os in | |
1314 | gnu/linux*) | |
1315 | kernel=linux | |
1316 | os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` | |
1317 | ;; | |
1318 | os2-emx) | |
1319 | kernel=os2 | |
1320 | os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` | |
1321 | ;; | |
1322 | nto-qnx*) | |
1323 | kernel=nto | |
1324 | os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` | |
1325 | ;; | |
1326 | *-*) | |
1327 | # shellcheck disable=SC2162 | |
1328 | saved_IFS=$IFS | |
1329 | IFS="-" read kernel os <<EOF | |
1330 | $basic_os | |
1331 | EOF | |
1332 | IFS=$saved_IFS | |
1333 | ;; | |
1334 | # Default OS when just kernel was specified | |
1335 | nto*) | |
1336 | kernel=nto | |
1337 | os=`echo "$basic_os" | sed -e 's|nto|qnx|'` | |
1338 | ;; | |
1339 | linux*) | |
1340 | kernel=linux | |
1341 | os=`echo "$basic_os" | sed -e 's|linux|gnu|'` | |
1329 | 1342 | ;; |
1330 | 1343 | *) |
1344 | kernel= | |
1345 | os=$basic_os | |
1331 | 1346 | ;; |
1332 | 1347 | esac |
1333 | 1348 | |
1334 | # Decode manufacturer-specific aliases for certain operating systems. | |
1335 | ||
1336 | if [ x"$os" != x"" ] | |
1337 | then | |
1349 | # Now, normalize the OS (knowing we just have one component, it's not a kernel, | |
1350 | # etc.) | |
1338 | 1351 | case $os in |
1339 | 1352 | # First match some system type aliases that might get confused |
1340 | 1353 | # with valid system types. |
1341 | # -solaris* is a basic system type, with this one exception. | |
1342 | -auroraux) | |
1343 | os=-auroraux | |
1344 | ;; | |
1345 | -solaris1 | -solaris1.*) | |
1346 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
1347 | ;; | |
1348 | -solaris) | |
1349 | os=-solaris2 | |
1350 | ;; | |
1351 | -unixware*) | |
1352 | os=-sysv4.2uw | |
1353 | ;; | |
1354 | -gnu/linux*) | |
1355 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
1354 | # solaris* is a basic system type, with this one exception. | |
1355 | auroraux) | |
1356 | os=auroraux | |
1357 | ;; | |
1358 | bluegene*) | |
1359 | os=cnk | |
1360 | ;; | |
1361 | solaris1 | solaris1.*) | |
1362 | os=`echo "$os" | sed -e 's|solaris1|sunos4|'` | |
1363 | ;; | |
1364 | solaris) | |
1365 | os=solaris2 | |
1366 | ;; | |
1367 | unixware*) | |
1368 | os=sysv4.2uw | |
1356 | 1369 | ;; |
1357 | 1370 | # es1800 is here to avoid being matched by es* (a different OS) |
1358 | -es1800*) | |
1359 | os=-ose | |
1360 | ;; | |
1361 | # Now accept the basic system types. | |
1362 | # The portable systems comes first. | |
1363 | # Each alternative MUST end in a * to match a version number. | |
1364 | # -sysv* is not here because it comes later, after sysvr4. | |
1365 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | |
1366 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | |
1367 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | |
1368 | | -sym* | -kopensolaris* | -plan9* \ | |
1369 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | |
1370 | | -aos* | -aros* | -cloudabi* | -sortix* \ | |
1371 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | |
1372 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
1373 | | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | |
1374 | | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | |
1375 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | |
1376 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | |
1377 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | |
1378 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | |
1379 | | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | |
1380 | | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | |
1381 | | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | |
1382 | | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | |
1383 | | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | |
1384 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | |
1385 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | |
1386 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | |
1387 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | |
1388 | | -morphos* | -superux* | -rtmk* | -windiss* \ | |
1389 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | |
1390 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | |
1391 | | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ | |
1392 | | -midnightbsd*) | |
1393 | # Remember, each alternative MUST END IN *, to match a version number. | |
1394 | ;; | |
1395 | -qnx*) | |
1396 | case $basic_machine in | |
1397 | x86-* | i*86-*) | |
1398 | ;; | |
1399 | *) | |
1400 | os=-nto$os | |
1401 | ;; | |
1402 | esac | |
1403 | ;; | |
1404 | -nto-qnx*) | |
1405 | ;; | |
1406 | -nto*) | |
1407 | os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
1408 | ;; | |
1409 | -sim | -xray | -os68k* | -v88r* \ | |
1410 | | -windows* | -osx | -abug | -netware* | -os9* \ | |
1411 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | |
1412 | ;; | |
1413 | -mac*) | |
1371 | es1800*) | |
1372 | os=ose | |
1373 | ;; | |
1374 | # Some version numbers need modification | |
1375 | chorusos*) | |
1376 | os=chorusos | |
1377 | ;; | |
1378 | isc) | |
1379 | os=isc2.2 | |
1380 | ;; | |
1381 | sco6) | |
1382 | os=sco5v6 | |
1383 | ;; | |
1384 | sco5) | |
1385 | os=sco3.2v5 | |
1386 | ;; | |
1387 | sco4) | |
1388 | os=sco3.2v4 | |
1389 | ;; | |
1390 | sco3.2.[4-9]*) | |
1391 | os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` | |
1392 | ;; | |
1393 | sco*v* | scout) | |
1394 | # Don't match below | |
1395 | ;; | |
1396 | sco*) | |
1397 | os=sco3.2v2 | |
1398 | ;; | |
1399 | psos*) | |
1400 | os=psos | |
1401 | ;; | |
1402 | qnx*) | |
1403 | os=qnx | |
1404 | ;; | |
1405 | hiux*) | |
1406 | os=hiuxwe2 | |
1407 | ;; | |
1408 | lynx*178) | |
1409 | os=lynxos178 | |
1410 | ;; | |
1411 | lynx*5) | |
1412 | os=lynxos5 | |
1413 | ;; | |
1414 | lynxos*) | |
1415 | # don't get caught up in next wildcard | |
1416 | ;; | |
1417 | lynx*) | |
1418 | os=lynxos | |
1419 | ;; | |
1420 | mac[0-9]*) | |
1414 | 1421 | os=`echo "$os" | sed -e 's|mac|macos|'` |
1415 | 1422 | ;; |
1416 | -linux-dietlibc) | |
1417 | os=-linux-dietlibc | |
1418 | ;; | |
1419 | -linux*) | |
1420 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
1421 | ;; | |
1422 | -sunos5*) | |
1423 | opened*) | |
1424 | os=openedition | |
1425 | ;; | |
1426 | os400*) | |
1427 | os=os400 | |
1428 | ;; | |
1429 | sunos5*) | |
1423 | 1430 | os=`echo "$os" | sed -e 's|sunos5|solaris2|'` |
1424 | 1431 | ;; |
1425 | -sunos6*) | |
1432 | sunos6*) | |
1426 | 1433 | os=`echo "$os" | sed -e 's|sunos6|solaris3|'` |
1427 | 1434 | ;; |
1428 | -opened*) | |
1429 | os=-openedition | |
1430 | ;; | |
1431 | -os400*) | |
1432 | os=-os400 | |
1433 | ;; | |
1434 | -wince*) | |
1435 | os=-wince | |
1436 | ;; | |
1437 | -utek*) | |
1438 | os=-bsd | |
1439 | ;; | |
1440 | -dynix*) | |
1441 | os=-bsd | |
1442 | ;; | |
1443 | -acis*) | |
1444 | os=-aos | |
1445 | ;; | |
1446 | -atheos*) | |
1447 | os=-atheos | |
1448 | ;; | |
1449 | -syllable*) | |
1450 | os=-syllable | |
1451 | ;; | |
1452 | -386bsd) | |
1453 | os=-bsd | |
1454 | ;; | |
1455 | -ctix* | -uts*) | |
1456 | os=-sysv | |
1457 | ;; | |
1458 | -nova*) | |
1459 | os=-rtmk-nova | |
1460 | ;; | |
1461 | -ns2) | |
1462 | os=-nextstep2 | |
1463 | ;; | |
1464 | -nsk*) | |
1465 | os=-nsk | |
1435 | wince*) | |
1436 | os=wince | |
1437 | ;; | |
1438 | utek*) | |
1439 | os=bsd | |
1440 | ;; | |
1441 | dynix*) | |
1442 | os=bsd | |
1443 | ;; | |
1444 | acis*) | |
1445 | os=aos | |
1446 | ;; | |
1447 | atheos*) | |
1448 | os=atheos | |
1449 | ;; | |
1450 | syllable*) | |
1451 | os=syllable | |
1452 | ;; | |
1453 | 386bsd) | |
1454 | os=bsd | |
1455 | ;; | |
1456 | ctix* | uts*) | |
1457 | os=sysv | |
1458 | ;; | |
1459 | nova*) | |
1460 | os=rtmk-nova | |
1461 | ;; | |
1462 | ns2) | |
1463 | os=nextstep2 | |
1466 | 1464 | ;; |
1467 | 1465 | # Preserve the version number of sinix5. |
1468 | -sinix5.*) | |
1469 | os=`echo $os | sed -e 's|sinix|sysv|'` | |
1470 | ;; | |
1471 | -sinix*) | |
1472 | os=-sysv4 | |
1473 | ;; | |
1474 | -tpf*) | |
1475 | os=-tpf | |
1476 | ;; | |
1477 | -triton*) | |
1478 | os=-sysv3 | |
1479 | ;; | |
1480 | -oss*) | |
1481 | os=-sysv3 | |
1482 | ;; | |
1483 | -svr4*) | |
1484 | os=-sysv4 | |
1485 | ;; | |
1486 | -svr3) | |
1487 | os=-sysv3 | |
1488 | ;; | |
1489 | -sysvr4) | |
1490 | os=-sysv4 | |
1491 | ;; | |
1492 | # This must come after -sysvr4. | |
1493 | -sysv*) | |
1494 | ;; | |
1495 | -ose*) | |
1496 | os=-ose | |
1497 | ;; | |
1498 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1499 | os=-mint | |
1500 | ;; | |
1501 | -zvmoe) | |
1502 | os=-zvmoe | |
1503 | ;; | |
1504 | -dicos*) | |
1505 | os=-dicos | |
1506 | ;; | |
1507 | -pikeos*) | |
1466 | sinix5.*) | |
1467 | os=`echo "$os" | sed -e 's|sinix|sysv|'` | |
1468 | ;; | |
1469 | sinix*) | |
1470 | os=sysv4 | |
1471 | ;; | |
1472 | tpf*) | |
1473 | os=tpf | |
1474 | ;; | |
1475 | triton*) | |
1476 | os=sysv3 | |
1477 | ;; | |
1478 | oss*) | |
1479 | os=sysv3 | |
1480 | ;; | |
1481 | svr4*) | |
1482 | os=sysv4 | |
1483 | ;; | |
1484 | svr3) | |
1485 | os=sysv3 | |
1486 | ;; | |
1487 | sysvr4) | |
1488 | os=sysv4 | |
1489 | ;; | |
1490 | ose*) | |
1491 | os=ose | |
1492 | ;; | |
1493 | *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
1494 | os=mint | |
1495 | ;; | |
1496 | dicos*) | |
1497 | os=dicos | |
1498 | ;; | |
1499 | pikeos*) | |
1508 | 1500 | # Until real need of OS specific support for |
1509 | 1501 | # particular features comes up, bare metal |
1510 | 1502 | # configurations are quite functional. |
1511 | case $basic_machine in | |
1503 | case $cpu in | |
1512 | 1504 | arm*) |
1513 | os=-eabi | |
1505 | os=eabi | |
1514 | 1506 | ;; |
1515 | 1507 | *) |
1516 | os=-elf | |
1508 | os=elf | |
1517 | 1509 | ;; |
1518 | 1510 | esac |
1519 | 1511 | ;; |
1520 | -nacl*) | |
1521 | ;; | |
1522 | -ios) | |
1523 | ;; | |
1524 | -none) | |
1525 | ;; | |
1526 | 1512 | *) |
1527 | # Get rid of the `-' at the beginning of $os. | |
1528 | os=`echo $os | sed 's/[^-]*-//'` | |
1529 | echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 | |
1530 | exit 1 | |
1513 | # No normalization, but not necessarily accepted, that comes below. | |
1531 | 1514 | ;; |
1532 | 1515 | esac |
1516 | ||
1533 | 1517 | else |
1534 | 1518 | |
1535 | 1519 | # Here we handle the default operating systems that come with various machines. |
1542 | 1526 | # will signal an error saying that MANUFACTURER isn't an operating |
1543 | 1527 | # system, and we'll never get to this point. |
1544 | 1528 | |
1545 | case $basic_machine in | |
1529 | kernel= | |
1530 | case $cpu-$vendor in | |
1546 | 1531 | score-*) |
1547 | os=-elf | |
1532 | os=elf | |
1548 | 1533 | ;; |
1549 | 1534 | spu-*) |
1550 | os=-elf | |
1535 | os=elf | |
1551 | 1536 | ;; |
1552 | 1537 | *-acorn) |
1553 | os=-riscix1.2 | |
1538 | os=riscix1.2 | |
1554 | 1539 | ;; |
1555 | 1540 | arm*-rebel) |
1556 | os=-linux | |
1541 | kernel=linux | |
1542 | os=gnu | |
1557 | 1543 | ;; |
1558 | 1544 | arm*-semi) |
1559 | os=-aout | |
1545 | os=aout | |
1560 | 1546 | ;; |
1561 | 1547 | c4x-* | tic4x-*) |
1562 | os=-coff | |
1548 | os=coff | |
1563 | 1549 | ;; |
1564 | 1550 | c8051-*) |
1565 | os=-elf | |
1551 | os=elf | |
1552 | ;; | |
1553 | clipper-intergraph) | |
1554 | os=clix | |
1566 | 1555 | ;; |
1567 | 1556 | hexagon-*) |
1568 | os=-elf | |
1557 | os=elf | |
1569 | 1558 | ;; |
1570 | 1559 | tic54x-*) |
1571 | os=-coff | |
1560 | os=coff | |
1572 | 1561 | ;; |
1573 | 1562 | tic55x-*) |
1574 | os=-coff | |
1563 | os=coff | |
1575 | 1564 | ;; |
1576 | 1565 | tic6x-*) |
1577 | os=-coff | |
1566 | os=coff | |
1578 | 1567 | ;; |
1579 | 1568 | # This must come before the *-dec entry. |
1580 | 1569 | pdp10-*) |
1581 | os=-tops20 | |
1570 | os=tops20 | |
1582 | 1571 | ;; |
1583 | 1572 | pdp11-*) |
1584 | os=-none | |
1573 | os=none | |
1585 | 1574 | ;; |
1586 | 1575 | *-dec | vax-*) |
1587 | os=-ultrix4.2 | |
1576 | os=ultrix4.2 | |
1588 | 1577 | ;; |
1589 | 1578 | m68*-apollo) |
1590 | os=-domain | |
1579 | os=domain | |
1591 | 1580 | ;; |
1592 | 1581 | i386-sun) |
1593 | os=-sunos4.0.2 | |
1582 | os=sunos4.0.2 | |
1594 | 1583 | ;; |
1595 | 1584 | m68000-sun) |
1596 | os=-sunos3 | |
1585 | os=sunos3 | |
1597 | 1586 | ;; |
1598 | 1587 | m68*-cisco) |
1599 | os=-aout | |
1588 | os=aout | |
1600 | 1589 | ;; |
1601 | 1590 | mep-*) |
1602 | os=-elf | |
1591 | os=elf | |
1603 | 1592 | ;; |
1604 | 1593 | mips*-cisco) |
1605 | os=-elf | |
1594 | os=elf | |
1606 | 1595 | ;; |
1607 | 1596 | mips*-*) |
1608 | os=-elf | |
1597 | os=elf | |
1609 | 1598 | ;; |
1610 | 1599 | or32-*) |
1611 | os=-coff | |
1600 | os=coff | |
1612 | 1601 | ;; |
1613 | 1602 | *-tti) # must be before sparc entry or we get the wrong os. |
1614 | os=-sysv3 | |
1603 | os=sysv3 | |
1615 | 1604 | ;; |
1616 | 1605 | sparc-* | *-sun) |
1617 | os=-sunos4.1.1 | |
1606 | os=sunos4.1.1 | |
1618 | 1607 | ;; |
1619 | 1608 | pru-*) |
1620 | os=-elf | |
1609 | os=elf | |
1621 | 1610 | ;; |
1622 | 1611 | *-be) |
1623 | os=-beos | |
1612 | os=beos | |
1624 | 1613 | ;; |
1625 | 1614 | *-ibm) |
1626 | os=-aix | |
1615 | os=aix | |
1627 | 1616 | ;; |
1628 | 1617 | *-knuth) |
1629 | os=-mmixware | |
1618 | os=mmixware | |
1630 | 1619 | ;; |
1631 | 1620 | *-wec) |
1632 | os=-proelf | |
1621 | os=proelf | |
1633 | 1622 | ;; |
1634 | 1623 | *-winbond) |
1635 | os=-proelf | |
1624 | os=proelf | |
1636 | 1625 | ;; |
1637 | 1626 | *-oki) |
1638 | os=-proelf | |
1627 | os=proelf | |
1639 | 1628 | ;; |
1640 | 1629 | *-hp) |
1641 | os=-hpux | |
1630 | os=hpux | |
1642 | 1631 | ;; |
1643 | 1632 | *-hitachi) |
1644 | os=-hiux | |
1633 | os=hiux | |
1645 | 1634 | ;; |
1646 | 1635 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
1647 | os=-sysv | |
1636 | os=sysv | |
1648 | 1637 | ;; |
1649 | 1638 | *-cbm) |
1650 | os=-amigaos | |
1639 | os=amigaos | |
1651 | 1640 | ;; |
1652 | 1641 | *-dg) |
1653 | os=-dgux | |
1642 | os=dgux | |
1654 | 1643 | ;; |
1655 | 1644 | *-dolphin) |
1656 | os=-sysv3 | |
1645 | os=sysv3 | |
1657 | 1646 | ;; |
1658 | 1647 | m68k-ccur) |
1659 | os=-rtu | |
1648 | os=rtu | |
1660 | 1649 | ;; |
1661 | 1650 | m88k-omron*) |
1662 | os=-luna | |
1651 | os=luna | |
1663 | 1652 | ;; |
1664 | 1653 | *-next) |
1665 | os=-nextstep | |
1654 | os=nextstep | |
1666 | 1655 | ;; |
1667 | 1656 | *-sequent) |
1668 | os=-ptx | |
1657 | os=ptx | |
1669 | 1658 | ;; |
1670 | 1659 | *-crds) |
1671 | os=-unos | |
1660 | os=unos | |
1672 | 1661 | ;; |
1673 | 1662 | *-ns) |
1674 | os=-genix | |
1663 | os=genix | |
1675 | 1664 | ;; |
1676 | 1665 | i370-*) |
1677 | os=-mvs | |
1666 | os=mvs | |
1678 | 1667 | ;; |
1679 | 1668 | *-gould) |
1680 | os=-sysv | |
1669 | os=sysv | |
1681 | 1670 | ;; |
1682 | 1671 | *-highlevel) |
1683 | os=-bsd | |
1672 | os=bsd | |
1684 | 1673 | ;; |
1685 | 1674 | *-encore) |
1686 | os=-bsd | |
1675 | os=bsd | |
1687 | 1676 | ;; |
1688 | 1677 | *-sgi) |
1689 | os=-irix | |
1678 | os=irix | |
1690 | 1679 | ;; |
1691 | 1680 | *-siemens) |
1692 | os=-sysv4 | |
1681 | os=sysv4 | |
1693 | 1682 | ;; |
1694 | 1683 | *-masscomp) |
1695 | os=-rtu | |
1684 | os=rtu | |
1696 | 1685 | ;; |
1697 | 1686 | f30[01]-fujitsu | f700-fujitsu) |
1698 | os=-uxpv | |
1687 | os=uxpv | |
1699 | 1688 | ;; |
1700 | 1689 | *-rom68k) |
1701 | os=-coff | |
1690 | os=coff | |
1702 | 1691 | ;; |
1703 | 1692 | *-*bug) |
1704 | os=-coff | |
1693 | os=coff | |
1705 | 1694 | ;; |
1706 | 1695 | *-apple) |
1707 | os=-macos | |
1696 | os=macos | |
1708 | 1697 | ;; |
1709 | 1698 | *-atari*) |
1710 | os=-mint | |
1699 | os=mint | |
1700 | ;; | |
1701 | *-wrs) | |
1702 | os=vxworks | |
1711 | 1703 | ;; |
1712 | 1704 | *) |
1713 | os=-none | |
1705 | os=none | |
1714 | 1706 | ;; |
1715 | 1707 | esac |
1708 | ||
1716 | 1709 | fi |
1710 | ||
1711 | # Now, validate our (potentially fixed-up) OS. | |
1712 | case $os in | |
1713 | # Sometimes we do "kernel-libc", so those need to count as OSes. | |
1714 | musl* | newlib* | relibc* | uclibc*) | |
1715 | ;; | |
1716 | # Likewise for "kernel-abi" | |
1717 | eabi* | gnueabi*) | |
1718 | ;; | |
1719 | # VxWorks passes extra cpu info in the 4th filed. | |
1720 | simlinux | simwindows | spe) | |
1721 | ;; | |
1722 | # Now accept the basic system types. | |
1723 | # The portable systems comes first. | |
1724 | # Each alternative MUST end in a * to match a version number. | |
1725 | gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ | |
1726 | | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ | |
1727 | | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | |
1728 | | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | |
1729 | | hiux* | abug | nacl* | netware* | windows* \ | |
1730 | | os9* | macos* | osx* | ios* \ | |
1731 | | mpw* | magic* | mmixware* | mon960* | lnews* \ | |
1732 | | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | |
1733 | | aos* | aros* | cloudabi* | sortix* | twizzler* \ | |
1734 | | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | |
1735 | | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | |
1736 | | mirbsd* | netbsd* | dicos* | openedition* | ose* \ | |
1737 | | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | |
1738 | | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ | |
1739 | | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | |
1740 | | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | |
1741 | | udi* | lites* | ieee* | go32* | aux* | hcos* \ | |
1742 | | chorusrdb* | cegcc* | glidix* | serenity* \ | |
1743 | | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | |
1744 | | midipix* | mingw32* | mingw64* | mint* \ | |
1745 | | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | |
1746 | | interix* | uwin* | mks* | rhapsody* | darwin* \ | |
1747 | | openstep* | oskit* | conix* | pw32* | nonstopux* \ | |
1748 | | storm-chaos* | tops10* | tenex* | tops20* | its* \ | |
1749 | | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ | |
1750 | | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ | |
1751 | | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | |
1752 | | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | |
1753 | | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | |
1754 | | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | |
1755 | | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ | |
1756 | | fiwix* ) | |
1757 | ;; | |
1758 | # This one is extra strict with allowed versions | |
1759 | sco3.2v2 | sco3.2v[4-9]* | sco5v6*) | |
1760 | # Don't forget version if it is 3.2v4 or newer. | |
1761 | ;; | |
1762 | none) | |
1763 | ;; | |
1764 | *) | |
1765 | echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 | |
1766 | exit 1 | |
1767 | ;; | |
1768 | esac | |
1769 | ||
1770 | # As a final step for OS-related things, validate the OS-kernel combination | |
1771 | # (given a valid OS), if there is a kernel. | |
1772 | case $kernel-$os in | |
1773 | linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ | |
1774 | | linux-musl* | linux-relibc* | linux-uclibc* ) | |
1775 | ;; | |
1776 | uclinux-uclibc* ) | |
1777 | ;; | |
1778 | -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) | |
1779 | # These are just libc implementations, not actual OSes, and thus | |
1780 | # require a kernel. | |
1781 | echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 | |
1782 | exit 1 | |
1783 | ;; | |
1784 | kfreebsd*-gnu* | kopensolaris*-gnu*) | |
1785 | ;; | |
1786 | vxworks-simlinux | vxworks-simwindows | vxworks-spe) | |
1787 | ;; | |
1788 | nto-qnx*) | |
1789 | ;; | |
1790 | os2-emx) | |
1791 | ;; | |
1792 | *-eabi* | *-gnueabi*) | |
1793 | ;; | |
1794 | -*) | |
1795 | # Blank kernel with real OS is always fine. | |
1796 | ;; | |
1797 | *-*) | |
1798 | echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 | |
1799 | exit 1 | |
1800 | ;; | |
1801 | esac | |
1717 | 1802 | |
1718 | 1803 | # Here we handle the case where we know the os, and the CPU type, but not the |
1719 | 1804 | # manufacturer. We pick the logical manufacturer. |
1720 | vendor=unknown | |
1721 | case $basic_machine in | |
1722 | *-unknown) | |
1723 | case $os in | |
1724 | -riscix*) | |
1805 | case $vendor in | |
1806 | unknown) | |
1807 | case $cpu-$os in | |
1808 | *-riscix*) | |
1725 | 1809 | vendor=acorn |
1726 | 1810 | ;; |
1727 | -sunos*) | |
1811 | *-sunos*) | |
1728 | 1812 | vendor=sun |
1729 | 1813 | ;; |
1730 | -cnk*|-aix*) | |
1814 | *-cnk* | *-aix*) | |
1731 | 1815 | vendor=ibm |
1732 | 1816 | ;; |
1733 | -beos*) | |
1817 | *-beos*) | |
1734 | 1818 | vendor=be |
1735 | 1819 | ;; |
1736 | -hpux*) | |
1820 | *-hpux*) | |
1737 | 1821 | vendor=hp |
1738 | 1822 | ;; |
1739 | -mpeix*) | |
1823 | *-mpeix*) | |
1740 | 1824 | vendor=hp |
1741 | 1825 | ;; |
1742 | -hiux*) | |
1826 | *-hiux*) | |
1743 | 1827 | vendor=hitachi |
1744 | 1828 | ;; |
1745 | -unos*) | |
1829 | *-unos*) | |
1746 | 1830 | vendor=crds |
1747 | 1831 | ;; |
1748 | -dgux*) | |
1832 | *-dgux*) | |
1749 | 1833 | vendor=dg |
1750 | 1834 | ;; |
1751 | -luna*) | |
1835 | *-luna*) | |
1752 | 1836 | vendor=omron |
1753 | 1837 | ;; |
1754 | -genix*) | |
1838 | *-genix*) | |
1755 | 1839 | vendor=ns |
1756 | 1840 | ;; |
1757 | -mvs* | -opened*) | |
1841 | *-clix*) | |
1842 | vendor=intergraph | |
1843 | ;; | |
1844 | *-mvs* | *-opened*) | |
1758 | 1845 | vendor=ibm |
1759 | 1846 | ;; |
1760 | -os400*) | |
1847 | *-os400*) | |
1761 | 1848 | vendor=ibm |
1762 | 1849 | ;; |
1763 | -ptx*) | |
1850 | s390-* | s390x-*) | |
1851 | vendor=ibm | |
1852 | ;; | |
1853 | *-ptx*) | |
1764 | 1854 | vendor=sequent |
1765 | 1855 | ;; |
1766 | -tpf*) | |
1856 | *-tpf*) | |
1767 | 1857 | vendor=ibm |
1768 | 1858 | ;; |
1769 | -vxsim* | -vxworks* | -windiss*) | |
1859 | *-vxsim* | *-vxworks* | *-windiss*) | |
1770 | 1860 | vendor=wrs |
1771 | 1861 | ;; |
1772 | -aux*) | |
1862 | *-aux*) | |
1773 | 1863 | vendor=apple |
1774 | 1864 | ;; |
1775 | -hms*) | |
1865 | *-hms*) | |
1776 | 1866 | vendor=hitachi |
1777 | 1867 | ;; |
1778 | -mpw* | -macos*) | |
1868 | *-mpw* | *-macos*) | |
1779 | 1869 | vendor=apple |
1780 | 1870 | ;; |
1781 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1871 | *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) | |
1782 | 1872 | vendor=atari |
1783 | 1873 | ;; |
1784 | -vos*) | |
1874 | *-vos*) | |
1785 | 1875 | vendor=stratus |
1786 | 1876 | ;; |
1787 | 1877 | esac |
1788 | basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` | |
1789 | 1878 | ;; |
1790 | 1879 | esac |
1791 | 1880 | |
1792 | echo "$basic_machine$os" | |
1881 | echo "$cpu-$vendor-${kernel:+$kernel-}$os" | |
1793 | 1882 | exit |
1794 | 1883 | |
1795 | 1884 | # Local variables: |
1796 | # eval: (add-hook 'write-file-functions 'time-stamp) | |
1885 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1797 | 1886 | # time-stamp-start: "timestamp='" |
1798 | 1887 | # time-stamp-format: "%:y-%02m-%02d" |
1799 | 1888 | # time-stamp-end: "'" |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.71 for isoquery 3.2.6. | |
2 | # Generated by GNU Autoconf 2.71 for isoquery 3.2.7. | |
3 | 3 | # |
4 | 4 | # |
5 | 5 | # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, |
607 | 607 | # Identity of this package. |
608 | 608 | PACKAGE_NAME='isoquery' |
609 | 609 | PACKAGE_TARNAME='isoquery' |
610 | PACKAGE_VERSION='3.2.6' | |
611 | PACKAGE_STRING='isoquery 3.2.6' | |
610 | PACKAGE_VERSION='3.2.7' | |
611 | PACKAGE_STRING='isoquery 3.2.7' | |
612 | 612 | PACKAGE_BUGREPORT='' |
613 | 613 | PACKAGE_URL='' |
614 | 614 | |
1329 | 1329 | # Omit some internal or obsolete options to make the list less imposing. |
1330 | 1330 | # This message is too long to be a string in the A/UX 3.1 sh. |
1331 | 1331 | cat <<_ACEOF |
1332 | \`configure' configures isoquery 3.2.6 to adapt to many kinds of systems. | |
1332 | \`configure' configures isoquery 3.2.7 to adapt to many kinds of systems. | |
1333 | 1333 | |
1334 | 1334 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1335 | 1335 | |
1400 | 1400 | |
1401 | 1401 | if test -n "$ac_init_help"; then |
1402 | 1402 | case $ac_init_help in |
1403 | short | recursive ) echo "Configuration of isoquery 3.2.6:";; | |
1403 | short | recursive ) echo "Configuration of isoquery 3.2.7:";; | |
1404 | 1404 | esac |
1405 | 1405 | cat <<\_ACEOF |
1406 | 1406 | |
1519 | 1519 | test -n "$ac_init_help" && exit $ac_status |
1520 | 1520 | if $ac_init_version; then |
1521 | 1521 | cat <<\_ACEOF |
1522 | isoquery configure 3.2.6 | |
1522 | isoquery configure 3.2.7 | |
1523 | 1523 | generated by GNU Autoconf 2.71 |
1524 | 1524 | |
1525 | 1525 | Copyright (C) 2021 Free Software Foundation, Inc. |
1723 | 1723 | This file contains any messages produced by compilers while |
1724 | 1724 | running configure, to aid debugging if configure makes a mistake. |
1725 | 1725 | |
1726 | It was created by isoquery $as_me 3.2.6, which was | |
1726 | It was created by isoquery $as_me 3.2.7, which was | |
1727 | 1727 | generated by GNU Autoconf 2.71. Invocation command line was |
1728 | 1728 | |
1729 | 1729 | $ $0$ac_configure_args_raw |
2992 | 2992 | |
2993 | 2993 | # Define the identity of the package. |
2994 | 2994 | PACKAGE='isoquery' |
2995 | VERSION='3.2.6' | |
2995 | VERSION='3.2.7' | |
2996 | 2996 | |
2997 | 2997 | |
2998 | 2998 | printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h |
7307 | 7307 | fi |
7308 | 7308 | |
7309 | 7309 | |
7310 | if test x"$RST2MAN" == x"no" ; then | |
7310 | if test x"$RST2MAN" = x"no" ; then | |
7311 | 7311 | as_fn_error $? "rst2man is required." "$LINENO" 5 |
7312 | 7312 | fi |
7313 | 7313 | # Extract the first word of "po4a-translate", so it can be a program name with args. |
7356 | 7356 | fi |
7357 | 7357 | |
7358 | 7358 | |
7359 | if test x"$PO4A_TRANSLATE" == x"no" ; then | |
7359 | if test x"$PO4A_TRANSLATE" = x"no" ; then | |
7360 | 7360 | as_fn_error $? "po4a-translate is required." "$LINENO" 5 |
7361 | 7361 | fi |
7362 | 7362 | # Extract the first word of "po4a-gettextize", so it can be a program name with args. |
7405 | 7405 | fi |
7406 | 7406 | |
7407 | 7407 | |
7408 | if test x"$PO4A_GETTEXTIZE" == x"no" ; then | |
7408 | if test x"$PO4A_GETTEXTIZE" = x"no" ; then | |
7409 | 7409 | as_fn_error $? "po4a-gettextize is required." "$LINENO" 5 |
7410 | 7410 | fi |
7411 | 7411 | |
7984 | 7984 | # report actual input values of CONFIG_FILES etc. instead of their |
7985 | 7985 | # values after options handling. |
7986 | 7986 | ac_log=" |
7987 | This file was extended by isoquery $as_me 3.2.6, which was | |
7987 | This file was extended by isoquery $as_me 3.2.7, which was | |
7988 | 7988 | generated by GNU Autoconf 2.71. Invocation command line was |
7989 | 7989 | |
7990 | 7990 | CONFIG_FILES = $CONFIG_FILES |
8043 | 8043 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
8044 | 8044 | ac_cs_config='$ac_cs_config_escaped' |
8045 | 8045 | ac_cs_version="\\ |
8046 | isoquery config.status 3.2.6 | |
8046 | isoquery config.status 3.2.7 | |
8047 | 8047 | configured by $0, generated by GNU Autoconf 2.71, |
8048 | 8048 | with options \\"\$ac_cs_config\\" |
8049 | 8049 |
12 | 12 | # You should have received a copy of the GNU General Public License |
13 | 13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
14 | 14 | |
15 | AC_INIT([isoquery],[3.2.6]) | |
15 | AC_INIT([isoquery],[3.2.7]) | |
16 | 16 | |
17 | 17 | AC_CONFIG_AUX_DIR([build]) |
18 | 18 | AC_CONFIG_MACRO_DIR([build/m4]) |
40 | 40 | |
41 | 41 | # Detect some programs needed for building |
42 | 42 | AC_PATH_PROG([RST2MAN], [rst2man], [no]) |
43 | if test x"$RST2MAN" == x"no" ; then | |
43 | if test x"$RST2MAN" = x"no" ; then | |
44 | 44 | AC_MSG_ERROR([rst2man is required.]) |
45 | 45 | fi |
46 | 46 | AC_PATH_PROG([PO4A_TRANSLATE], [po4a-translate], [no]) |
47 | if test x"$PO4A_TRANSLATE" == x"no" ; then | |
47 | if test x"$PO4A_TRANSLATE" = x"no" ; then | |
48 | 48 | AC_MSG_ERROR([po4a-translate is required.]) |
49 | 49 | fi |
50 | 50 | AC_PATH_PROG([PO4A_GETTEXTIZE], [po4a-gettextize], [no]) |
51 | if test x"$PO4A_GETTEXTIZE" == x"no" ; then | |
51 | if test x"$PO4A_GETTEXTIZE" = x"no" ; then | |
52 | 52 | AC_MSG_ERROR([po4a-gettextize is required.]) |
53 | 53 | fi |
54 | 54 |
5 | 5 | msgid "" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: isoquery\n" |
8 | "POT-Creation-Date: 2021-11-15 11:55+0100\n" | |
9 | "PO-Revision-Date: 2021-11-15 11:57+0100\n" | |
8 | "POT-Creation-Date: 2022-02-19 19:51+0100\n" | |
9 | "PO-Revision-Date: 2022-02-19 19:51+0100\n" | |
10 | 10 | "Last-Translator: Dr. Tobias Quathamer <toddy@debian.org>\n" |
11 | 11 | "Language-Team: German <debian-l10n-german@lists.debian.org>\n" |
12 | 12 | "Language: de\n" |
34 | 34 | #. type: Plain text |
35 | 35 | #, no-wrap |
36 | 36 | msgid "" |
37 | ":Date: 2021-11-15\n" | |
38 | ":Version: 3.2.6\n" | |
37 | ":Date: 2022-02-19\n" | |
38 | ":Version: 3.2.7\n" | |
39 | 39 | ":Manual section: 1\n" |
40 | 40 | msgstr "" |
41 | ":Date: 15\\. November 2021\n" | |
42 | ":Version: 3.2.6\n" | |
41 | ":Date: 19\\. Februar 2022\n" | |
42 | ":Version: 3.2.7\n" | |
43 | 43 | ":Manual section: 1\n" |
44 | 44 | |
45 | 45 | #. type: Title = |
7 | 7 | msgid "" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: isoquery\n" |
10 | "POT-Creation-Date: 2021-11-15 11:55+0100\n" | |
11 | "PO-Revision-Date: 2020-12-27 16:27+0100\n" | |
10 | "POT-Creation-Date: 2022-02-19 19:51+0100\n" | |
11 | "PO-Revision-Date: 2022-02-19 19:51+0100\n" | |
12 | 12 | "Last-Translator: Baptiste Jammet <baptiste@mailoo.org>\n" |
13 | 13 | "Language-Team: French <debian-l10n-french@lists.debian.org>\n" |
14 | 14 | "Language: fr\n" |
36 | 36 | #. type: Plain text |
37 | 37 | #, no-wrap |
38 | 38 | msgid "" |
39 | ":Date: 2021-11-15\n" | |
40 | ":Version: 3.2.6\n" | |
39 | ":Date: 2022-02-19\n" | |
40 | ":Version: 3.2.7\n" | |
41 | 41 | ":Manual section: 1\n" |
42 | 42 | msgstr "" |
43 | ":Date: 15 novembre 2021\n" | |
44 | ":Version: 3.2.6\n" | |
43 | ":Date: 19 février 2022\n" | |
44 | ":Version: 3.2.7\n" | |
45 | 45 | ":Manual section: 1\n" |
46 | 46 | |
47 | 47 | #. type: Title = |
6 | 6 | msgid "" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: PACKAGE VERSION\n" |
9 | "POT-Creation-Date: 2021-11-15 11:55+0100\n" | |
9 | "POT-Creation-Date: 2022-02-19 19:51+0100\n" | |
10 | 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
11 | 11 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
12 | 12 | "Language-Team: LANGUAGE <LL@li.org>\n" |
33 | 33 | #. type: Plain text |
34 | 34 | #, markdown-text, no-wrap |
35 | 35 | msgid "" |
36 | ":Date: 2021-11-15\n" | |
37 | ":Version: 3.2.6\n" | |
36 | ":Date: 2022-02-19\n" | |
37 | ":Version: 3.2.7\n" | |
38 | 38 | ":Manual section: 1\n" |
39 | 39 | msgstr "" |
40 | 40 |
4 | 4 | Search and display various ISO codes (country, language, ...) |
5 | 5 | ------------------------------------------------------------- |
6 | 6 | |
7 | :Date: 2021-11-15 | |
8 | :Version: 3.2.6 | |
7 | :Date: 2022-02-19 | |
8 | :Version: 3.2.7 | |
9 | 9 | :Manual section: 1 |
10 | 10 | |
11 | 11 |
5 | 5 | msgid "" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: isoquery\n" |
8 | "POT-Creation-Date: 2021-11-15 11:55+0100\n" | |
9 | "PO-Revision-Date: 2020-12-27 16:33+0100\n" | |
8 | "POT-Creation-Date: 2022-02-19 19:51+0100\n" | |
9 | "PO-Revision-Date: 2022-02-19 19:51+0100\n" | |
10 | 10 | "Last-Translator: Sebastiano Pistore <SebastianoPistore.info@protonmail.ch>\n" |
11 | 11 | "Language-Team: \n" |
12 | 12 | "Language: it\n" |
34 | 34 | #. type: Plain text |
35 | 35 | #, no-wrap |
36 | 36 | msgid "" |
37 | ":Date: 2021-11-15\n" | |
38 | ":Version: 3.2.6\n" | |
37 | ":Date: 2022-02-19\n" | |
38 | ":Version: 3.2.7\n" | |
39 | 39 | ":Manual section: 1\n" |
40 | 40 | msgstr "" |
41 | ":Date: 15-11-2021\n" | |
42 | ":Version: 3.2.6\n" | |
41 | ":Date: 19-02-2022\n" | |
42 | ":Version: 3.2.7\n" | |
43 | 43 | ":Manual section: 1\n" |
44 | 44 | |
45 | 45 | #. type: Title = |
439 | 439 | "By default, the JSON files provided by the **iso-codes** package will be " |
440 | 440 | "used." |
441 | 441 | msgstr "" |
442 | "Di default verranno utilizzati i file JSON forniti dal pacchetto \"iso-codes" | |
443 | "\"." | |
442 | "Di default verranno utilizzati i file JSON forniti dal pacchetto \"iso-" | |
443 | "codes\"." | |
444 | 444 | |
445 | 445 | #. type: Plain text |
446 | 446 | msgid "" |
5 | 5 | msgid "" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: isoquery\n" |
8 | "POT-Creation-Date: 2021-11-15 11:55+0100\n" | |
9 | "PO-Revision-Date: 2020-12-27 16:28+0100\n" | |
8 | "POT-Creation-Date: 2022-02-19 19:51+0100\n" | |
9 | "PO-Revision-Date: 2022-02-19 19:51+0100\n" | |
10 | 10 | "Last-Translator: Américo Monteiro <a_monteiro@gmx.com>\n" |
11 | 11 | "Language-Team: Portuguese <traduz@debianpt.org>\n" |
12 | 12 | "Language: pt\n" |
34 | 34 | #. type: Plain text |
35 | 35 | #, no-wrap |
36 | 36 | msgid "" |
37 | ":Date: 2021-11-15\n" | |
38 | ":Version: 3.2.6\n" | |
37 | ":Date: 2022-02-19\n" | |
38 | ":Version: 3.2.7\n" | |
39 | 39 | ":Manual section: 1\n" |
40 | 40 | msgstr "" |
41 | ":Date: 2021-11-15\n" | |
42 | ":Version: 3.2.6\n" | |
41 | ":Date: 2022-02-19\n" | |
42 | ":Version: 3.2.7\n" | |
43 | 43 | ":Manual section: 1\n" |
44 | 44 | |
45 | 45 | #. type: Title = |