Import upstream version 0.15.2+git20210915.1.6409945
Debian Janitor
2 years ago
0 | 0 | ACLOCAL_AMFLAGS = -I m4 |
1 | EXTRA_DIST = libass.pc.in Changelog | |
1 | EXTRA_DIST = libass.pc.in Changelog ltnasm.sh | |
2 | 2 | |
3 | 3 | pkgconfigdir = $(libdir)/pkgconfig |
4 | 4 | pkgconfig_DATA = libass.pc |
371 | 371 | top_builddir = @top_builddir@ |
372 | 372 | top_srcdir = @top_srcdir@ |
373 | 373 | ACLOCAL_AMFLAGS = -I m4 |
374 | EXTRA_DIST = libass.pc.in Changelog | |
374 | EXTRA_DIST = libass.pc.in Changelog ltnasm.sh | |
375 | 375 | pkgconfigdir = $(libdir)/pkgconfig |
376 | 376 | pkgconfig_DATA = libass.pc |
377 | 377 | @ENABLE_TEST_TRUE@test = test |
0 | 0 | #! /bin/sh |
1 | 1 | # Attempt to guess a canonical system name. |
2 | # Copyright 1992-2021 Free Software Foundation, Inc. | |
3 | ||
4 | # shellcheck disable=SC2006,SC2268 # see below for rationale | |
5 | ||
6 | timestamp='2021-06-03' | |
2 | # Copyright 1992-2018 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2018-02-24' | |
7 | 5 | |
8 | 6 | # This file is free software; you can redistribute it and/or modify it |
9 | 7 | # under the terms of the GNU General Public License as published by |
28 | 26 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
29 | 27 | # |
30 | 28 | # You can get the latest version of this script from: |
31 | # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess | |
29 | # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
32 | 30 | # |
33 | 31 | # 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. | |
42 | 32 | |
43 | 33 | |
44 | 34 | me=`echo "$0" | sed -e 's,.*/,,'` |
59 | 49 | GNU config.guess ($timestamp) |
60 | 50 | |
61 | 51 | Originally written by Per Bothner. |
62 | Copyright 1992-2021 Free Software Foundation, Inc. | |
52 | Copyright 1992-2018 Free Software Foundation, Inc. | |
63 | 53 | |
64 | 54 | This is free software; see the source for copying conditions. There is NO |
65 | 55 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
93 | 83 | exit 1 |
94 | 84 | fi |
95 | 85 | |
96 | # Just in case it came from the environment. | |
97 | GUESS= | |
86 | trap 'exit 1' 1 2 15 | |
98 | 87 | |
99 | 88 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
100 | 89 | # compiler to aid in system detection is discouraged as it requires |
106 | 95 | |
107 | 96 | # Portable tmp directory creation inspired by the Autoconf team. |
108 | 97 | |
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 | } | |
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= ;' | |
139 | 122 | |
140 | 123 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
141 | 124 | # (ghazi@noc.rutgers.edu 1994-08-24) |
142 | if test -f /.attbin/uname ; then | |
125 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | |
143 | 126 | PATH=$PATH:/.attbin ; export PATH |
144 | 127 | fi |
145 | 128 | |
146 | 129 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
147 | 130 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
148 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | |
131 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | |
149 | 132 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
150 | 133 | |
151 | case $UNAME_SYSTEM in | |
134 | case "$UNAME_SYSTEM" in | |
152 | 135 | Linux|GNU|GNU/*) |
153 | LIBC=unknown | |
154 | ||
155 | set_cc_for_build | |
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" | |
156 | 141 | cat <<-EOF > "$dummy.c" |
157 | 142 | #include <features.h> |
158 | 143 | #if defined(__UCLIBC__) |
159 | 144 | LIBC=uclibc |
160 | 145 | #elif defined(__dietlibc__) |
161 | 146 | LIBC=dietlibc |
162 | #elif defined(__GLIBC__) | |
147 | #else | |
163 | 148 | LIBC=gnu |
164 | #else | |
165 | #include <stdarg.h> | |
166 | /* First heuristic to detect musl libc. */ | |
167 | #ifdef __DEFINED_va_list | |
168 | LIBC=musl | |
169 | #endif | |
170 | 149 | #endif |
171 | 150 | EOF |
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 | |
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 | |
186 | 158 | fi |
187 | 159 | ;; |
188 | 160 | esac |
189 | 161 | |
190 | 162 | # Note: order is significant - the case branches are not exclusive. |
191 | 163 | |
192 | case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in | |
164 | case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in | |
193 | 165 | *:NetBSD:*:*) |
194 | 166 | # NetBSD (nbsd) targets should (where applicable) match one or |
195 | 167 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
201 | 173 | # |
202 | 174 | # Note: NetBSD doesn't particularly care about the vendor |
203 | 175 | # portion of the name. We always set it to "unknown". |
176 | sysctl="sysctl -n hw.machine_arch" | |
204 | 177 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
205 | /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ | |
206 | /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ | |
178 | "/sbin/$sysctl" 2>/dev/null || \ | |
179 | "/usr/sbin/$sysctl" 2>/dev/null || \ | |
207 | 180 | echo unknown)` |
208 | case $UNAME_MACHINE_ARCH in | |
209 | aarch64eb) machine=aarch64_be-unknown ;; | |
181 | case "$UNAME_MACHINE_ARCH" in | |
210 | 182 | armeb) machine=armeb-unknown ;; |
211 | 183 | arm*) machine=arm-unknown ;; |
212 | 184 | sh3el) machine=shl-unknown ;; |
215 | 187 | earmv*) |
216 | 188 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
217 | 189 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` |
218 | machine=${arch}${endian}-unknown | |
190 | machine="${arch}${endian}"-unknown | |
219 | 191 | ;; |
220 | *) machine=$UNAME_MACHINE_ARCH-unknown ;; | |
192 | *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | |
221 | 193 | esac |
222 | 194 | # The Operating System including object format, if it has switched |
223 | 195 | # to ELF recently (or will in the future) and ABI. |
224 | case $UNAME_MACHINE_ARCH in | |
196 | case "$UNAME_MACHINE_ARCH" in | |
225 | 197 | earm*) |
226 | 198 | os=netbsdelf |
227 | 199 | ;; |
228 | 200 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
229 | set_cc_for_build | |
201 | eval "$set_cc_for_build" | |
230 | 202 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
231 | 203 | | grep -q __ELF__ |
232 | 204 | then |
242 | 214 | ;; |
243 | 215 | esac |
244 | 216 | # Determine ABI tags. |
245 | case $UNAME_MACHINE_ARCH in | |
217 | case "$UNAME_MACHINE_ARCH" in | |
246 | 218 | earm*) |
247 | 219 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
248 | 220 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` |
253 | 225 | # thus, need a distinct triplet. However, they do not need |
254 | 226 | # kernel version information, so it can be replaced with a |
255 | 227 | # suitable tag, in the style of linux-gnu. |
256 | case $UNAME_VERSION in | |
228 | case "$UNAME_VERSION" in | |
257 | 229 | Debian*) |
258 | 230 | release='-gnu' |
259 | 231 | ;; |
264 | 236 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
265 | 237 | # contains redundant information, the shorter form: |
266 | 238 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
267 | GUESS=$machine-${os}${release}${abi-} | |
268 | ;; | |
239 | echo "$machine-${os}${release}${abi}" | |
240 | exit ;; | |
269 | 241 | *:Bitrig:*:*) |
270 | 242 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
271 | GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE | |
272 | ;; | |
243 | echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | |
244 | exit ;; | |
273 | 245 | *:OpenBSD:*:*) |
274 | 246 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
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 | ;; | |
247 | echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | |
248 | exit ;; | |
281 | 249 | *:LibertyBSD:*:*) |
282 | 250 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
283 | GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE | |
284 | ;; | |
251 | echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | |
252 | exit ;; | |
285 | 253 | *:MidnightBSD:*:*) |
286 | GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE | |
287 | ;; | |
254 | echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | |
255 | exit ;; | |
288 | 256 | *:ekkoBSD:*:*) |
289 | GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE | |
290 | ;; | |
257 | echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | |
258 | exit ;; | |
291 | 259 | *:SolidBSD:*:*) |
292 | GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE | |
293 | ;; | |
294 | *:OS108:*:*) | |
295 | GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE | |
296 | ;; | |
260 | echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | |
261 | exit ;; | |
297 | 262 | macppc:MirBSD:*:*) |
298 | GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE | |
299 | ;; | |
263 | echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | |
264 | exit ;; | |
300 | 265 | *:MirBSD:*:*) |
301 | GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE | |
302 | ;; | |
266 | echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | |
267 | exit ;; | |
303 | 268 | *:Sortix:*:*) |
304 | GUESS=$UNAME_MACHINE-unknown-sortix | |
305 | ;; | |
306 | *:Twizzler:*:*) | |
307 | GUESS=$UNAME_MACHINE-unknown-twizzler | |
308 | ;; | |
269 | echo "$UNAME_MACHINE"-unknown-sortix | |
270 | exit ;; | |
309 | 271 | *:Redox:*:*) |
310 | GUESS=$UNAME_MACHINE-unknown-redox | |
311 | ;; | |
272 | echo "$UNAME_MACHINE"-unknown-redox | |
273 | exit ;; | |
312 | 274 | mips:OSF1:*.*) |
313 | GUESS=mips-dec-osf1 | |
314 | ;; | |
275 | echo mips-dec-osf1 | |
276 | exit ;; | |
315 | 277 | alpha:OSF1:*:*) |
316 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
317 | trap '' 0 | |
318 | 278 | case $UNAME_RELEASE in |
319 | 279 | *4.0) |
320 | 280 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
328 | 288 | # covers most systems running today. This code pipes the CPU |
329 | 289 | # types through head -n 1, so we only detect the type of CPU 0. |
330 | 290 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
331 | case $ALPHA_CPU_TYPE in | |
291 | case "$ALPHA_CPU_TYPE" in | |
332 | 292 | "EV4 (21064)") |
333 | 293 | UNAME_MACHINE=alpha ;; |
334 | 294 | "EV4.5 (21064)") |
365 | 325 | # A Tn.n version is a released field test version. |
366 | 326 | # A Xn.n version is an unreleased experimental baselevel. |
367 | 327 | # 1.2 uses "1.2" for uname -r. |
368 | OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` | |
369 | GUESS=$UNAME_MACHINE-dec-osf$OSF_REL | |
370 | ;; | |
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 ;; | |
371 | 333 | Amiga*:UNIX_System_V:4.0:*) |
372 | GUESS=m68k-unknown-sysv4 | |
373 | ;; | |
334 | echo m68k-unknown-sysv4 | |
335 | exit ;; | |
374 | 336 | *:[Aa]miga[Oo][Ss]:*:*) |
375 | GUESS=$UNAME_MACHINE-unknown-amigaos | |
376 | ;; | |
337 | echo "$UNAME_MACHINE"-unknown-amigaos | |
338 | exit ;; | |
377 | 339 | *:[Mm]orph[Oo][Ss]:*:*) |
378 | GUESS=$UNAME_MACHINE-unknown-morphos | |
379 | ;; | |
340 | echo "$UNAME_MACHINE"-unknown-morphos | |
341 | exit ;; | |
380 | 342 | *:OS/390:*:*) |
381 | GUESS=i370-ibm-openedition | |
382 | ;; | |
343 | echo i370-ibm-openedition | |
344 | exit ;; | |
383 | 345 | *:z/VM:*:*) |
384 | GUESS=s390-ibm-zvmoe | |
385 | ;; | |
346 | echo s390-ibm-zvmoe | |
347 | exit ;; | |
386 | 348 | *:OS400:*:*) |
387 | GUESS=powerpc-ibm-os400 | |
388 | ;; | |
349 | echo powerpc-ibm-os400 | |
350 | exit ;; | |
389 | 351 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
390 | GUESS=arm-acorn-riscix$UNAME_RELEASE | |
391 | ;; | |
352 | echo arm-acorn-riscix"$UNAME_RELEASE" | |
353 | exit ;; | |
392 | 354 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
393 | GUESS=arm-unknown-riscos | |
394 | ;; | |
355 | echo arm-unknown-riscos | |
356 | exit ;; | |
395 | 357 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
396 | GUESS=hppa1.1-hitachi-hiuxmpp | |
397 | ;; | |
358 | echo hppa1.1-hitachi-hiuxmpp | |
359 | exit ;; | |
398 | 360 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
399 | 361 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
400 | case `(/bin/universe) 2>/dev/null` in | |
401 | att) GUESS=pyramid-pyramid-sysv3 ;; | |
402 | *) GUESS=pyramid-pyramid-bsd ;; | |
403 | esac | |
404 | ;; | |
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 ;; | |
405 | 368 | NILE*:*:*:dcosx) |
406 | GUESS=pyramid-pyramid-svr4 | |
407 | ;; | |
369 | echo pyramid-pyramid-svr4 | |
370 | exit ;; | |
408 | 371 | DRS?6000:unix:4.0:6*) |
409 | GUESS=sparc-icl-nx6 | |
410 | ;; | |
372 | echo sparc-icl-nx6 | |
373 | exit ;; | |
411 | 374 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
412 | 375 | case `/usr/bin/uname -p` in |
413 | sparc) GUESS=sparc-icl-nx7 ;; | |
414 | esac | |
415 | ;; | |
376 | sparc) echo sparc-icl-nx7; exit ;; | |
377 | esac ;; | |
416 | 378 | s390x:SunOS:*:*) |
417 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
418 | GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL | |
419 | ;; | |
379 | echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
380 | exit ;; | |
420 | 381 | sun4H:SunOS:5.*:*) |
421 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
422 | GUESS=sparc-hal-solaris2$SUN_REL | |
423 | ;; | |
382 | echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
383 | exit ;; | |
424 | 384 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
425 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
426 | GUESS=sparc-sun-solaris2$SUN_REL | |
427 | ;; | |
385 | echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
386 | exit ;; | |
428 | 387 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
429 | GUESS=i386-pc-auroraux$UNAME_RELEASE | |
430 | ;; | |
388 | echo i386-pc-auroraux"$UNAME_RELEASE" | |
389 | exit ;; | |
431 | 390 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
432 | set_cc_for_build | |
391 | eval "$set_cc_for_build" | |
433 | 392 | SUN_ARCH=i386 |
434 | 393 | # If there is a compiler, see if it is configured for 64-bit objects. |
435 | 394 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
436 | 395 | # This test works for both compilers. |
437 | if test "$CC_FOR_BUILD" != no_compiler_found; then | |
396 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
438 | 397 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
439 | 398 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
440 | 399 | grep IS_64BIT_ARCH >/dev/null |
442 | 401 | SUN_ARCH=x86_64 |
443 | 402 | fi |
444 | 403 | fi |
445 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
446 | GUESS=$SUN_ARCH-pc-solaris2$SUN_REL | |
447 | ;; | |
404 | echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
405 | exit ;; | |
448 | 406 | sun4*:SunOS:6*:*) |
449 | 407 | # According to config.sub, this is the proper way to canonicalize |
450 | 408 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
451 | 409 | # it's likely to be more like Solaris than SunOS4. |
452 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
453 | GUESS=sparc-sun-solaris3$SUN_REL | |
454 | ;; | |
410 | echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
411 | exit ;; | |
455 | 412 | sun4*:SunOS:*:*) |
456 | case `/usr/bin/arch -k` in | |
413 | case "`/usr/bin/arch -k`" in | |
457 | 414 | Series*|S4*) |
458 | 415 | UNAME_RELEASE=`uname -v` |
459 | 416 | ;; |
460 | 417 | esac |
461 | 418 | # Japanese Language versions have a version number like `4.1.3-JL'. |
462 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` | |
463 | GUESS=sparc-sun-sunos$SUN_REL | |
464 | ;; | |
419 | echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" | |
420 | exit ;; | |
465 | 421 | sun3*:SunOS:*:*) |
466 | GUESS=m68k-sun-sunos$UNAME_RELEASE | |
467 | ;; | |
422 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
423 | exit ;; | |
468 | 424 | sun*:*:4.2BSD:*) |
469 | 425 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
470 | 426 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
471 | case `/bin/arch` in | |
427 | case "`/bin/arch`" in | |
472 | 428 | sun3) |
473 | GUESS=m68k-sun-sunos$UNAME_RELEASE | |
429 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
474 | 430 | ;; |
475 | 431 | sun4) |
476 | GUESS=sparc-sun-sunos$UNAME_RELEASE | |
432 | echo sparc-sun-sunos"$UNAME_RELEASE" | |
477 | 433 | ;; |
478 | 434 | esac |
479 | ;; | |
435 | exit ;; | |
480 | 436 | aushp:SunOS:*:*) |
481 | GUESS=sparc-auspex-sunos$UNAME_RELEASE | |
482 | ;; | |
437 | echo sparc-auspex-sunos"$UNAME_RELEASE" | |
438 | exit ;; | |
483 | 439 | # The situation for MiNT is a little confusing. The machine name |
484 | 440 | # can be virtually everything (everything which is not |
485 | 441 | # "atarist" or "atariste" at least should have a processor |
489 | 445 | # MiNT. But MiNT is downward compatible to TOS, so this should |
490 | 446 | # be no problem. |
491 | 447 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
492 | GUESS=m68k-atari-mint$UNAME_RELEASE | |
493 | ;; | |
448 | echo m68k-atari-mint"$UNAME_RELEASE" | |
449 | exit ;; | |
494 | 450 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
495 | GUESS=m68k-atari-mint$UNAME_RELEASE | |
496 | ;; | |
451 | echo m68k-atari-mint"$UNAME_RELEASE" | |
452 | exit ;; | |
497 | 453 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
498 | GUESS=m68k-atari-mint$UNAME_RELEASE | |
499 | ;; | |
454 | echo m68k-atari-mint"$UNAME_RELEASE" | |
455 | exit ;; | |
500 | 456 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
501 | GUESS=m68k-milan-mint$UNAME_RELEASE | |
502 | ;; | |
457 | echo m68k-milan-mint"$UNAME_RELEASE" | |
458 | exit ;; | |
503 | 459 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
504 | GUESS=m68k-hades-mint$UNAME_RELEASE | |
505 | ;; | |
460 | echo m68k-hades-mint"$UNAME_RELEASE" | |
461 | exit ;; | |
506 | 462 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
507 | GUESS=m68k-unknown-mint$UNAME_RELEASE | |
508 | ;; | |
463 | echo m68k-unknown-mint"$UNAME_RELEASE" | |
464 | exit ;; | |
509 | 465 | m68k:machten:*:*) |
510 | GUESS=m68k-apple-machten$UNAME_RELEASE | |
511 | ;; | |
466 | echo m68k-apple-machten"$UNAME_RELEASE" | |
467 | exit ;; | |
512 | 468 | powerpc:machten:*:*) |
513 | GUESS=powerpc-apple-machten$UNAME_RELEASE | |
514 | ;; | |
469 | echo powerpc-apple-machten"$UNAME_RELEASE" | |
470 | exit ;; | |
515 | 471 | RISC*:Mach:*:*) |
516 | GUESS=mips-dec-mach_bsd4.3 | |
517 | ;; | |
472 | echo mips-dec-mach_bsd4.3 | |
473 | exit ;; | |
518 | 474 | RISC*:ULTRIX:*:*) |
519 | GUESS=mips-dec-ultrix$UNAME_RELEASE | |
520 | ;; | |
475 | echo mips-dec-ultrix"$UNAME_RELEASE" | |
476 | exit ;; | |
521 | 477 | VAX*:ULTRIX*:*:*) |
522 | GUESS=vax-dec-ultrix$UNAME_RELEASE | |
523 | ;; | |
478 | echo vax-dec-ultrix"$UNAME_RELEASE" | |
479 | exit ;; | |
524 | 480 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
525 | GUESS=clipper-intergraph-clix$UNAME_RELEASE | |
526 | ;; | |
481 | echo clipper-intergraph-clix"$UNAME_RELEASE" | |
482 | exit ;; | |
527 | 483 | mips:*:*:UMIPS | mips:*:*:RISCos) |
528 | set_cc_for_build | |
484 | eval "$set_cc_for_build" | |
529 | 485 | sed 's/^ //' << EOF > "$dummy.c" |
530 | 486 | #ifdef __cplusplus |
531 | 487 | #include <stdio.h> /* for printf() prototype */ |
551 | 507 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && |
552 | 508 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && |
553 | 509 | { echo "$SYSTEM_NAME"; exit; } |
554 | GUESS=mips-mips-riscos$UNAME_RELEASE | |
555 | ;; | |
510 | echo mips-mips-riscos"$UNAME_RELEASE" | |
511 | exit ;; | |
556 | 512 | Motorola:PowerMAX_OS:*:*) |
557 | GUESS=powerpc-motorola-powermax | |
558 | ;; | |
513 | echo powerpc-motorola-powermax | |
514 | exit ;; | |
559 | 515 | Motorola:*:4.3:PL8-*) |
560 | GUESS=powerpc-harris-powermax | |
561 | ;; | |
516 | echo powerpc-harris-powermax | |
517 | exit ;; | |
562 | 518 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
563 | GUESS=powerpc-harris-powermax | |
564 | ;; | |
519 | echo powerpc-harris-powermax | |
520 | exit ;; | |
565 | 521 | Night_Hawk:Power_UNIX:*:*) |
566 | GUESS=powerpc-harris-powerunix | |
567 | ;; | |
522 | echo powerpc-harris-powerunix | |
523 | exit ;; | |
568 | 524 | m88k:CX/UX:7*:*) |
569 | GUESS=m88k-harris-cxux7 | |
570 | ;; | |
525 | echo m88k-harris-cxux7 | |
526 | exit ;; | |
571 | 527 | m88k:*:4*:R4*) |
572 | GUESS=m88k-motorola-sysv4 | |
573 | ;; | |
528 | echo m88k-motorola-sysv4 | |
529 | exit ;; | |
574 | 530 | m88k:*:3*:R3*) |
575 | GUESS=m88k-motorola-sysv3 | |
576 | ;; | |
531 | echo m88k-motorola-sysv3 | |
532 | exit ;; | |
577 | 533 | AViiON:dgux:*:*) |
578 | 534 | # DG/UX returns AViiON for all architectures |
579 | 535 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
580 | if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 | |
536 | if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] | |
581 | 537 | then |
582 | if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ | |
583 | test "$TARGET_BINARY_INTERFACE"x = x | |
538 | if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ | |
539 | [ "$TARGET_BINARY_INTERFACE"x = x ] | |
584 | 540 | then |
585 | GUESS=m88k-dg-dgux$UNAME_RELEASE | |
541 | echo m88k-dg-dgux"$UNAME_RELEASE" | |
586 | 542 | else |
587 | GUESS=m88k-dg-dguxbcs$UNAME_RELEASE | |
543 | echo m88k-dg-dguxbcs"$UNAME_RELEASE" | |
588 | 544 | fi |
589 | 545 | else |
590 | GUESS=i586-dg-dgux$UNAME_RELEASE | |
591 | fi | |
592 | ;; | |
546 | echo i586-dg-dgux"$UNAME_RELEASE" | |
547 | fi | |
548 | exit ;; | |
593 | 549 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
594 | GUESS=m88k-dolphin-sysv3 | |
595 | ;; | |
550 | echo m88k-dolphin-sysv3 | |
551 | exit ;; | |
596 | 552 | M88*:*:R3*:*) |
597 | 553 | # Delta 88k system running SVR3 |
598 | GUESS=m88k-motorola-sysv3 | |
599 | ;; | |
554 | echo m88k-motorola-sysv3 | |
555 | exit ;; | |
600 | 556 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
601 | GUESS=m88k-tektronix-sysv3 | |
602 | ;; | |
557 | echo m88k-tektronix-sysv3 | |
558 | exit ;; | |
603 | 559 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
604 | GUESS=m68k-tektronix-bsd | |
605 | ;; | |
560 | echo m68k-tektronix-bsd | |
561 | exit ;; | |
606 | 562 | *:IRIX*:*:*) |
607 | IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` | |
608 | GUESS=mips-sgi-irix$IRIX_REL | |
609 | ;; | |
563 | echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" | |
564 | exit ;; | |
610 | 565 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
611 | GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
612 | ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
566 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
567 | exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
613 | 568 | i*86:AIX:*:*) |
614 | GUESS=i386-ibm-aix | |
615 | ;; | |
569 | echo i386-ibm-aix | |
570 | exit ;; | |
616 | 571 | ia64:AIX:*:*) |
617 | if test -x /usr/bin/oslevel ; then | |
572 | if [ -x /usr/bin/oslevel ] ; then | |
618 | 573 | IBM_REV=`/usr/bin/oslevel` |
619 | 574 | else |
620 | IBM_REV=$UNAME_VERSION.$UNAME_RELEASE | |
621 | fi | |
622 | GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV | |
623 | ;; | |
575 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
576 | fi | |
577 | echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | |
578 | exit ;; | |
624 | 579 | *:AIX:2:3) |
625 | 580 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
626 | set_cc_for_build | |
581 | eval "$set_cc_for_build" | |
627 | 582 | sed 's/^ //' << EOF > "$dummy.c" |
628 | 583 | #include <sys/systemcfg.h> |
629 | 584 | |
637 | 592 | EOF |
638 | 593 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` |
639 | 594 | then |
640 | GUESS=$SYSTEM_NAME | |
595 | echo "$SYSTEM_NAME" | |
641 | 596 | else |
642 | GUESS=rs6000-ibm-aix3.2.5 | |
597 | echo rs6000-ibm-aix3.2.5 | |
643 | 598 | fi |
644 | 599 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
645 | GUESS=rs6000-ibm-aix3.2.4 | |
600 | echo rs6000-ibm-aix3.2.4 | |
646 | 601 | else |
647 | GUESS=rs6000-ibm-aix3.2 | |
648 | fi | |
649 | ;; | |
602 | echo rs6000-ibm-aix3.2 | |
603 | fi | |
604 | exit ;; | |
650 | 605 | *:AIX:*:[4567]) |
651 | 606 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
652 | 607 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
654 | 609 | else |
655 | 610 | IBM_ARCH=powerpc |
656 | 611 | fi |
657 | if test -x /usr/bin/lslpp ; then | |
658 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ | |
612 | if [ -x /usr/bin/lslpp ] ; then | |
613 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | | |
659 | 614 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
660 | 615 | else |
661 | IBM_REV=$UNAME_VERSION.$UNAME_RELEASE | |
662 | fi | |
663 | GUESS=$IBM_ARCH-ibm-aix$IBM_REV | |
664 | ;; | |
616 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
617 | fi | |
618 | echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | |
619 | exit ;; | |
665 | 620 | *:AIX:*:*) |
666 | GUESS=rs6000-ibm-aix | |
667 | ;; | |
621 | echo rs6000-ibm-aix | |
622 | exit ;; | |
668 | 623 | ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
669 | GUESS=romp-ibm-bsd4.4 | |
670 | ;; | |
624 | echo romp-ibm-bsd4.4 | |
625 | exit ;; | |
671 | 626 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
672 | GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to | |
673 | ;; # report: romp-ibm BSD 4.3 | |
627 | echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to | |
628 | exit ;; # report: romp-ibm BSD 4.3 | |
674 | 629 | *:BOSX:*:*) |
675 | GUESS=rs6000-bull-bosx | |
676 | ;; | |
630 | echo rs6000-bull-bosx | |
631 | exit ;; | |
677 | 632 | DPX/2?00:B.O.S.:*:*) |
678 | GUESS=m68k-bull-sysv3 | |
679 | ;; | |
633 | echo m68k-bull-sysv3 | |
634 | exit ;; | |
680 | 635 | 9000/[34]??:4.3bsd:1.*:*) |
681 | GUESS=m68k-hp-bsd | |
682 | ;; | |
636 | echo m68k-hp-bsd | |
637 | exit ;; | |
683 | 638 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
684 | GUESS=m68k-hp-bsd4.4 | |
685 | ;; | |
639 | echo m68k-hp-bsd4.4 | |
640 | exit ;; | |
686 | 641 | 9000/[34678]??:HP-UX:*:*) |
687 | HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` | |
688 | case $UNAME_MACHINE in | |
642 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
643 | case "$UNAME_MACHINE" in | |
689 | 644 | 9000/31?) HP_ARCH=m68000 ;; |
690 | 645 | 9000/[34]??) HP_ARCH=m68k ;; |
691 | 646 | 9000/[678][0-9][0-9]) |
692 | if test -x /usr/bin/getconf; then | |
647 | if [ -x /usr/bin/getconf ]; then | |
693 | 648 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
694 | 649 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
695 | case $sc_cpu_version in | |
650 | case "$sc_cpu_version" in | |
696 | 651 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
697 | 652 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
698 | 653 | 532) # CPU_PA_RISC2_0 |
699 | case $sc_kernel_bits in | |
654 | case "$sc_kernel_bits" in | |
700 | 655 | 32) HP_ARCH=hppa2.0n ;; |
701 | 656 | 64) HP_ARCH=hppa2.0w ;; |
702 | 657 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
703 | 658 | esac ;; |
704 | 659 | esac |
705 | 660 | fi |
706 | if test "$HP_ARCH" = ""; then | |
707 | set_cc_for_build | |
661 | if [ "$HP_ARCH" = "" ]; then | |
662 | eval "$set_cc_for_build" | |
708 | 663 | sed 's/^ //' << EOF > "$dummy.c" |
709 | 664 | |
710 | 665 | #define _HPUX_SOURCE |
742 | 697 | test -z "$HP_ARCH" && HP_ARCH=hppa |
743 | 698 | fi ;; |
744 | 699 | esac |
745 | if test "$HP_ARCH" = hppa2.0w | |
700 | if [ "$HP_ARCH" = hppa2.0w ] | |
746 | 701 | then |
747 | set_cc_for_build | |
702 | eval "$set_cc_for_build" | |
748 | 703 | |
749 | 704 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
750 | 705 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
763 | 718 | HP_ARCH=hppa64 |
764 | 719 | fi |
765 | 720 | fi |
766 | GUESS=$HP_ARCH-hp-hpux$HPUX_REV | |
767 | ;; | |
721 | echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | |
722 | exit ;; | |
768 | 723 | ia64:HP-UX:*:*) |
769 | HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` | |
770 | GUESS=ia64-hp-hpux$HPUX_REV | |
771 | ;; | |
724 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
725 | echo ia64-hp-hpux"$HPUX_REV" | |
726 | exit ;; | |
772 | 727 | 3050*:HI-UX:*:*) |
773 | set_cc_for_build | |
728 | eval "$set_cc_for_build" | |
774 | 729 | sed 's/^ //' << EOF > "$dummy.c" |
775 | 730 | #include <unistd.h> |
776 | 731 | int |
798 | 753 | EOF |
799 | 754 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && |
800 | 755 | { echo "$SYSTEM_NAME"; exit; } |
801 | GUESS=unknown-hitachi-hiuxwe2 | |
802 | ;; | |
756 | echo unknown-hitachi-hiuxwe2 | |
757 | exit ;; | |
803 | 758 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
804 | GUESS=hppa1.1-hp-bsd | |
805 | ;; | |
759 | echo hppa1.1-hp-bsd | |
760 | exit ;; | |
806 | 761 | 9000/8??:4.3bsd:*:*) |
807 | GUESS=hppa1.0-hp-bsd | |
808 | ;; | |
762 | echo hppa1.0-hp-bsd | |
763 | exit ;; | |
809 | 764 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
810 | GUESS=hppa1.0-hp-mpeix | |
811 | ;; | |
765 | echo hppa1.0-hp-mpeix | |
766 | exit ;; | |
812 | 767 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) |
813 | GUESS=hppa1.1-hp-osf | |
814 | ;; | |
768 | echo hppa1.1-hp-osf | |
769 | exit ;; | |
815 | 770 | hp8??:OSF1:*:*) |
816 | GUESS=hppa1.0-hp-osf | |
817 | ;; | |
771 | echo hppa1.0-hp-osf | |
772 | exit ;; | |
818 | 773 | i*86:OSF1:*:*) |
819 | if test -x /usr/sbin/sysversion ; then | |
820 | GUESS=$UNAME_MACHINE-unknown-osf1mk | |
774 | if [ -x /usr/sbin/sysversion ] ; then | |
775 | echo "$UNAME_MACHINE"-unknown-osf1mk | |
821 | 776 | else |
822 | GUESS=$UNAME_MACHINE-unknown-osf1 | |
823 | fi | |
824 | ;; | |
777 | echo "$UNAME_MACHINE"-unknown-osf1 | |
778 | fi | |
779 | exit ;; | |
825 | 780 | parisc*:Lites*:*:*) |
826 | GUESS=hppa1.1-hp-lites | |
827 | ;; | |
781 | echo hppa1.1-hp-lites | |
782 | exit ;; | |
828 | 783 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
829 | GUESS=c1-convex-bsd | |
830 | ;; | |
784 | echo c1-convex-bsd | |
785 | exit ;; | |
831 | 786 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
832 | 787 | if getsysinfo -f scalar_acc |
833 | 788 | then echo c32-convex-bsd |
835 | 790 | fi |
836 | 791 | exit ;; |
837 | 792 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
838 | GUESS=c34-convex-bsd | |
839 | ;; | |
793 | echo c34-convex-bsd | |
794 | exit ;; | |
840 | 795 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
841 | GUESS=c38-convex-bsd | |
842 | ;; | |
796 | echo c38-convex-bsd | |
797 | exit ;; | |
843 | 798 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
844 | GUESS=c4-convex-bsd | |
845 | ;; | |
799 | echo c4-convex-bsd | |
800 | exit ;; | |
846 | 801 | CRAY*Y-MP:*:*:*) |
847 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
848 | GUESS=ymp-cray-unicos$CRAY_REL | |
849 | ;; | |
802 | echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
803 | exit ;; | |
850 | 804 | CRAY*[A-Z]90:*:*:*) |
851 | 805 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ |
852 | 806 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
854 | 808 | -e 's/\.[^.]*$/.X/' |
855 | 809 | exit ;; |
856 | 810 | CRAY*TS:*:*:*) |
857 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
858 | GUESS=t90-cray-unicos$CRAY_REL | |
859 | ;; | |
811 | echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
812 | exit ;; | |
860 | 813 | CRAY*T3E:*:*:*) |
861 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
862 | GUESS=alphaev5-cray-unicosmk$CRAY_REL | |
863 | ;; | |
814 | echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
815 | exit ;; | |
864 | 816 | CRAY*SV1:*:*:*) |
865 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
866 | GUESS=sv1-cray-unicos$CRAY_REL | |
867 | ;; | |
817 | echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
818 | exit ;; | |
868 | 819 | *:UNICOS/mp:*:*) |
869 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
870 | GUESS=craynv-cray-unicosmp$CRAY_REL | |
871 | ;; | |
820 | echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
821 | exit ;; | |
872 | 822 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
873 | 823 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
874 | 824 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
875 | 825 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` |
876 | GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} | |
877 | ;; | |
826 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
827 | exit ;; | |
878 | 828 | 5000:UNIX_System_V:4.*:*) |
879 | 829 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
880 | 830 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
881 | GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} | |
882 | ;; | |
831 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
832 | exit ;; | |
883 | 833 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
884 | GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE | |
885 | ;; | |
834 | echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | |
835 | exit ;; | |
886 | 836 | sparc*:BSD/OS:*:*) |
887 | GUESS=sparc-unknown-bsdi$UNAME_RELEASE | |
888 | ;; | |
837 | echo sparc-unknown-bsdi"$UNAME_RELEASE" | |
838 | exit ;; | |
889 | 839 | *:BSD/OS:*:*) |
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 | ;; | |
840 | echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | |
841 | exit ;; | |
905 | 842 | *:FreeBSD:*:*) |
906 | 843 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
907 | case $UNAME_PROCESSOR in | |
844 | case "$UNAME_PROCESSOR" in | |
908 | 845 | amd64) |
909 | 846 | UNAME_PROCESSOR=x86_64 ;; |
910 | 847 | i386) |
911 | 848 | UNAME_PROCESSOR=i586 ;; |
912 | 849 | esac |
913 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
914 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL | |
915 | ;; | |
850 | echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
851 | exit ;; | |
916 | 852 | i*:CYGWIN*:*) |
917 | GUESS=$UNAME_MACHINE-pc-cygwin | |
918 | ;; | |
853 | echo "$UNAME_MACHINE"-pc-cygwin | |
854 | exit ;; | |
919 | 855 | *:MINGW64*:*) |
920 | GUESS=$UNAME_MACHINE-pc-mingw64 | |
921 | ;; | |
856 | echo "$UNAME_MACHINE"-pc-mingw64 | |
857 | exit ;; | |
922 | 858 | *:MINGW*:*) |
923 | GUESS=$UNAME_MACHINE-pc-mingw32 | |
924 | ;; | |
859 | echo "$UNAME_MACHINE"-pc-mingw32 | |
860 | exit ;; | |
925 | 861 | *:MSYS*:*) |
926 | GUESS=$UNAME_MACHINE-pc-msys | |
927 | ;; | |
862 | echo "$UNAME_MACHINE"-pc-msys | |
863 | exit ;; | |
928 | 864 | i*:PW*:*) |
929 | GUESS=$UNAME_MACHINE-pc-pw32 | |
930 | ;; | |
865 | echo "$UNAME_MACHINE"-pc-pw32 | |
866 | exit ;; | |
931 | 867 | *:Interix*:*) |
932 | case $UNAME_MACHINE in | |
868 | case "$UNAME_MACHINE" in | |
933 | 869 | x86) |
934 | GUESS=i586-pc-interix$UNAME_RELEASE | |
935 | ;; | |
870 | echo i586-pc-interix"$UNAME_RELEASE" | |
871 | exit ;; | |
936 | 872 | authenticamd | genuineintel | EM64T) |
937 | GUESS=x86_64-unknown-interix$UNAME_RELEASE | |
938 | ;; | |
873 | echo x86_64-unknown-interix"$UNAME_RELEASE" | |
874 | exit ;; | |
939 | 875 | IA64) |
940 | GUESS=ia64-unknown-interix$UNAME_RELEASE | |
941 | ;; | |
876 | echo ia64-unknown-interix"$UNAME_RELEASE" | |
877 | exit ;; | |
942 | 878 | esac ;; |
943 | 879 | i*:UWIN*:*) |
944 | GUESS=$UNAME_MACHINE-pc-uwin | |
945 | ;; | |
880 | echo "$UNAME_MACHINE"-pc-uwin | |
881 | exit ;; | |
946 | 882 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
947 | GUESS=x86_64-pc-cygwin | |
948 | ;; | |
883 | echo x86_64-unknown-cygwin | |
884 | exit ;; | |
949 | 885 | prep*:SunOS:5.*:*) |
950 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
951 | GUESS=powerpcle-unknown-solaris2$SUN_REL | |
952 | ;; | |
886 | echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
887 | exit ;; | |
953 | 888 | *:GNU:*:*) |
954 | 889 | # the GNU system |
955 | GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` | |
956 | GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` | |
957 | GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL | |
958 | ;; | |
890 | echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" | |
891 | exit ;; | |
959 | 892 | *:GNU/*:*:*) |
960 | 893 | # other systems with GNU libc and userland |
961 | GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` | |
962 | GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
963 | GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC | |
964 | ;; | |
965 | *:Minix:*:*) | |
966 | GUESS=$UNAME_MACHINE-unknown-minix | |
967 | ;; | |
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 ;; | |
968 | 899 | aarch64:Linux:*:*) |
969 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
970 | ;; | |
900 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
901 | exit ;; | |
971 | 902 | aarch64_be:Linux:*:*) |
972 | 903 | UNAME_MACHINE=aarch64_be |
973 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
974 | ;; | |
904 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
905 | exit ;; | |
975 | 906 | alpha:Linux:*:*) |
976 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in | |
907 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
977 | 908 | EV5) UNAME_MACHINE=alphaev5 ;; |
978 | 909 | EV56) UNAME_MACHINE=alphaev56 ;; |
979 | 910 | PCA56) UNAME_MACHINE=alphapca56 ;; |
984 | 915 | esac |
985 | 916 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
986 | 917 | if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
987 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
988 | ;; | |
989 | arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) | |
990 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
991 | ;; | |
918 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
919 | exit ;; | |
920 | arc:Linux:*:* | arceb:Linux:*:*) | |
921 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
922 | exit ;; | |
992 | 923 | arm*:Linux:*:*) |
993 | set_cc_for_build | |
924 | eval "$set_cc_for_build" | |
994 | 925 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
995 | 926 | | grep -q __ARM_EABI__ |
996 | 927 | then |
997 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
928 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
998 | 929 | else |
999 | 930 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
1000 | 931 | | grep -q __ARM_PCS_VFP |
1001 | 932 | then |
1002 | GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi | |
933 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi | |
1003 | 934 | else |
1004 | GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf | |
935 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf | |
1005 | 936 | fi |
1006 | 937 | fi |
1007 | ;; | |
938 | exit ;; | |
1008 | 939 | avr32*:Linux:*:*) |
1009 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1010 | ;; | |
940 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
941 | exit ;; | |
1011 | 942 | cris:Linux:*:*) |
1012 | GUESS=$UNAME_MACHINE-axis-linux-$LIBC | |
1013 | ;; | |
943 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
944 | exit ;; | |
1014 | 945 | crisv32:Linux:*:*) |
1015 | GUESS=$UNAME_MACHINE-axis-linux-$LIBC | |
1016 | ;; | |
946 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
947 | exit ;; | |
1017 | 948 | e2k:Linux:*:*) |
1018 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1019 | ;; | |
949 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
950 | exit ;; | |
1020 | 951 | frv:Linux:*:*) |
1021 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1022 | ;; | |
952 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
953 | exit ;; | |
1023 | 954 | hexagon:Linux:*:*) |
1024 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1025 | ;; | |
955 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
956 | exit ;; | |
1026 | 957 | i*86:Linux:*:*) |
1027 | GUESS=$UNAME_MACHINE-pc-linux-$LIBC | |
1028 | ;; | |
958 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
959 | exit ;; | |
1029 | 960 | ia64:Linux:*:*) |
1030 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1031 | ;; | |
961 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
962 | exit ;; | |
1032 | 963 | k1om:Linux:*:*) |
1033 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1034 | ;; | |
1035 | loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) | |
1036 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1037 | ;; | |
964 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
965 | exit ;; | |
1038 | 966 | m32r*:Linux:*:*) |
1039 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1040 | ;; | |
967 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
968 | exit ;; | |
1041 | 969 | m68*:Linux:*:*) |
1042 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1043 | ;; | |
970 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
971 | exit ;; | |
1044 | 972 | mips:Linux:*:* | mips64:Linux:*:*) |
1045 | set_cc_for_build | |
1046 | IS_GLIBC=0 | |
1047 | test x"${LIBC}" = xgnu && IS_GLIBC=1 | |
973 | eval "$set_cc_for_build" | |
1048 | 974 | sed 's/^ //' << EOF > "$dummy.c" |
1049 | 975 | #undef CPU |
1050 | #undef mips | |
1051 | #undef mipsel | |
1052 | #undef mips64 | |
1053 | #undef mips64el | |
1054 | #if ${IS_GLIBC} && defined(_ABI64) | |
1055 | LIBCABI=gnuabi64 | |
1056 | #else | |
1057 | #if ${IS_GLIBC} && defined(_ABIN32) | |
1058 | LIBCABI=gnuabin32 | |
1059 | #else | |
1060 | LIBCABI=${LIBC} | |
1061 | #endif | |
1062 | #endif | |
1063 | ||
1064 | #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
1065 | CPU=mipsisa64r6 | |
1066 | #else | |
1067 | #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
1068 | CPU=mipsisa32r6 | |
1069 | #else | |
1070 | #if defined(__mips64) | |
1071 | CPU=mips64 | |
1072 | #else | |
1073 | CPU=mips | |
1074 | #endif | |
1075 | #endif | |
1076 | #endif | |
1077 | ||
976 | #undef ${UNAME_MACHINE} | |
977 | #undef ${UNAME_MACHINE}el | |
1078 | 978 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
1079 | MIPS_ENDIAN=el | |
979 | CPU=${UNAME_MACHINE}el | |
1080 | 980 | #else |
1081 | 981 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
1082 | MIPS_ENDIAN= | |
982 | CPU=${UNAME_MACHINE} | |
1083 | 983 | #else |
1084 | MIPS_ENDIAN= | |
984 | CPU= | |
1085 | 985 | #endif |
1086 | 986 | #endif |
1087 | 987 | EOF |
1088 | cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` | |
1089 | eval "$cc_set_vars" | |
1090 | test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } | |
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 | 990 | ;; |
1092 | 991 | mips64el:Linux:*:*) |
1093 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1094 | ;; | |
992 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
993 | exit ;; | |
1095 | 994 | openrisc*:Linux:*:*) |
1096 | GUESS=or1k-unknown-linux-$LIBC | |
1097 | ;; | |
995 | echo or1k-unknown-linux-"$LIBC" | |
996 | exit ;; | |
1098 | 997 | or32:Linux:*:* | or1k*:Linux:*:*) |
1099 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1100 | ;; | |
998 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
999 | exit ;; | |
1101 | 1000 | padre:Linux:*:*) |
1102 | GUESS=sparc-unknown-linux-$LIBC | |
1103 | ;; | |
1001 | echo sparc-unknown-linux-"$LIBC" | |
1002 | exit ;; | |
1104 | 1003 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
1105 | GUESS=hppa64-unknown-linux-$LIBC | |
1106 | ;; | |
1004 | echo hppa64-unknown-linux-"$LIBC" | |
1005 | exit ;; | |
1107 | 1006 | parisc:Linux:*:* | hppa:Linux:*:*) |
1108 | 1007 | # Look for CPU level |
1109 | 1008 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
1110 | PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; | |
1111 | PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; | |
1112 | *) GUESS=hppa-unknown-linux-$LIBC ;; | |
1009 | PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; | |
1010 | PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; | |
1011 | *) echo hppa-unknown-linux-"$LIBC" ;; | |
1113 | 1012 | esac |
1114 | ;; | |
1013 | exit ;; | |
1115 | 1014 | ppc64:Linux:*:*) |
1116 | GUESS=powerpc64-unknown-linux-$LIBC | |
1117 | ;; | |
1015 | echo powerpc64-unknown-linux-"$LIBC" | |
1016 | exit ;; | |
1118 | 1017 | ppc:Linux:*:*) |
1119 | GUESS=powerpc-unknown-linux-$LIBC | |
1120 | ;; | |
1018 | echo powerpc-unknown-linux-"$LIBC" | |
1019 | exit ;; | |
1121 | 1020 | ppc64le:Linux:*:*) |
1122 | GUESS=powerpc64le-unknown-linux-$LIBC | |
1123 | ;; | |
1021 | echo powerpc64le-unknown-linux-"$LIBC" | |
1022 | exit ;; | |
1124 | 1023 | ppcle:Linux:*:*) |
1125 | GUESS=powerpcle-unknown-linux-$LIBC | |
1126 | ;; | |
1127 | riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) | |
1128 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1129 | ;; | |
1024 | echo powerpcle-unknown-linux-"$LIBC" | |
1025 | exit ;; | |
1026 | riscv32:Linux:*:* | riscv64:Linux:*:*) | |
1027 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1028 | exit ;; | |
1130 | 1029 | s390:Linux:*:* | s390x:Linux:*:*) |
1131 | GUESS=$UNAME_MACHINE-ibm-linux-$LIBC | |
1132 | ;; | |
1030 | echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | |
1031 | exit ;; | |
1133 | 1032 | sh64*:Linux:*:*) |
1134 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1135 | ;; | |
1033 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1034 | exit ;; | |
1136 | 1035 | sh*:Linux:*:*) |
1137 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1138 | ;; | |
1036 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1037 | exit ;; | |
1139 | 1038 | sparc:Linux:*:* | sparc64:Linux:*:*) |
1140 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1141 | ;; | |
1039 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1040 | exit ;; | |
1142 | 1041 | tile*:Linux:*:*) |
1143 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1144 | ;; | |
1042 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1043 | exit ;; | |
1145 | 1044 | vax:Linux:*:*) |
1146 | GUESS=$UNAME_MACHINE-dec-linux-$LIBC | |
1147 | ;; | |
1045 | echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | |
1046 | exit ;; | |
1148 | 1047 | x86_64:Linux:*:*) |
1149 | set_cc_for_build | |
1150 | LIBCABI=$LIBC | |
1151 | if test "$CC_FOR_BUILD" != no_compiler_found; then | |
1152 | if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ | |
1153 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1154 | grep IS_X32 >/dev/null | |
1155 | then | |
1156 | LIBCABI=${LIBC}x32 | |
1157 | fi | |
1158 | fi | |
1159 | GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI | |
1160 | ;; | |
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 ;; | |
1161 | 1054 | xtensa*:Linux:*:*) |
1162 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
1163 | ;; | |
1055 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1056 | exit ;; | |
1164 | 1057 | i*86:DYNIX/ptx:4*:*) |
1165 | 1058 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1166 | 1059 | # earlier versions are messed up and put the nodename in both |
1167 | 1060 | # sysname and nodename. |
1168 | GUESS=i386-sequent-sysv4 | |
1169 | ;; | |
1061 | echo i386-sequent-sysv4 | |
1062 | exit ;; | |
1170 | 1063 | i*86:UNIX_SV:4.2MP:2.*) |
1171 | 1064 | # Unixware is an offshoot of SVR4, but it has its own version |
1172 | 1065 | # number series starting with 2... |
1173 | 1066 | # I am not positive that other SVR4 systems won't match this, |
1174 | 1067 | # I just have to hope. -- rms. |
1175 | 1068 | # Use sysv4.2uw... so that sysv4* matches it. |
1176 | GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION | |
1177 | ;; | |
1069 | echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" | |
1070 | exit ;; | |
1178 | 1071 | i*86:OS/2:*:*) |
1179 | 1072 | # If we were able to find `uname', then EMX Unix compatibility |
1180 | 1073 | # is probably installed. |
1181 | GUESS=$UNAME_MACHINE-pc-os2-emx | |
1182 | ;; | |
1074 | echo "$UNAME_MACHINE"-pc-os2-emx | |
1075 | exit ;; | |
1183 | 1076 | i*86:XTS-300:*:STOP) |
1184 | GUESS=$UNAME_MACHINE-unknown-stop | |
1185 | ;; | |
1077 | echo "$UNAME_MACHINE"-unknown-stop | |
1078 | exit ;; | |
1186 | 1079 | i*86:atheos:*:*) |
1187 | GUESS=$UNAME_MACHINE-unknown-atheos | |
1188 | ;; | |
1080 | echo "$UNAME_MACHINE"-unknown-atheos | |
1081 | exit ;; | |
1189 | 1082 | i*86:syllable:*:*) |
1190 | GUESS=$UNAME_MACHINE-pc-syllable | |
1191 | ;; | |
1083 | echo "$UNAME_MACHINE"-pc-syllable | |
1084 | exit ;; | |
1192 | 1085 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
1193 | GUESS=i386-unknown-lynxos$UNAME_RELEASE | |
1194 | ;; | |
1086 | echo i386-unknown-lynxos"$UNAME_RELEASE" | |
1087 | exit ;; | |
1195 | 1088 | i*86:*DOS:*:*) |
1196 | GUESS=$UNAME_MACHINE-pc-msdosdjgpp | |
1197 | ;; | |
1089 | echo "$UNAME_MACHINE"-pc-msdosdjgpp | |
1090 | exit ;; | |
1198 | 1091 | i*86:*:4.*:*) |
1199 | 1092 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` |
1200 | 1093 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1201 | GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL | |
1094 | echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | |
1202 | 1095 | else |
1203 | GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL | |
1204 | fi | |
1205 | ;; | |
1096 | echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | |
1097 | fi | |
1098 | exit ;; | |
1206 | 1099 | i*86:*:5:[678]*) |
1207 | 1100 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
1208 | 1101 | case `/bin/uname -X | grep "^Machine"` in |
1210 | 1103 | *Pentium) UNAME_MACHINE=i586 ;; |
1211 | 1104 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1212 | 1105 | esac |
1213 | GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
1214 | ;; | |
1106 | echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" | |
1107 | exit ;; | |
1215 | 1108 | i*86:*:3.2:*) |
1216 | 1109 | if test -f /usr/options/cb.name; then |
1217 | 1110 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
1218 | GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL | |
1111 | echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | |
1219 | 1112 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1220 | 1113 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1221 | 1114 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1225 | 1118 | && UNAME_MACHINE=i686 |
1226 | 1119 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1227 | 1120 | && UNAME_MACHINE=i686 |
1228 | GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL | |
1121 | echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" | |
1229 | 1122 | else |
1230 | GUESS=$UNAME_MACHINE-pc-sysv32 | |
1231 | fi | |
1232 | ;; | |
1123 | echo "$UNAME_MACHINE"-pc-sysv32 | |
1124 | fi | |
1125 | exit ;; | |
1233 | 1126 | pc:*:*:*) |
1234 | 1127 | # Left here for compatibility: |
1235 | 1128 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1237 | 1130 | # Note: whatever this is, it MUST be the same as what config.sub |
1238 | 1131 | # prints for the "djgpp" host, or else GDB configure will decide that |
1239 | 1132 | # this is a cross-build. |
1240 | GUESS=i586-pc-msdosdjgpp | |
1241 | ;; | |
1133 | echo i586-pc-msdosdjgpp | |
1134 | exit ;; | |
1242 | 1135 | Intel:Mach:3*:*) |
1243 | GUESS=i386-pc-mach3 | |
1244 | ;; | |
1136 | echo i386-pc-mach3 | |
1137 | exit ;; | |
1245 | 1138 | paragon:*:*:*) |
1246 | GUESS=i860-intel-osf1 | |
1247 | ;; | |
1139 | echo i860-intel-osf1 | |
1140 | exit ;; | |
1248 | 1141 | i860:*:4.*:*) # i860-SVR4 |
1249 | 1142 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
1250 | GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 | |
1143 | echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 | |
1251 | 1144 | else # Add other i860-SVR4 vendors below as they are discovered. |
1252 | GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 | |
1253 | fi | |
1254 | ;; | |
1145 | echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 | |
1146 | fi | |
1147 | exit ;; | |
1255 | 1148 | mini*:CTIX:SYS*5:*) |
1256 | 1149 | # "miniframe" |
1257 | GUESS=m68010-convergent-sysv | |
1258 | ;; | |
1150 | echo m68010-convergent-sysv | |
1151 | exit ;; | |
1259 | 1152 | mc68k:UNIX:SYSTEM5:3.51m) |
1260 | GUESS=m68k-convergent-sysv | |
1261 | ;; | |
1153 | echo m68k-convergent-sysv | |
1154 | exit ;; | |
1262 | 1155 | M680?0:D-NIX:5.3:*) |
1263 | GUESS=m68k-diab-dnix | |
1264 | ;; | |
1156 | echo m68k-diab-dnix | |
1157 | exit ;; | |
1265 | 1158 | M68*:*:R3V[5678]*:*) |
1266 | 1159 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
1267 | 1160 | 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) |
1286 | 1179 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
1287 | 1180 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
1288 | 1181 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1289 | GUESS=m68k-unknown-lynxos$UNAME_RELEASE | |
1290 | ;; | |
1182 | echo m68k-unknown-lynxos"$UNAME_RELEASE" | |
1183 | exit ;; | |
1291 | 1184 | mc68030:UNIX_System_V:4.*:*) |
1292 | GUESS=m68k-atari-sysv4 | |
1293 | ;; | |
1185 | echo m68k-atari-sysv4 | |
1186 | exit ;; | |
1294 | 1187 | TSUNAMI:LynxOS:2.*:*) |
1295 | GUESS=sparc-unknown-lynxos$UNAME_RELEASE | |
1296 | ;; | |
1188 | echo sparc-unknown-lynxos"$UNAME_RELEASE" | |
1189 | exit ;; | |
1297 | 1190 | rs6000:LynxOS:2.*:*) |
1298 | GUESS=rs6000-unknown-lynxos$UNAME_RELEASE | |
1299 | ;; | |
1191 | echo rs6000-unknown-lynxos"$UNAME_RELEASE" | |
1192 | exit ;; | |
1300 | 1193 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
1301 | GUESS=powerpc-unknown-lynxos$UNAME_RELEASE | |
1302 | ;; | |
1194 | echo powerpc-unknown-lynxos"$UNAME_RELEASE" | |
1195 | exit ;; | |
1303 | 1196 | SM[BE]S:UNIX_SV:*:*) |
1304 | GUESS=mips-dde-sysv$UNAME_RELEASE | |
1305 | ;; | |
1197 | echo mips-dde-sysv"$UNAME_RELEASE" | |
1198 | exit ;; | |
1306 | 1199 | RM*:ReliantUNIX-*:*:*) |
1307 | GUESS=mips-sni-sysv4 | |
1308 | ;; | |
1200 | echo mips-sni-sysv4 | |
1201 | exit ;; | |
1309 | 1202 | RM*:SINIX-*:*:*) |
1310 | GUESS=mips-sni-sysv4 | |
1311 | ;; | |
1203 | echo mips-sni-sysv4 | |
1204 | exit ;; | |
1312 | 1205 | *:SINIX-*:*:*) |
1313 | 1206 | if uname -p 2>/dev/null >/dev/null ; then |
1314 | 1207 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1315 | GUESS=$UNAME_MACHINE-sni-sysv4 | |
1208 | echo "$UNAME_MACHINE"-sni-sysv4 | |
1316 | 1209 | else |
1317 | GUESS=ns32k-sni-sysv | |
1318 | fi | |
1319 | ;; | |
1210 | echo ns32k-sni-sysv | |
1211 | fi | |
1212 | exit ;; | |
1320 | 1213 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1321 | 1214 | # says <Richard.M.Bartel@ccMail.Census.GOV> |
1322 | GUESS=i586-unisys-sysv4 | |
1323 | ;; | |
1215 | echo i586-unisys-sysv4 | |
1216 | exit ;; | |
1324 | 1217 | *:UNIX_System_V:4*:FTX*) |
1325 | 1218 | # From Gerald Hewes <hewes@openmarket.com>. |
1326 | 1219 | # How about differentiating between stratus architectures? -djm |
1327 | GUESS=hppa1.1-stratus-sysv4 | |
1328 | ;; | |
1220 | echo hppa1.1-stratus-sysv4 | |
1221 | exit ;; | |
1329 | 1222 | *:*:*:FTX*) |
1330 | 1223 | # From seanf@swdc.stratus.com. |
1331 | GUESS=i860-stratus-sysv4 | |
1332 | ;; | |
1224 | echo i860-stratus-sysv4 | |
1225 | exit ;; | |
1333 | 1226 | i*86:VOS:*:*) |
1334 | 1227 | # From Paul.Green@stratus.com. |
1335 | GUESS=$UNAME_MACHINE-stratus-vos | |
1336 | ;; | |
1228 | echo "$UNAME_MACHINE"-stratus-vos | |
1229 | exit ;; | |
1337 | 1230 | *:VOS:*:*) |
1338 | 1231 | # From Paul.Green@stratus.com. |
1339 | GUESS=hppa1.1-stratus-vos | |
1340 | ;; | |
1232 | echo hppa1.1-stratus-vos | |
1233 | exit ;; | |
1341 | 1234 | mc68*:A/UX:*:*) |
1342 | GUESS=m68k-apple-aux$UNAME_RELEASE | |
1343 | ;; | |
1235 | echo m68k-apple-aux"$UNAME_RELEASE" | |
1236 | exit ;; | |
1344 | 1237 | news*:NEWS-OS:6*:*) |
1345 | GUESS=mips-sony-newsos6 | |
1346 | ;; | |
1238 | echo mips-sony-newsos6 | |
1239 | exit ;; | |
1347 | 1240 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1348 | if test -d /usr/nec; then | |
1349 | GUESS=mips-nec-sysv$UNAME_RELEASE | |
1241 | if [ -d /usr/nec ]; then | |
1242 | echo mips-nec-sysv"$UNAME_RELEASE" | |
1350 | 1243 | else |
1351 | GUESS=mips-unknown-sysv$UNAME_RELEASE | |
1352 | fi | |
1353 | ;; | |
1244 | echo mips-unknown-sysv"$UNAME_RELEASE" | |
1245 | fi | |
1246 | exit ;; | |
1354 | 1247 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1355 | GUESS=powerpc-be-beos | |
1356 | ;; | |
1248 | echo powerpc-be-beos | |
1249 | exit ;; | |
1357 | 1250 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1358 | GUESS=powerpc-apple-beos | |
1359 | ;; | |
1251 | echo powerpc-apple-beos | |
1252 | exit ;; | |
1360 | 1253 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1361 | GUESS=i586-pc-beos | |
1362 | ;; | |
1254 | echo i586-pc-beos | |
1255 | exit ;; | |
1363 | 1256 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
1364 | GUESS=i586-pc-haiku | |
1365 | ;; | |
1257 | echo i586-pc-haiku | |
1258 | exit ;; | |
1366 | 1259 | x86_64:Haiku:*:*) |
1367 | GUESS=x86_64-unknown-haiku | |
1368 | ;; | |
1260 | echo x86_64-unknown-haiku | |
1261 | exit ;; | |
1369 | 1262 | SX-4:SUPER-UX:*:*) |
1370 | GUESS=sx4-nec-superux$UNAME_RELEASE | |
1371 | ;; | |
1263 | echo sx4-nec-superux"$UNAME_RELEASE" | |
1264 | exit ;; | |
1372 | 1265 | SX-5:SUPER-UX:*:*) |
1373 | GUESS=sx5-nec-superux$UNAME_RELEASE | |
1374 | ;; | |
1266 | echo sx5-nec-superux"$UNAME_RELEASE" | |
1267 | exit ;; | |
1375 | 1268 | SX-6:SUPER-UX:*:*) |
1376 | GUESS=sx6-nec-superux$UNAME_RELEASE | |
1377 | ;; | |
1269 | echo sx6-nec-superux"$UNAME_RELEASE" | |
1270 | exit ;; | |
1378 | 1271 | SX-7:SUPER-UX:*:*) |
1379 | GUESS=sx7-nec-superux$UNAME_RELEASE | |
1380 | ;; | |
1272 | echo sx7-nec-superux"$UNAME_RELEASE" | |
1273 | exit ;; | |
1381 | 1274 | SX-8:SUPER-UX:*:*) |
1382 | GUESS=sx8-nec-superux$UNAME_RELEASE | |
1383 | ;; | |
1275 | echo sx8-nec-superux"$UNAME_RELEASE" | |
1276 | exit ;; | |
1384 | 1277 | SX-8R:SUPER-UX:*:*) |
1385 | GUESS=sx8r-nec-superux$UNAME_RELEASE | |
1386 | ;; | |
1278 | echo sx8r-nec-superux"$UNAME_RELEASE" | |
1279 | exit ;; | |
1387 | 1280 | SX-ACE:SUPER-UX:*:*) |
1388 | GUESS=sxace-nec-superux$UNAME_RELEASE | |
1389 | ;; | |
1281 | echo sxace-nec-superux"$UNAME_RELEASE" | |
1282 | exit ;; | |
1390 | 1283 | Power*:Rhapsody:*:*) |
1391 | GUESS=powerpc-apple-rhapsody$UNAME_RELEASE | |
1392 | ;; | |
1284 | echo powerpc-apple-rhapsody"$UNAME_RELEASE" | |
1285 | exit ;; | |
1393 | 1286 | *:Rhapsody:*:*) |
1394 | GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE | |
1395 | ;; | |
1396 | arm64:Darwin:*:*) | |
1397 | GUESS=aarch64-apple-darwin$UNAME_RELEASE | |
1398 | ;; | |
1287 | echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | |
1288 | exit ;; | |
1399 | 1289 | *:Darwin:*:*) |
1400 | UNAME_PROCESSOR=`uname -p` | |
1401 | case $UNAME_PROCESSOR in | |
1402 | unknown) UNAME_PROCESSOR=powerpc ;; | |
1403 | esac | |
1404 | if command -v xcode-select > /dev/null 2> /dev/null && \ | |
1405 | ! xcode-select --print-path > /dev/null 2> /dev/null ; then | |
1406 | # Avoid executing cc if there is no toolchain installed as | |
1407 | # cc will be a stub that puts up a graphical alert | |
1408 | # prompting the user to install developer tools. | |
1409 | CC_FOR_BUILD=no_compiler_found | |
1410 | else | |
1411 | set_cc_for_build | |
1412 | fi | |
1413 | if test "$CC_FOR_BUILD" != no_compiler_found; then | |
1414 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1415 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1416 | grep IS_64BIT_ARCH >/dev/null | |
1417 | then | |
1418 | case $UNAME_PROCESSOR in | |
1419 | i386) UNAME_PROCESSOR=x86_64 ;; | |
1420 | powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
1421 | esac | |
1422 | fi | |
1423 | # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
1424 | if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
1425 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1426 | grep IS_PPC >/dev/null | |
1427 | then | |
1428 | UNAME_PROCESSOR=powerpc | |
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 | |
1429 | 1313 | fi |
1430 | 1314 | elif test "$UNAME_PROCESSOR" = i386 ; then |
1431 | # uname -m returns i386 or x86_64 | |
1432 | UNAME_PROCESSOR=$UNAME_MACHINE | |
1433 | fi | |
1434 | GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE | |
1435 | ;; | |
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 ;; | |
1436 | 1325 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1437 | 1326 | UNAME_PROCESSOR=`uname -p` |
1438 | 1327 | if test "$UNAME_PROCESSOR" = x86; then |
1439 | 1328 | UNAME_PROCESSOR=i386 |
1440 | 1329 | UNAME_MACHINE=pc |
1441 | 1330 | fi |
1442 | GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE | |
1443 | ;; | |
1331 | echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | |
1332 | exit ;; | |
1444 | 1333 | *:QNX:*:4*) |
1445 | GUESS=i386-pc-qnx | |
1446 | ;; | |
1334 | echo i386-pc-qnx | |
1335 | exit ;; | |
1447 | 1336 | NEO-*:NONSTOP_KERNEL:*:*) |
1448 | GUESS=neo-tandem-nsk$UNAME_RELEASE | |
1449 | ;; | |
1337 | echo neo-tandem-nsk"$UNAME_RELEASE" | |
1338 | exit ;; | |
1450 | 1339 | NSE-*:NONSTOP_KERNEL:*:*) |
1451 | GUESS=nse-tandem-nsk$UNAME_RELEASE | |
1452 | ;; | |
1340 | echo nse-tandem-nsk"$UNAME_RELEASE" | |
1341 | exit ;; | |
1453 | 1342 | NSR-*:NONSTOP_KERNEL:*:*) |
1454 | GUESS=nsr-tandem-nsk$UNAME_RELEASE | |
1455 | ;; | |
1343 | echo nsr-tandem-nsk"$UNAME_RELEASE" | |
1344 | exit ;; | |
1456 | 1345 | NSV-*:NONSTOP_KERNEL:*:*) |
1457 | GUESS=nsv-tandem-nsk$UNAME_RELEASE | |
1458 | ;; | |
1346 | echo nsv-tandem-nsk"$UNAME_RELEASE" | |
1347 | exit ;; | |
1459 | 1348 | NSX-*:NONSTOP_KERNEL:*:*) |
1460 | GUESS=nsx-tandem-nsk$UNAME_RELEASE | |
1461 | ;; | |
1349 | echo nsx-tandem-nsk"$UNAME_RELEASE" | |
1350 | exit ;; | |
1462 | 1351 | *:NonStop-UX:*:*) |
1463 | GUESS=mips-compaq-nonstopux | |
1464 | ;; | |
1352 | echo mips-compaq-nonstopux | |
1353 | exit ;; | |
1465 | 1354 | BS2000:POSIX*:*:*) |
1466 | GUESS=bs2000-siemens-sysv | |
1467 | ;; | |
1355 | echo bs2000-siemens-sysv | |
1356 | exit ;; | |
1468 | 1357 | DS/*:UNIX_System_V:*:*) |
1469 | GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE | |
1470 | ;; | |
1358 | echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" | |
1359 | exit ;; | |
1471 | 1360 | *:Plan9:*:*) |
1472 | 1361 | # "uname -m" is not consistent, so use $cputype instead. 386 |
1473 | 1362 | # is converted to i386 for consistency with other x86 |
1474 | 1363 | # operating systems. |
1475 | if test "${cputype-}" = 386; then | |
1364 | if test "$cputype" = 386; then | |
1476 | 1365 | UNAME_MACHINE=i386 |
1477 | elif test "x${cputype-}" != x; then | |
1478 | UNAME_MACHINE=$cputype | |
1479 | fi | |
1480 | GUESS=$UNAME_MACHINE-unknown-plan9 | |
1481 | ;; | |
1366 | else | |
1367 | UNAME_MACHINE="$cputype" | |
1368 | fi | |
1369 | echo "$UNAME_MACHINE"-unknown-plan9 | |
1370 | exit ;; | |
1482 | 1371 | *:TOPS-10:*:*) |
1483 | GUESS=pdp10-unknown-tops10 | |
1484 | ;; | |
1372 | echo pdp10-unknown-tops10 | |
1373 | exit ;; | |
1485 | 1374 | *:TENEX:*:*) |
1486 | GUESS=pdp10-unknown-tenex | |
1487 | ;; | |
1375 | echo pdp10-unknown-tenex | |
1376 | exit ;; | |
1488 | 1377 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
1489 | GUESS=pdp10-dec-tops20 | |
1490 | ;; | |
1378 | echo pdp10-dec-tops20 | |
1379 | exit ;; | |
1491 | 1380 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
1492 | GUESS=pdp10-xkl-tops20 | |
1493 | ;; | |
1381 | echo pdp10-xkl-tops20 | |
1382 | exit ;; | |
1494 | 1383 | *:TOPS-20:*:*) |
1495 | GUESS=pdp10-unknown-tops20 | |
1496 | ;; | |
1384 | echo pdp10-unknown-tops20 | |
1385 | exit ;; | |
1497 | 1386 | *:ITS:*:*) |
1498 | GUESS=pdp10-unknown-its | |
1499 | ;; | |
1387 | echo pdp10-unknown-its | |
1388 | exit ;; | |
1500 | 1389 | SEI:*:*:SEIUX) |
1501 | GUESS=mips-sei-seiux$UNAME_RELEASE | |
1502 | ;; | |
1390 | echo mips-sei-seiux"$UNAME_RELEASE" | |
1391 | exit ;; | |
1503 | 1392 | *:DragonFly:*:*) |
1504 | DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
1505 | GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL | |
1506 | ;; | |
1393 | echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
1394 | exit ;; | |
1507 | 1395 | *:*VMS:*:*) |
1508 | 1396 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1509 | case $UNAME_MACHINE in | |
1510 | A*) GUESS=alpha-dec-vms ;; | |
1511 | I*) GUESS=ia64-dec-vms ;; | |
1512 | V*) GUESS=vax-dec-vms ;; | |
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 ;; | |
1513 | 1401 | esac ;; |
1514 | 1402 | *:XENIX:*:SysV) |
1515 | GUESS=i386-pc-xenix | |
1516 | ;; | |
1403 | echo i386-pc-xenix | |
1404 | exit ;; | |
1517 | 1405 | i*86:skyos:*:*) |
1518 | SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` | |
1519 | GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL | |
1520 | ;; | |
1406 | echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" | |
1407 | exit ;; | |
1521 | 1408 | i*86:rdos:*:*) |
1522 | GUESS=$UNAME_MACHINE-pc-rdos | |
1523 | ;; | |
1524 | *:AROS:*:*) | |
1525 | GUESS=$UNAME_MACHINE-unknown-aros | |
1526 | ;; | |
1409 | echo "$UNAME_MACHINE"-pc-rdos | |
1410 | exit ;; | |
1411 | i*86:AROS:*:*) | |
1412 | echo "$UNAME_MACHINE"-pc-aros | |
1413 | exit ;; | |
1527 | 1414 | x86_64:VMkernel:*:*) |
1528 | GUESS=$UNAME_MACHINE-unknown-esx | |
1529 | ;; | |
1415 | echo "$UNAME_MACHINE"-unknown-esx | |
1416 | exit ;; | |
1530 | 1417 | amd64:Isilon\ OneFS:*:*) |
1531 | GUESS=x86_64-unknown-onefs | |
1532 | ;; | |
1533 | *:Unleashed:*:*) | |
1534 | GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE | |
1535 | ;; | |
1418 | echo x86_64-unknown-onefs | |
1419 | exit ;; | |
1536 | 1420 | esac |
1537 | 1421 | |
1538 | # Do we have a guess based on uname results? | |
1539 | if test "x$GUESS" != x; then | |
1540 | echo "$GUESS" | |
1541 | exit | |
1542 | fi | |
1543 | ||
1544 | # No uname command or uname output not recognized. | |
1545 | set_cc_for_build | |
1546 | cat > "$dummy.c" <<EOF | |
1547 | #ifdef _SEQUENT_ | |
1548 | #include <sys/types.h> | |
1549 | #include <sys/utsname.h> | |
1550 | #endif | |
1551 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1552 | #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1553 | #include <signal.h> | |
1554 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1555 | #include <sys/utsname.h> | |
1556 | #endif | |
1557 | #endif | |
1558 | #endif | |
1559 | main () | |
1560 | { | |
1561 | #if defined (sony) | |
1562 | #if defined (MIPSEB) | |
1563 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | |
1564 | I don't know.... */ | |
1565 | printf ("mips-sony-bsd\n"); exit (0); | |
1566 | #else | |
1567 | #include <sys/param.h> | |
1568 | printf ("m68k-sony-newsos%s\n", | |
1569 | #ifdef NEWSOS4 | |
1570 | "4" | |
1571 | #else | |
1572 | "" | |
1573 | #endif | |
1574 | ); exit (0); | |
1575 | #endif | |
1576 | #endif | |
1577 | ||
1578 | #if defined (NeXT) | |
1579 | #if !defined (__ARCHITECTURE__) | |
1580 | #define __ARCHITECTURE__ "m68k" | |
1581 | #endif | |
1582 | int version; | |
1583 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | |
1584 | if (version < 4) | |
1585 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
1586 | else | |
1587 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
1588 | exit (0); | |
1589 | #endif | |
1590 | ||
1591 | #if defined (MULTIMAX) || defined (n16) | |
1592 | #if defined (UMAXV) | |
1593 | printf ("ns32k-encore-sysv\n"); exit (0); | |
1594 | #else | |
1595 | #if defined (CMU) | |
1596 | printf ("ns32k-encore-mach\n"); exit (0); | |
1597 | #else | |
1598 | printf ("ns32k-encore-bsd\n"); exit (0); | |
1599 | #endif | |
1600 | #endif | |
1601 | #endif | |
1602 | ||
1603 | #if defined (__386BSD__) | |
1604 | printf ("i386-pc-bsd\n"); exit (0); | |
1605 | #endif | |
1606 | ||
1607 | #if defined (sequent) | |
1608 | #if defined (i386) | |
1609 | printf ("i386-sequent-dynix\n"); exit (0); | |
1610 | #endif | |
1611 | #if defined (ns32000) | |
1612 | printf ("ns32k-sequent-dynix\n"); exit (0); | |
1613 | #endif | |
1614 | #endif | |
1615 | ||
1616 | #if defined (_SEQUENT_) | |
1617 | struct utsname un; | |
1618 | ||
1619 | uname(&un); | |
1620 | if (strncmp(un.version, "V2", 2) == 0) { | |
1621 | printf ("i386-sequent-ptx2\n"); exit (0); | |
1622 | } | |
1623 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1624 | printf ("i386-sequent-ptx1\n"); exit (0); | |
1625 | } | |
1626 | printf ("i386-sequent-ptx\n"); exit (0); | |
1627 | #endif | |
1628 | ||
1629 | #if defined (vax) | |
1630 | #if !defined (ultrix) | |
1631 | #include <sys/param.h> | |
1632 | #if defined (BSD) | |
1633 | #if BSD == 43 | |
1634 | printf ("vax-dec-bsd4.3\n"); exit (0); | |
1635 | #else | |
1636 | #if BSD == 199006 | |
1637 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1638 | #else | |
1639 | printf ("vax-dec-bsd\n"); exit (0); | |
1640 | #endif | |
1641 | #endif | |
1642 | #else | |
1643 | printf ("vax-dec-bsd\n"); exit (0); | |
1644 | #endif | |
1645 | #else | |
1646 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1647 | struct utsname un; | |
1648 | uname (&un); | |
1649 | printf ("vax-dec-ultrix%s\n", un.release); exit (0); | |
1650 | #else | |
1651 | printf ("vax-dec-ultrix\n"); exit (0); | |
1652 | #endif | |
1653 | #endif | |
1654 | #endif | |
1655 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1656 | #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1657 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1658 | struct utsname *un; | |
1659 | uname (&un); | |
1660 | printf ("mips-dec-ultrix%s\n", un.release); exit (0); | |
1661 | #else | |
1662 | printf ("mips-dec-ultrix\n"); exit (0); | |
1663 | #endif | |
1664 | #endif | |
1665 | #endif | |
1666 | ||
1667 | #if defined (alliant) && defined (i860) | |
1668 | printf ("i860-alliant-bsd\n"); exit (0); | |
1669 | #endif | |
1670 | ||
1671 | exit (1); | |
1672 | } | |
1673 | EOF | |
1674 | ||
1675 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && | |
1676 | { echo "$SYSTEM_NAME"; exit; } | |
1677 | ||
1678 | # Apollos put the system type in the environment. | |
1679 | test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } | |
1680 | ||
1681 | 1422 | echo "$0: unable to guess system type" >&2 |
1682 | 1423 | |
1683 | case $UNAME_MACHINE:$UNAME_SYSTEM in | |
1424 | case "$UNAME_MACHINE:$UNAME_SYSTEM" in | |
1684 | 1425 | mips:Linux | mips64:Linux) |
1685 | 1426 | # If we got here on MIPS GNU/Linux, output extra information. |
1686 | 1427 | cat >&2 <<EOF |
1697 | 1438 | operating system you are using. If your script is old, overwrite *all* |
1698 | 1439 | copies of config.guess and config.sub with the latest versions from: |
1699 | 1440 | |
1700 | https://git.savannah.gnu.org/cgit/config.git/plain/config.guess | |
1441 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
1701 | 1442 | and |
1702 | https://git.savannah.gnu.org/cgit/config.git/plain/config.sub | |
1703 | EOF | |
1704 | ||
1705 | our_year=`echo $timestamp | sed 's,-.*,,'` | |
1706 | thisyear=`date +%Y` | |
1707 | # shellcheck disable=SC2003 | |
1708 | script_age=`expr "$thisyear" - "$our_year"` | |
1709 | if test "$script_age" -lt 3 ; then | |
1710 | cat >&2 <<EOF | |
1443 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
1711 | 1444 | |
1712 | 1445 | If $0 has already been updated, send the following data and any |
1713 | 1446 | information you think might be pertinent to config-patches@gnu.org to |
1735 | 1468 | UNAME_SYSTEM = "$UNAME_SYSTEM" |
1736 | 1469 | UNAME_VERSION = "$UNAME_VERSION" |
1737 | 1470 | EOF |
1738 | fi | |
1739 | 1471 | |
1740 | 1472 | exit 1 |
1741 | 1473 | |
1742 | 1474 | # Local variables: |
1743 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1475 | # eval: (add-hook 'write-file-functions 'time-stamp) | |
1744 | 1476 | # time-stamp-start: "timestamp='" |
1745 | 1477 | # time-stamp-format: "%:y-%02m-%02d" |
1746 | 1478 | # time-stamp-end: "'" |
0 | 0 | #! /bin/sh |
1 | 1 | # Configuration validation subroutine script. |
2 | # Copyright 1992-2021 Free Software Foundation, Inc. | |
3 | ||
4 | # shellcheck disable=SC2006,SC2268 # see below for rationale | |
5 | ||
6 | timestamp='2021-07-03' | |
2 | # Copyright 1992-2018 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2018-02-22' | |
7 | 5 | |
8 | 6 | # This file is free software; you can redistribute it and/or modify it |
9 | 7 | # under the terms of the GNU General Public License as published by |
34 | 32 | # Otherwise, we print the canonical config type on stdout and succeed. |
35 | 33 | |
36 | 34 | # You can get the latest version of this script from: |
37 | # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub | |
35 | # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
38 | 36 | |
39 | 37 | # This file is supposed to be the same for all GNU packages |
40 | 38 | # and recognize all the CPU types, system types and aliases |
51 | 49 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
52 | 50 | # It is wrong to echo any other type of specification. |
53 | 51 | |
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 | ||
61 | 52 | me=`echo "$0" | sed -e 's,.*/,,'` |
62 | 53 | |
63 | 54 | usage="\ |
75 | 66 | version="\ |
76 | 67 | GNU config.sub ($timestamp) |
77 | 68 | |
78 | Copyright 1992-2021 Free Software Foundation, Inc. | |
69 | Copyright 1992-2018 Free Software Foundation, Inc. | |
79 | 70 | |
80 | 71 | This is free software; see the source for copying conditions. There is NO |
81 | 72 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
97 | 88 | - ) # Use stdin as input. |
98 | 89 | break ;; |
99 | 90 | -* ) |
100 | echo "$me: invalid option $1$help" >&2 | |
91 | echo "$me: invalid option $1$help" | |
101 | 92 | exit 1 ;; |
102 | 93 | |
103 | 94 | *local*) |
118 | 109 | exit 1;; |
119 | 110 | esac |
120 | 111 | |
121 | # Split fields of configuration type | |
122 | # shellcheck disable=SC2162 | |
123 | IFS="-" read field1 field2 field3 field4 <<EOF | |
124 | $1 | |
125 | EOF | |
126 | ||
127 | # Separate into logical components for further validation | |
128 | case $1 in | |
129 | *-*-*-*-*) | |
130 | echo Invalid configuration \`"$1"\': more than four components >&2 | |
131 | exit 1 | |
132 | ;; | |
133 | *-*-*-*) | |
134 | basic_machine=$field1-$field2 | |
135 | basic_os=$field3-$field4 | |
136 | ;; | |
137 | *-*-*) | |
138 | # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two | |
139 | # parts | |
140 | maybe_os=$field2-$field3 | |
141 | case $maybe_os in | |
142 | nto-qnx* | linux-* | uclinux-uclibc* \ | |
143 | | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | |
144 | | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | |
145 | | storm-chaos* | os2-emx* | rtmk-nova*) | |
146 | basic_machine=$field1 | |
147 | basic_os=$maybe_os | |
148 | ;; | |
149 | android-linux) | |
150 | basic_machine=$field1-unknown | |
151 | basic_os=linux-android | |
152 | ;; | |
153 | *) | |
154 | basic_machine=$field1-$field2 | |
155 | basic_os=$field3 | |
156 | ;; | |
157 | esac | |
158 | ;; | |
159 | *-*) | |
160 | # A lone config we happen to match not fitting any pattern | |
161 | case $field1-$field2 in | |
162 | decstation-3100) | |
163 | basic_machine=mips-dec | |
164 | basic_os= | |
165 | ;; | |
166 | *-*) | |
167 | # Second component is usually, but not always the OS | |
168 | case $field2 in | |
169 | # Prevent following clause from handling this valid os | |
170 | sun*os*) | |
171 | basic_machine=$field1 | |
172 | basic_os=$field2 | |
173 | ;; | |
174 | # Manufacturers | |
175 | dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | |
176 | | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | |
177 | | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | |
178 | | convergent* | ncr* | news | 32* | 3600* | 3100* \ | |
179 | | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | |
180 | | ultra | tti* | harris | dolphin | highlevel | gould \ | |
181 | | cbm | ns | masscomp | apple | axis | knuth | cray \ | |
182 | | microblaze* | sim | cisco \ | |
183 | | oki | wec | wrs | winbond) | |
184 | basic_machine=$field1-$field2 | |
185 | basic_os= | |
186 | ;; | |
187 | *) | |
188 | basic_machine=$field1 | |
189 | basic_os=$field2 | |
190 | ;; | |
191 | esac | |
192 | ;; | |
193 | esac | |
194 | ;; | |
195 | *) | |
196 | # Convert single-component short-hands not valid as part of | |
197 | # multi-component configurations. | |
198 | case $field1 in | |
199 | 386bsd) | |
200 | basic_machine=i386-pc | |
201 | basic_os=bsd | |
202 | ;; | |
203 | a29khif) | |
204 | basic_machine=a29k-amd | |
205 | basic_os=udi | |
206 | ;; | |
207 | adobe68k) | |
208 | basic_machine=m68010-adobe | |
209 | basic_os=scout | |
210 | ;; | |
211 | alliant) | |
212 | basic_machine=fx80-alliant | |
213 | basic_os= | |
214 | ;; | |
215 | altos | altos3068) | |
216 | basic_machine=m68k-altos | |
217 | basic_os= | |
218 | ;; | |
219 | am29k) | |
220 | basic_machine=a29k-none | |
221 | basic_os=bsd | |
222 | ;; | |
223 | amdahl) | |
224 | basic_machine=580-amdahl | |
225 | basic_os=sysv | |
226 | ;; | |
227 | amiga) | |
228 | basic_machine=m68k-unknown | |
229 | basic_os= | |
230 | ;; | |
231 | amigaos | amigados) | |
232 | basic_machine=m68k-unknown | |
233 | basic_os=amigaos | |
234 | ;; | |
235 | amigaunix | amix) | |
236 | basic_machine=m68k-unknown | |
237 | basic_os=sysv4 | |
238 | ;; | |
239 | apollo68) | |
240 | basic_machine=m68k-apollo | |
241 | basic_os=sysv | |
242 | ;; | |
243 | apollo68bsd) | |
244 | basic_machine=m68k-apollo | |
245 | basic_os=bsd | |
246 | ;; | |
247 | aros) | |
248 | basic_machine=i386-pc | |
249 | basic_os=aros | |
250 | ;; | |
251 | aux) | |
252 | basic_machine=m68k-apple | |
253 | basic_os=aux | |
254 | ;; | |
255 | balance) | |
256 | basic_machine=ns32k-sequent | |
257 | basic_os=dynix | |
258 | ;; | |
259 | blackfin) | |
260 | basic_machine=bfin-unknown | |
261 | basic_os=linux | |
262 | ;; | |
263 | cegcc) | |
264 | basic_machine=arm-unknown | |
265 | basic_os=cegcc | |
266 | ;; | |
267 | convex-c1) | |
268 | basic_machine=c1-convex | |
269 | basic_os=bsd | |
270 | ;; | |
271 | convex-c2) | |
272 | basic_machine=c2-convex | |
273 | basic_os=bsd | |
274 | ;; | |
275 | convex-c32) | |
276 | basic_machine=c32-convex | |
277 | basic_os=bsd | |
278 | ;; | |
279 | convex-c34) | |
280 | basic_machine=c34-convex | |
281 | basic_os=bsd | |
282 | ;; | |
283 | convex-c38) | |
284 | basic_machine=c38-convex | |
285 | basic_os=bsd | |
286 | ;; | |
287 | cray) | |
288 | basic_machine=j90-cray | |
289 | basic_os=unicos | |
290 | ;; | |
291 | crds | unos) | |
292 | basic_machine=m68k-crds | |
293 | basic_os= | |
294 | ;; | |
295 | da30) | |
296 | basic_machine=m68k-da30 | |
297 | basic_os= | |
298 | ;; | |
299 | decstation | pmax | pmin | dec3100 | decstatn) | |
300 | basic_machine=mips-dec | |
301 | basic_os= | |
302 | ;; | |
303 | delta88) | |
304 | basic_machine=m88k-motorola | |
305 | basic_os=sysv3 | |
306 | ;; | |
307 | dicos) | |
308 | basic_machine=i686-pc | |
309 | basic_os=dicos | |
310 | ;; | |
311 | djgpp) | |
312 | basic_machine=i586-pc | |
313 | basic_os=msdosdjgpp | |
314 | ;; | |
315 | ebmon29k) | |
316 | basic_machine=a29k-amd | |
317 | basic_os=ebmon | |
318 | ;; | |
319 | es1800 | OSE68k | ose68k | ose | OSE) | |
320 | basic_machine=m68k-ericsson | |
321 | basic_os=ose | |
322 | ;; | |
323 | gmicro) | |
324 | basic_machine=tron-gmicro | |
325 | basic_os=sysv | |
326 | ;; | |
327 | go32) | |
328 | basic_machine=i386-pc | |
329 | basic_os=go32 | |
330 | ;; | |
331 | h8300hms) | |
332 | basic_machine=h8300-hitachi | |
333 | basic_os=hms | |
334 | ;; | |
335 | h8300xray) | |
336 | basic_machine=h8300-hitachi | |
337 | basic_os=xray | |
338 | ;; | |
339 | h8500hms) | |
340 | basic_machine=h8500-hitachi | |
341 | basic_os=hms | |
342 | ;; | |
343 | harris) | |
344 | basic_machine=m88k-harris | |
345 | basic_os=sysv3 | |
346 | ;; | |
347 | hp300 | hp300hpux) | |
348 | basic_machine=m68k-hp | |
349 | basic_os=hpux | |
350 | ;; | |
351 | hp300bsd) | |
352 | basic_machine=m68k-hp | |
353 | basic_os=bsd | |
354 | ;; | |
355 | hppaosf) | |
356 | basic_machine=hppa1.1-hp | |
357 | basic_os=osf | |
358 | ;; | |
359 | hppro) | |
360 | basic_machine=hppa1.1-hp | |
361 | basic_os=proelf | |
362 | ;; | |
363 | i386mach) | |
364 | basic_machine=i386-mach | |
365 | basic_os=mach | |
366 | ;; | |
367 | isi68 | isi) | |
368 | basic_machine=m68k-isi | |
369 | basic_os=sysv | |
370 | ;; | |
371 | m68knommu) | |
372 | basic_machine=m68k-unknown | |
373 | basic_os=linux | |
374 | ;; | |
375 | magnum | m3230) | |
376 | basic_machine=mips-mips | |
377 | basic_os=sysv | |
378 | ;; | |
379 | merlin) | |
380 | basic_machine=ns32k-utek | |
381 | basic_os=sysv | |
382 | ;; | |
383 | mingw64) | |
384 | basic_machine=x86_64-pc | |
385 | basic_os=mingw64 | |
386 | ;; | |
387 | mingw32) | |
388 | basic_machine=i686-pc | |
389 | basic_os=mingw32 | |
390 | ;; | |
391 | mingw32ce) | |
392 | basic_machine=arm-unknown | |
393 | basic_os=mingw32ce | |
394 | ;; | |
395 | monitor) | |
396 | basic_machine=m68k-rom68k | |
397 | basic_os=coff | |
398 | ;; | |
399 | morphos) | |
400 | basic_machine=powerpc-unknown | |
401 | basic_os=morphos | |
402 | ;; | |
403 | moxiebox) | |
404 | basic_machine=moxie-unknown | |
405 | basic_os=moxiebox | |
406 | ;; | |
407 | msdos) | |
408 | basic_machine=i386-pc | |
409 | basic_os=msdos | |
410 | ;; | |
411 | msys) | |
412 | basic_machine=i686-pc | |
413 | basic_os=msys | |
414 | ;; | |
415 | mvs) | |
416 | basic_machine=i370-ibm | |
417 | basic_os=mvs | |
418 | ;; | |
419 | nacl) | |
420 | basic_machine=le32-unknown | |
421 | basic_os=nacl | |
422 | ;; | |
423 | ncr3000) | |
424 | basic_machine=i486-ncr | |
425 | basic_os=sysv4 | |
426 | ;; | |
427 | netbsd386) | |
428 | basic_machine=i386-pc | |
429 | basic_os=netbsd | |
430 | ;; | |
431 | netwinder) | |
432 | basic_machine=armv4l-rebel | |
433 | basic_os=linux | |
434 | ;; | |
435 | news | news700 | news800 | news900) | |
436 | basic_machine=m68k-sony | |
437 | basic_os=newsos | |
438 | ;; | |
439 | news1000) | |
440 | basic_machine=m68030-sony | |
441 | basic_os=newsos | |
442 | ;; | |
443 | necv70) | |
444 | basic_machine=v70-nec | |
445 | basic_os=sysv | |
446 | ;; | |
447 | nh3000) | |
448 | basic_machine=m68k-harris | |
449 | basic_os=cxux | |
450 | ;; | |
451 | nh[45]000) | |
452 | basic_machine=m88k-harris | |
453 | basic_os=cxux | |
454 | ;; | |
455 | nindy960) | |
456 | basic_machine=i960-intel | |
457 | basic_os=nindy | |
458 | ;; | |
459 | mon960) | |
460 | basic_machine=i960-intel | |
461 | basic_os=mon960 | |
462 | ;; | |
463 | nonstopux) | |
464 | basic_machine=mips-compaq | |
465 | basic_os=nonstopux | |
466 | ;; | |
467 | os400) | |
468 | basic_machine=powerpc-ibm | |
469 | basic_os=os400 | |
470 | ;; | |
471 | OSE68000 | ose68000) | |
472 | basic_machine=m68000-ericsson | |
473 | basic_os=ose | |
474 | ;; | |
475 | os68k) | |
476 | basic_machine=m68k-none | |
477 | basic_os=os68k | |
478 | ;; | |
479 | paragon) | |
480 | basic_machine=i860-intel | |
481 | basic_os=osf | |
482 | ;; | |
483 | parisc) | |
484 | basic_machine=hppa-unknown | |
485 | basic_os=linux | |
486 | ;; | |
487 | psp) | |
488 | basic_machine=mipsallegrexel-sony | |
489 | basic_os=psp | |
490 | ;; | |
491 | pw32) | |
492 | basic_machine=i586-unknown | |
493 | basic_os=pw32 | |
494 | ;; | |
495 | rdos | rdos64) | |
496 | basic_machine=x86_64-pc | |
497 | basic_os=rdos | |
498 | ;; | |
499 | rdos32) | |
500 | basic_machine=i386-pc | |
501 | basic_os=rdos | |
502 | ;; | |
503 | rom68k) | |
504 | basic_machine=m68k-rom68k | |
505 | basic_os=coff | |
506 | ;; | |
507 | sa29200) | |
508 | basic_machine=a29k-amd | |
509 | basic_os=udi | |
510 | ;; | |
511 | sei) | |
512 | basic_machine=mips-sei | |
513 | basic_os=seiux | |
514 | ;; | |
515 | sequent) | |
516 | basic_machine=i386-sequent | |
517 | basic_os= | |
518 | ;; | |
519 | sps7) | |
520 | basic_machine=m68k-bull | |
521 | basic_os=sysv2 | |
522 | ;; | |
523 | st2000) | |
524 | basic_machine=m68k-tandem | |
525 | basic_os= | |
526 | ;; | |
527 | stratus) | |
528 | basic_machine=i860-stratus | |
529 | basic_os=sysv4 | |
530 | ;; | |
531 | sun2) | |
532 | basic_machine=m68000-sun | |
533 | basic_os= | |
534 | ;; | |
535 | sun2os3) | |
536 | basic_machine=m68000-sun | |
537 | basic_os=sunos3 | |
538 | ;; | |
539 | sun2os4) | |
540 | basic_machine=m68000-sun | |
541 | basic_os=sunos4 | |
542 | ;; | |
543 | sun3) | |
544 | basic_machine=m68k-sun | |
545 | basic_os= | |
546 | ;; | |
547 | sun3os3) | |
548 | basic_machine=m68k-sun | |
549 | basic_os=sunos3 | |
550 | ;; | |
551 | sun3os4) | |
552 | basic_machine=m68k-sun | |
553 | basic_os=sunos4 | |
554 | ;; | |
555 | sun4) | |
556 | basic_machine=sparc-sun | |
557 | basic_os= | |
558 | ;; | |
559 | sun4os3) | |
560 | basic_machine=sparc-sun | |
561 | basic_os=sunos3 | |
562 | ;; | |
563 | sun4os4) | |
564 | basic_machine=sparc-sun | |
565 | basic_os=sunos4 | |
566 | ;; | |
567 | sun4sol2) | |
568 | basic_machine=sparc-sun | |
569 | basic_os=solaris2 | |
570 | ;; | |
571 | sun386 | sun386i | roadrunner) | |
572 | basic_machine=i386-sun | |
573 | basic_os= | |
574 | ;; | |
575 | sv1) | |
576 | basic_machine=sv1-cray | |
577 | basic_os=unicos | |
578 | ;; | |
579 | symmetry) | |
580 | basic_machine=i386-sequent | |
581 | basic_os=dynix | |
582 | ;; | |
583 | t3e) | |
584 | basic_machine=alphaev5-cray | |
585 | basic_os=unicos | |
586 | ;; | |
587 | t90) | |
588 | basic_machine=t90-cray | |
589 | basic_os=unicos | |
590 | ;; | |
591 | toad1) | |
592 | basic_machine=pdp10-xkl | |
593 | basic_os=tops20 | |
594 | ;; | |
595 | tpf) | |
596 | basic_machine=s390x-ibm | |
597 | basic_os=tpf | |
598 | ;; | |
599 | udi29k) | |
600 | basic_machine=a29k-amd | |
601 | basic_os=udi | |
602 | ;; | |
603 | ultra3) | |
604 | basic_machine=a29k-nyu | |
605 | basic_os=sym1 | |
606 | ;; | |
607 | v810 | necv810) | |
608 | basic_machine=v810-nec | |
609 | basic_os=none | |
610 | ;; | |
611 | vaxv) | |
612 | basic_machine=vax-dec | |
613 | basic_os=sysv | |
614 | ;; | |
615 | vms) | |
616 | basic_machine=vax-dec | |
617 | basic_os=vms | |
618 | ;; | |
619 | vsta) | |
620 | basic_machine=i386-pc | |
621 | basic_os=vsta | |
622 | ;; | |
623 | vxworks960) | |
624 | basic_machine=i960-wrs | |
625 | basic_os=vxworks | |
626 | ;; | |
627 | vxworks68) | |
628 | basic_machine=m68k-wrs | |
629 | basic_os=vxworks | |
630 | ;; | |
631 | vxworks29k) | |
632 | basic_machine=a29k-wrs | |
633 | basic_os=vxworks | |
634 | ;; | |
635 | xbox) | |
636 | basic_machine=i686-pc | |
637 | basic_os=mingw32 | |
638 | ;; | |
639 | ymp) | |
640 | basic_machine=ymp-cray | |
641 | basic_os=unicos | |
642 | ;; | |
643 | *) | |
644 | basic_machine=$1 | |
645 | basic_os= | |
646 | ;; | |
647 | esac | |
648 | ;; | |
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 | ;; | |
649 | 134 | esac |
650 | 135 | |
651 | # Decode 1-component or ad-hoc basic machines | |
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. | |
652 | 241 | case $basic_machine in |
653 | # Here we handle the default manufacturer of certain CPU types. It is in | |
654 | # some cases the only manufacturer, in others, it is the most popular. | |
655 | w89k) | |
656 | cpu=hppa1.1 | |
657 | vendor=winbond | |
658 | ;; | |
659 | op50n) | |
660 | cpu=hppa1.1 | |
661 | vendor=oki | |
662 | ;; | |
663 | op60c) | |
664 | cpu=hppa1.1 | |
665 | vendor=oki | |
666 | ;; | |
667 | ibm*) | |
668 | cpu=i370 | |
669 | vendor=ibm | |
670 | ;; | |
671 | orion105) | |
672 | cpu=clipper | |
673 | vendor=highlevel | |
674 | ;; | |
675 | mac | mpw | mac-mpw) | |
676 | cpu=m68k | |
677 | vendor=apple | |
678 | ;; | |
679 | pmac | pmac-mpw) | |
680 | cpu=powerpc | |
681 | vendor=apple | |
682 | ;; | |
683 | ||
684 | # Recognize the various machine names and aliases which stand | |
685 | # for a CPU type and a company and sometimes even an OS. | |
686 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
687 | cpu=m68000 | |
688 | vendor=att | |
689 | ;; | |
690 | 3b*) | |
691 | cpu=we32k | |
692 | vendor=att | |
693 | ;; | |
694 | bluegene*) | |
695 | cpu=powerpc | |
696 | vendor=ibm | |
697 | basic_os=cnk | |
698 | ;; | |
699 | decsystem10* | dec10*) | |
700 | cpu=pdp10 | |
701 | vendor=dec | |
702 | basic_os=tops10 | |
703 | ;; | |
704 | decsystem20* | dec20*) | |
705 | cpu=pdp10 | |
706 | vendor=dec | |
707 | basic_os=tops20 | |
708 | ;; | |
709 | delta | 3300 | motorola-3300 | motorola-delta \ | |
710 | | 3300-motorola | delta-motorola) | |
711 | cpu=m68k | |
712 | vendor=motorola | |
713 | ;; | |
714 | dpx2*) | |
715 | cpu=m68k | |
716 | vendor=bull | |
717 | basic_os=sysv3 | |
718 | ;; | |
719 | encore | umax | mmax) | |
720 | cpu=ns32k | |
721 | vendor=encore | |
722 | ;; | |
723 | elxsi) | |
724 | cpu=elxsi | |
725 | vendor=elxsi | |
726 | basic_os=${basic_os:-bsd} | |
727 | ;; | |
728 | fx2800) | |
729 | cpu=i860 | |
730 | vendor=alliant | |
731 | ;; | |
732 | genix) | |
733 | cpu=ns32k | |
734 | vendor=ns | |
735 | ;; | |
736 | h3050r* | hiux*) | |
737 | cpu=hppa1.1 | |
738 | vendor=hitachi | |
739 | basic_os=hiuxwe2 | |
740 | ;; | |
741 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
742 | cpu=hppa1.0 | |
743 | vendor=hp | |
744 | ;; | |
745 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
746 | cpu=m68000 | |
747 | vendor=hp | |
748 | ;; | |
749 | hp9k3[2-9][0-9]) | |
750 | cpu=m68k | |
751 | vendor=hp | |
752 | ;; | |
753 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
754 | cpu=hppa1.0 | |
755 | vendor=hp | |
756 | ;; | |
757 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
758 | cpu=hppa1.1 | |
759 | vendor=hp | |
760 | ;; | |
761 | hp9k78[0-9] | hp78[0-9]) | |
762 | # FIXME: really hppa2.0-hp | |
763 | cpu=hppa1.1 | |
764 | vendor=hp | |
765 | ;; | |
766 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
767 | # FIXME: really hppa2.0-hp | |
768 | cpu=hppa1.1 | |
769 | vendor=hp | |
770 | ;; | |
771 | hp9k8[0-9][13679] | hp8[0-9][13679]) | |
772 | cpu=hppa1.1 | |
773 | vendor=hp | |
774 | ;; | |
775 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
776 | cpu=hppa1.0 | |
777 | vendor=hp | |
778 | ;; | |
779 | i*86v32) | |
780 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
781 | vendor=pc | |
782 | basic_os=sysv32 | |
783 | ;; | |
784 | i*86v4*) | |
785 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
786 | vendor=pc | |
787 | basic_os=sysv4 | |
788 | ;; | |
789 | i*86v) | |
790 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
791 | vendor=pc | |
792 | basic_os=sysv | |
793 | ;; | |
794 | i*86sol2) | |
795 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
796 | vendor=pc | |
797 | basic_os=solaris2 | |
798 | ;; | |
799 | j90 | j90-cray) | |
800 | cpu=j90 | |
801 | vendor=cray | |
802 | basic_os=${basic_os:-unicos} | |
803 | ;; | |
804 | iris | iris4d) | |
805 | cpu=mips | |
806 | vendor=sgi | |
807 | case $basic_os in | |
808 | irix*) | |
809 | ;; | |
810 | *) | |
811 | basic_os=irix4 | |
812 | ;; | |
813 | esac | |
814 | ;; | |
815 | miniframe) | |
816 | cpu=m68000 | |
817 | vendor=convergent | |
818 | ;; | |
819 | *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
820 | cpu=m68k | |
821 | vendor=atari | |
822 | basic_os=mint | |
823 | ;; | |
824 | news-3600 | risc-news) | |
825 | cpu=mips | |
826 | vendor=sony | |
827 | basic_os=newsos | |
828 | ;; | |
829 | next | m*-next) | |
830 | cpu=m68k | |
831 | vendor=next | |
832 | case $basic_os in | |
833 | openstep*) | |
834 | ;; | |
835 | nextstep*) | |
836 | ;; | |
837 | ns2*) | |
838 | basic_os=nextstep2 | |
839 | ;; | |
840 | *) | |
841 | basic_os=nextstep3 | |
842 | ;; | |
843 | esac | |
844 | ;; | |
845 | np1) | |
846 | cpu=np1 | |
847 | vendor=gould | |
848 | ;; | |
849 | op50n-* | op60c-*) | |
850 | cpu=hppa1.1 | |
851 | vendor=oki | |
852 | basic_os=proelf | |
853 | ;; | |
854 | pa-hitachi) | |
855 | cpu=hppa1.1 | |
856 | vendor=hitachi | |
857 | basic_os=hiuxwe2 | |
858 | ;; | |
859 | pbd) | |
860 | cpu=sparc | |
861 | vendor=tti | |
862 | ;; | |
863 | pbb) | |
864 | cpu=m68k | |
865 | vendor=tti | |
866 | ;; | |
867 | pc532) | |
868 | cpu=ns32k | |
869 | vendor=pc532 | |
870 | ;; | |
871 | pn) | |
872 | cpu=pn | |
873 | vendor=gould | |
874 | ;; | |
875 | power) | |
876 | cpu=power | |
877 | vendor=ibm | |
878 | ;; | |
879 | ps2) | |
880 | cpu=i386 | |
881 | vendor=ibm | |
882 | ;; | |
883 | rm[46]00) | |
884 | cpu=mips | |
885 | vendor=siemens | |
886 | ;; | |
887 | rtpc | rtpc-*) | |
888 | cpu=romp | |
889 | vendor=ibm | |
890 | ;; | |
891 | sde) | |
892 | cpu=mipsisa32 | |
893 | vendor=sde | |
894 | basic_os=${basic_os:-elf} | |
895 | ;; | |
896 | simso-wrs) | |
897 | cpu=sparclite | |
898 | vendor=wrs | |
899 | basic_os=vxworks | |
900 | ;; | |
901 | tower | tower-32) | |
902 | cpu=m68k | |
903 | vendor=ncr | |
904 | ;; | |
905 | vpp*|vx|vx-*) | |
906 | cpu=f301 | |
907 | vendor=fujitsu | |
908 | ;; | |
909 | w65) | |
910 | cpu=w65 | |
911 | vendor=wdc | |
912 | ;; | |
913 | w89k-*) | |
914 | cpu=hppa1.1 | |
915 | vendor=winbond | |
916 | basic_os=proelf | |
917 | ;; | |
918 | none) | |
919 | cpu=none | |
920 | vendor=none | |
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 | |
921 | 327 | ;; |
922 | 328 | leon|leon[3-9]) |
923 | cpu=sparc | |
924 | vendor=$basic_machine | |
925 | ;; | |
926 | leon-*|leon[3-9]-*) | |
927 | cpu=sparc | |
928 | vendor=`echo "$basic_machine" | sed 's/-.*//'` | |
929 | ;; | |
930 | ||
931 | *-*) | |
932 | # shellcheck disable=SC2162 | |
933 | IFS="-" read cpu vendor <<EOF | |
934 | $basic_machine | |
935 | EOF | |
936 | ;; | |
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 | ||
937 | 356 | # We use `pc' rather than `unknown' |
938 | 357 | # because (1) that's what they normally are, and |
939 | 358 | # (2) the word "unknown" tends to confuse beginning users. |
940 | 359 | i*86 | x86_64) |
941 | cpu=$basic_machine | |
942 | vendor=pc | |
943 | ;; | |
944 | # These rules are duplicated from below for sake of the special case above; | |
945 | # i.e. things that normalized to x86 arches should also default to "pc" | |
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 | ;; | |
492 | 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 | |
536 | ;; | |
537 | blackfin-*) | |
538 | basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
539 | os=-linux | |
540 | ;; | |
541 | bluegene*) | |
542 | basic_machine=powerpc-ibm | |
543 | os=-cnk | |
544 | ;; | |
545 | c54x-*) | |
546 | basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
547 | ;; | |
548 | c55x-*) | |
549 | basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
550 | ;; | |
551 | 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" | |
648 | ;; | |
649 | 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 | ;; | |
785 | esac | |
786 | ;; | |
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 | ;; | |
946 | 992 | pc98) |
947 | cpu=i386 | |
948 | vendor=pc | |
949 | ;; | |
950 | x64 | amd64) | |
951 | cpu=x86_64 | |
952 | vendor=pc | |
953 | ;; | |
954 | # Recognize the basic CPU types without company name. | |
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. | |
1315 | ;; | |
955 | 1316 | *) |
956 | cpu=$basic_machine | |
957 | vendor=unknown | |
1317 | echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 | |
1318 | exit 1 | |
958 | 1319 | ;; |
959 | 1320 | esac |
960 | 1321 | |
961 | unset -v basic_machine | |
962 | ||
963 | # Decode basic machines in the full and proper CPU-Company form. | |
964 | case $cpu-$vendor in | |
965 | # Here we handle the default manufacturer of certain CPU types in canonical form. It is in | |
966 | # some cases the only manufacturer, in others, it is the most popular. | |
967 | craynv-unknown) | |
968 | vendor=cray | |
969 | basic_os=${basic_os:-unicosmp} | |
970 | ;; | |
971 | c90-unknown | c90-cray) | |
972 | vendor=cray | |
973 | basic_os=${Basic_os:-unicos} | |
974 | ;; | |
975 | fx80-unknown) | |
976 | vendor=alliant | |
977 | ;; | |
978 | romp-unknown) | |
979 | vendor=ibm | |
980 | ;; | |
981 | mmix-unknown) | |
982 | vendor=knuth | |
983 | ;; | |
984 | microblaze-unknown | microblazeel-unknown) | |
985 | vendor=xilinx | |
986 | ;; | |
987 | rs6000-unknown) | |
988 | vendor=ibm | |
989 | ;; | |
990 | vax-unknown) | |
991 | vendor=dec | |
992 | ;; | |
993 | pdp11-unknown) | |
994 | vendor=dec | |
995 | ;; | |
996 | we32k-unknown) | |
997 | vendor=att | |
998 | ;; | |
999 | cydra-unknown) | |
1000 | vendor=cydrome | |
1001 | ;; | |
1002 | i370-ibm*) | |
1003 | vendor=ibm | |
1004 | ;; | |
1005 | orion-unknown) | |
1006 | vendor=highlevel | |
1007 | ;; | |
1008 | xps-unknown | xps100-unknown) | |
1009 | cpu=xps100 | |
1010 | vendor=honeywell | |
1011 | ;; | |
1012 | ||
1013 | # Here we normalize CPU types with a missing or matching vendor | |
1014 | dpx20-unknown | dpx20-bull) | |
1015 | cpu=rs6000 | |
1016 | vendor=bull | |
1017 | basic_os=${basic_os:-bosx} | |
1018 | ;; | |
1019 | ||
1020 | # Here we normalize CPU types irrespective of the vendor | |
1021 | amd64-*) | |
1022 | cpu=x86_64 | |
1023 | ;; | |
1024 | blackfin-*) | |
1025 | cpu=bfin | |
1026 | basic_os=linux | |
1027 | ;; | |
1028 | c54x-*) | |
1029 | cpu=tic54x | |
1030 | ;; | |
1031 | c55x-*) | |
1032 | cpu=tic55x | |
1033 | ;; | |
1034 | c6x-*) | |
1035 | cpu=tic6x | |
1036 | ;; | |
1037 | e500v[12]-*) | |
1038 | cpu=powerpc | |
1039 | basic_os=${basic_os}"spe" | |
1040 | ;; | |
1041 | mips3*-*) | |
1042 | cpu=mips64 | |
1043 | ;; | |
1044 | ms1-*) | |
1045 | cpu=mt | |
1046 | ;; | |
1047 | m68knommu-*) | |
1048 | cpu=m68k | |
1049 | basic_os=linux | |
1050 | ;; | |
1051 | m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) | |
1052 | cpu=s12z | |
1053 | ;; | |
1054 | openrisc-*) | |
1055 | cpu=or32 | |
1056 | ;; | |
1057 | parisc-*) | |
1058 | cpu=hppa | |
1059 | basic_os=linux | |
1060 | ;; | |
1061 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
1062 | cpu=i586 | |
1063 | ;; | |
1064 | pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) | |
1065 | cpu=i686 | |
1066 | ;; | |
1067 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
1068 | cpu=i686 | |
1069 | ;; | |
1070 | pentium4-*) | |
1071 | cpu=i786 | |
1072 | ;; | |
1073 | pc98-*) | |
1074 | cpu=i386 | |
1075 | ;; | |
1076 | ppc-* | ppcbe-*) | |
1077 | cpu=powerpc | |
1078 | ;; | |
1079 | ppcle-* | powerpclittle-*) | |
1080 | cpu=powerpcle | |
1081 | ;; | |
1082 | ppc64-*) | |
1083 | cpu=powerpc64 | |
1084 | ;; | |
1085 | ppc64le-* | powerpc64little-*) | |
1086 | cpu=powerpc64le | |
1087 | ;; | |
1088 | sb1-*) | |
1089 | cpu=mipsisa64sb1 | |
1090 | ;; | |
1091 | sb1el-*) | |
1092 | cpu=mipsisa64sb1el | |
1093 | ;; | |
1094 | sh5e[lb]-*) | |
1095 | cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` | |
1096 | ;; | |
1097 | spur-*) | |
1098 | cpu=spur | |
1099 | ;; | |
1100 | strongarm-* | thumb-*) | |
1101 | cpu=arm | |
1102 | ;; | |
1103 | tx39-*) | |
1104 | cpu=mipstx39 | |
1105 | ;; | |
1106 | tx39el-*) | |
1107 | cpu=mipstx39el | |
1108 | ;; | |
1109 | x64-*) | |
1110 | cpu=x86_64 | |
1111 | ;; | |
1112 | xscale-* | xscalee[bl]-*) | |
1113 | cpu=`echo "$cpu" | sed 's/^xscale/arm/'` | |
1114 | ;; | |
1115 | arm64-*) | |
1116 | cpu=aarch64 | |
1117 | ;; | |
1118 | ||
1119 | # Recognize the canonical CPU Types that limit and/or modify the | |
1120 | # company names they are paired with. | |
1121 | cr16-*) | |
1122 | basic_os=${basic_os:-elf} | |
1123 | ;; | |
1124 | crisv32-* | etraxfs*-*) | |
1125 | cpu=crisv32 | |
1126 | vendor=axis | |
1127 | ;; | |
1128 | cris-* | etrax*-*) | |
1129 | cpu=cris | |
1130 | vendor=axis | |
1131 | ;; | |
1132 | crx-*) | |
1133 | basic_os=${basic_os:-elf} | |
1134 | ;; | |
1135 | neo-tandem) | |
1136 | cpu=neo | |
1137 | vendor=tandem | |
1138 | ;; | |
1139 | nse-tandem) | |
1140 | cpu=nse | |
1141 | vendor=tandem | |
1142 | ;; | |
1143 | nsr-tandem) | |
1144 | cpu=nsr | |
1145 | vendor=tandem | |
1146 | ;; | |
1147 | nsv-tandem) | |
1148 | cpu=nsv | |
1149 | vendor=tandem | |
1150 | ;; | |
1151 | nsx-tandem) | |
1152 | cpu=nsx | |
1153 | vendor=tandem | |
1154 | ;; | |
1155 | mipsallegrexel-sony) | |
1156 | cpu=mipsallegrexel | |
1157 | vendor=sony | |
1158 | ;; | |
1159 | tile*-*) | |
1160 | basic_os=${basic_os:-linux-gnu} | |
1161 | ;; | |
1162 | ||
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/'` | |
1329 | ;; | |
1163 | 1330 | *) |
1164 | # Recognize the canonical CPU types that are allowed with any | |
1165 | # company name. | |
1166 | case $cpu in | |
1167 | 1750a | 580 \ | |
1168 | | a29k \ | |
1169 | | aarch64 | aarch64_be \ | |
1170 | | abacus \ | |
1171 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | |
1172 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | |
1173 | | alphapca5[67] | alpha64pca5[67] \ | |
1174 | | am33_2.0 \ | |
1175 | | amdgcn \ | |
1176 | | arc | arceb | arc32 | arc64 \ | |
1177 | | arm | arm[lb]e | arme[lb] | armv* \ | |
1178 | | avr | avr32 \ | |
1179 | | asmjs \ | |
1180 | | ba \ | |
1181 | | be32 | be64 \ | |
1182 | | bfin | bpf | bs2000 \ | |
1183 | | c[123]* | c30 | [cjt]90 | c4x \ | |
1184 | | c8051 | clipper | craynv | csky | cydra \ | |
1185 | | d10v | d30v | dlx | dsp16xx \ | |
1186 | | e2k | elxsi | epiphany \ | |
1187 | | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ | |
1188 | | h8300 | h8500 \ | |
1189 | | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
1190 | | hexagon \ | |
1191 | | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | |
1192 | | ip2k | iq2000 \ | |
1193 | | k1om \ | |
1194 | | le32 | le64 \ | |
1195 | | lm32 \ | |
1196 | | loongarch32 | loongarch64 | loongarchx32 \ | |
1197 | | m32c | m32r | m32rle \ | |
1198 | | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | |
1199 | | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | |
1200 | | m88110 | m88k | maxq | mb | mcore | mep | metag \ | |
1201 | | microblaze | microblazeel \ | |
1202 | | mips | mipsbe | mipseb | mipsel | mipsle \ | |
1203 | | mips16 \ | |
1204 | | mips64 | mips64eb | mips64el \ | |
1205 | | mips64octeon | mips64octeonel \ | |
1206 | | mips64orion | mips64orionel \ | |
1207 | | mips64r5900 | mips64r5900el \ | |
1208 | | mips64vr | mips64vrel \ | |
1209 | | mips64vr4100 | mips64vr4100el \ | |
1210 | | mips64vr4300 | mips64vr4300el \ | |
1211 | | mips64vr5000 | mips64vr5000el \ | |
1212 | | mips64vr5900 | mips64vr5900el \ | |
1213 | | mipsisa32 | mipsisa32el \ | |
1214 | | mipsisa32r2 | mipsisa32r2el \ | |
1215 | | mipsisa32r3 | mipsisa32r3el \ | |
1216 | | mipsisa32r5 | mipsisa32r5el \ | |
1217 | | mipsisa32r6 | mipsisa32r6el \ | |
1218 | | mipsisa64 | mipsisa64el \ | |
1219 | | mipsisa64r2 | mipsisa64r2el \ | |
1220 | | mipsisa64r3 | mipsisa64r3el \ | |
1221 | | mipsisa64r5 | mipsisa64r5el \ | |
1222 | | mipsisa64r6 | mipsisa64r6el \ | |
1223 | | mipsisa64sb1 | mipsisa64sb1el \ | |
1224 | | mipsisa64sr71k | mipsisa64sr71kel \ | |
1225 | | mipsr5900 | mipsr5900el \ | |
1226 | | mipstx39 | mipstx39el \ | |
1227 | | mmix \ | |
1228 | | mn10200 | mn10300 \ | |
1229 | | moxie \ | |
1230 | | mt \ | |
1231 | | msp430 \ | |
1232 | | nds32 | nds32le | nds32be \ | |
1233 | | nfp \ | |
1234 | | nios | nios2 | nios2eb | nios2el \ | |
1235 | | none | np1 | ns16k | ns32k | nvptx \ | |
1236 | | open8 \ | |
1237 | | or1k* \ | |
1238 | | or32 \ | |
1239 | | orion \ | |
1240 | | picochip \ | |
1241 | | pdp10 | pdp11 | pj | pjl | pn | power \ | |
1242 | | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | |
1243 | | pru \ | |
1244 | | pyramid \ | |
1245 | | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ | |
1246 | | rl78 | romp | rs6000 | rx \ | |
1247 | | s390 | s390x \ | |
1248 | | score \ | |
1249 | | sh | shl \ | |
1250 | | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | |
1251 | | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ | |
1252 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | |
1253 | | sparclite \ | |
1254 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | |
1255 | | spu \ | |
1256 | | tahoe \ | |
1257 | | thumbv7* \ | |
1258 | | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | |
1259 | | tron \ | |
1260 | | ubicom32 \ | |
1261 | | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | |
1262 | | vax \ | |
1263 | | visium \ | |
1264 | | w65 \ | |
1265 | | wasm32 | wasm64 \ | |
1266 | | we32k \ | |
1267 | | x86 | x86_64 | xc16x | xgate | xps100 \ | |
1268 | | xstormy16 | xtensa* \ | |
1269 | | ymp \ | |
1270 | | z8k | z80) | |
1271 | ;; | |
1272 | ||
1273 | *) | |
1274 | echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 | |
1275 | exit 1 | |
1276 | ;; | |
1277 | esac | |
1278 | 1331 | ;; |
1279 | 1332 | esac |
1280 | 1333 | |
1281 | # Here we canonicalize certain aliases for manufacturers. | |
1282 | case $vendor in | |
1283 | digital*) | |
1284 | vendor=dec | |
1285 | ;; | |
1286 | commodore*) | |
1287 | vendor=cbm | |
1288 | ;; | |
1289 | *) | |
1290 | ;; | |
1291 | esac | |
1292 | ||
1293 | 1334 | # Decode manufacturer-specific aliases for certain operating systems. |
1294 | 1335 | |
1295 | if test x$basic_os != x | |
1336 | if [ x"$os" != x"" ] | |
1296 | 1337 | then |
1297 | ||
1298 | # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just | |
1299 | # set os. | |
1300 | case $basic_os in | |
1301 | gnu/linux*) | |
1302 | kernel=linux | |
1303 | os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` | |
1304 | ;; | |
1305 | os2-emx) | |
1306 | kernel=os2 | |
1307 | os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` | |
1308 | ;; | |
1309 | nto-qnx*) | |
1310 | kernel=nto | |
1311 | os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` | |
1312 | ;; | |
1313 | *-*) | |
1314 | # shellcheck disable=SC2162 | |
1315 | IFS="-" read kernel os <<EOF | |
1316 | $basic_os | |
1317 | EOF | |
1318 | ;; | |
1319 | # Default OS when just kernel was specified | |
1320 | nto*) | |
1321 | kernel=nto | |
1322 | os=`echo "$basic_os" | sed -e 's|nto|qnx|'` | |
1323 | ;; | |
1324 | linux*) | |
1325 | kernel=linux | |
1326 | os=`echo "$basic_os" | sed -e 's|linux|gnu|'` | |
1327 | ;; | |
1328 | *) | |
1329 | kernel= | |
1330 | os=$basic_os | |
1331 | ;; | |
1332 | esac | |
1333 | ||
1334 | # Now, normalize the OS (knowing we just have one component, it's not a kernel, | |
1335 | # etc.) | |
1336 | 1338 | case $os in |
1337 | 1339 | # First match some system type aliases that might get confused |
1338 | 1340 | # with valid system types. |
1339 | # solaris* is a basic system type, with this one exception. | |
1340 | auroraux) | |
1341 | os=auroraux | |
1342 | ;; | |
1343 | bluegene*) | |
1344 | os=cnk | |
1345 | ;; | |
1346 | solaris1 | solaris1.*) | |
1347 | os=`echo "$os" | sed -e 's|solaris1|sunos4|'` | |
1348 | ;; | |
1349 | solaris) | |
1350 | os=solaris2 | |
1351 | ;; | |
1352 | unixware*) | |
1353 | os=sysv4.2uw | |
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 | 1356 | ;; |
1355 | 1357 | # es1800 is here to avoid being matched by es* (a different OS) |
1356 | es1800*) | |
1357 | os=ose | |
1358 | ;; | |
1359 | # Some version numbers need modification | |
1360 | chorusos*) | |
1361 | os=chorusos | |
1362 | ;; | |
1363 | isc) | |
1364 | os=isc2.2 | |
1365 | ;; | |
1366 | sco6) | |
1367 | os=sco5v6 | |
1368 | ;; | |
1369 | sco5) | |
1370 | os=sco3.2v5 | |
1371 | ;; | |
1372 | sco4) | |
1373 | os=sco3.2v4 | |
1374 | ;; | |
1375 | sco3.2.[4-9]*) | |
1376 | os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` | |
1377 | ;; | |
1378 | sco*v* | scout) | |
1379 | # Don't match below | |
1380 | ;; | |
1381 | sco*) | |
1382 | os=sco3.2v2 | |
1383 | ;; | |
1384 | psos*) | |
1385 | os=psos | |
1386 | ;; | |
1387 | qnx*) | |
1388 | os=qnx | |
1389 | ;; | |
1390 | hiux*) | |
1391 | os=hiuxwe2 | |
1392 | ;; | |
1393 | lynx*178) | |
1394 | os=lynxos178 | |
1395 | ;; | |
1396 | lynx*5) | |
1397 | os=lynxos5 | |
1398 | ;; | |
1399 | lynxos*) | |
1400 | # don't get caught up in next wildcard | |
1401 | ;; | |
1402 | lynx*) | |
1403 | os=lynxos | |
1404 | ;; | |
1405 | mac[0-9]*) | |
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*) | |
1406 | 1414 | os=`echo "$os" | sed -e 's|mac|macos|'` |
1407 | 1415 | ;; |
1408 | opened*) | |
1409 | os=openedition | |
1410 | ;; | |
1411 | os400*) | |
1412 | os=os400 | |
1413 | ;; | |
1414 | sunos5*) | |
1416 | -linux-dietlibc) | |
1417 | os=-linux-dietlibc | |
1418 | ;; | |
1419 | -linux*) | |
1420 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
1421 | ;; | |
1422 | -sunos5*) | |
1415 | 1423 | os=`echo "$os" | sed -e 's|sunos5|solaris2|'` |
1416 | 1424 | ;; |
1417 | sunos6*) | |
1425 | -sunos6*) | |
1418 | 1426 | os=`echo "$os" | sed -e 's|sunos6|solaris3|'` |
1419 | 1427 | ;; |
1420 | wince*) | |
1421 | os=wince | |
1422 | ;; | |
1423 | utek*) | |
1424 | os=bsd | |
1425 | ;; | |
1426 | dynix*) | |
1427 | os=bsd | |
1428 | ;; | |
1429 | acis*) | |
1430 | os=aos | |
1431 | ;; | |
1432 | atheos*) | |
1433 | os=atheos | |
1434 | ;; | |
1435 | syllable*) | |
1436 | os=syllable | |
1437 | ;; | |
1438 | 386bsd) | |
1439 | os=bsd | |
1440 | ;; | |
1441 | ctix* | uts*) | |
1442 | os=sysv | |
1443 | ;; | |
1444 | nova*) | |
1445 | os=rtmk-nova | |
1446 | ;; | |
1447 | ns2) | |
1448 | os=nextstep2 | |
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 | |
1449 | 1466 | ;; |
1450 | 1467 | # Preserve the version number of sinix5. |
1451 | sinix5.*) | |
1452 | os=`echo "$os" | sed -e 's|sinix|sysv|'` | |
1453 | ;; | |
1454 | sinix*) | |
1455 | os=sysv4 | |
1456 | ;; | |
1457 | tpf*) | |
1458 | os=tpf | |
1459 | ;; | |
1460 | triton*) | |
1461 | os=sysv3 | |
1462 | ;; | |
1463 | oss*) | |
1464 | os=sysv3 | |
1465 | ;; | |
1466 | svr4*) | |
1467 | os=sysv4 | |
1468 | ;; | |
1469 | svr3) | |
1470 | os=sysv3 | |
1471 | ;; | |
1472 | sysvr4) | |
1473 | os=sysv4 | |
1474 | ;; | |
1475 | ose*) | |
1476 | os=ose | |
1477 | ;; | |
1478 | *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
1479 | os=mint | |
1480 | ;; | |
1481 | dicos*) | |
1482 | os=dicos | |
1483 | ;; | |
1484 | pikeos*) | |
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*) | |
1485 | 1508 | # Until real need of OS specific support for |
1486 | 1509 | # particular features comes up, bare metal |
1487 | 1510 | # configurations are quite functional. |
1488 | case $cpu in | |
1511 | case $basic_machine in | |
1489 | 1512 | arm*) |
1490 | os=eabi | |
1513 | os=-eabi | |
1491 | 1514 | ;; |
1492 | 1515 | *) |
1493 | os=elf | |
1516 | os=-elf | |
1494 | 1517 | ;; |
1495 | 1518 | esac |
1496 | 1519 | ;; |
1520 | -nacl*) | |
1521 | ;; | |
1522 | -ios) | |
1523 | ;; | |
1524 | -none) | |
1525 | ;; | |
1497 | 1526 | *) |
1498 | # No normalization, but not necessarily accepted, that comes below. | |
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 | |
1499 | 1531 | ;; |
1500 | 1532 | esac |
1501 | ||
1502 | 1533 | else |
1503 | 1534 | |
1504 | 1535 | # Here we handle the default operating systems that come with various machines. |
1511 | 1542 | # will signal an error saying that MANUFACTURER isn't an operating |
1512 | 1543 | # system, and we'll never get to this point. |
1513 | 1544 | |
1514 | kernel= | |
1515 | case $cpu-$vendor in | |
1545 | case $basic_machine in | |
1516 | 1546 | score-*) |
1517 | os=elf | |
1547 | os=-elf | |
1518 | 1548 | ;; |
1519 | 1549 | spu-*) |
1520 | os=elf | |
1550 | os=-elf | |
1521 | 1551 | ;; |
1522 | 1552 | *-acorn) |
1523 | os=riscix1.2 | |
1553 | os=-riscix1.2 | |
1524 | 1554 | ;; |
1525 | 1555 | arm*-rebel) |
1526 | kernel=linux | |
1527 | os=gnu | |
1556 | os=-linux | |
1528 | 1557 | ;; |
1529 | 1558 | arm*-semi) |
1530 | os=aout | |
1559 | os=-aout | |
1531 | 1560 | ;; |
1532 | 1561 | c4x-* | tic4x-*) |
1533 | os=coff | |
1562 | os=-coff | |
1534 | 1563 | ;; |
1535 | 1564 | c8051-*) |
1536 | os=elf | |
1537 | ;; | |
1538 | clipper-intergraph) | |
1539 | os=clix | |
1565 | os=-elf | |
1540 | 1566 | ;; |
1541 | 1567 | hexagon-*) |
1542 | os=elf | |
1568 | os=-elf | |
1543 | 1569 | ;; |
1544 | 1570 | tic54x-*) |
1545 | os=coff | |
1571 | os=-coff | |
1546 | 1572 | ;; |
1547 | 1573 | tic55x-*) |
1548 | os=coff | |
1574 | os=-coff | |
1549 | 1575 | ;; |
1550 | 1576 | tic6x-*) |
1551 | os=coff | |
1577 | os=-coff | |
1552 | 1578 | ;; |
1553 | 1579 | # This must come before the *-dec entry. |
1554 | 1580 | pdp10-*) |
1555 | os=tops20 | |
1581 | os=-tops20 | |
1556 | 1582 | ;; |
1557 | 1583 | pdp11-*) |
1558 | os=none | |
1584 | os=-none | |
1559 | 1585 | ;; |
1560 | 1586 | *-dec | vax-*) |
1561 | os=ultrix4.2 | |
1587 | os=-ultrix4.2 | |
1562 | 1588 | ;; |
1563 | 1589 | m68*-apollo) |
1564 | os=domain | |
1590 | os=-domain | |
1565 | 1591 | ;; |
1566 | 1592 | i386-sun) |
1567 | os=sunos4.0.2 | |
1593 | os=-sunos4.0.2 | |
1568 | 1594 | ;; |
1569 | 1595 | m68000-sun) |
1570 | os=sunos3 | |
1596 | os=-sunos3 | |
1571 | 1597 | ;; |
1572 | 1598 | m68*-cisco) |
1573 | os=aout | |
1599 | os=-aout | |
1574 | 1600 | ;; |
1575 | 1601 | mep-*) |
1576 | os=elf | |
1602 | os=-elf | |
1577 | 1603 | ;; |
1578 | 1604 | mips*-cisco) |
1579 | os=elf | |
1605 | os=-elf | |
1580 | 1606 | ;; |
1581 | 1607 | mips*-*) |
1582 | os=elf | |
1608 | os=-elf | |
1583 | 1609 | ;; |
1584 | 1610 | or32-*) |
1585 | os=coff | |
1611 | os=-coff | |
1586 | 1612 | ;; |
1587 | 1613 | *-tti) # must be before sparc entry or we get the wrong os. |
1588 | os=sysv3 | |
1614 | os=-sysv3 | |
1589 | 1615 | ;; |
1590 | 1616 | sparc-* | *-sun) |
1591 | os=sunos4.1.1 | |
1617 | os=-sunos4.1.1 | |
1592 | 1618 | ;; |
1593 | 1619 | pru-*) |
1594 | os=elf | |
1620 | os=-elf | |
1595 | 1621 | ;; |
1596 | 1622 | *-be) |
1597 | os=beos | |
1623 | os=-beos | |
1598 | 1624 | ;; |
1599 | 1625 | *-ibm) |
1600 | os=aix | |
1626 | os=-aix | |
1601 | 1627 | ;; |
1602 | 1628 | *-knuth) |
1603 | os=mmixware | |
1629 | os=-mmixware | |
1604 | 1630 | ;; |
1605 | 1631 | *-wec) |
1606 | os=proelf | |
1632 | os=-proelf | |
1607 | 1633 | ;; |
1608 | 1634 | *-winbond) |
1609 | os=proelf | |
1635 | os=-proelf | |
1610 | 1636 | ;; |
1611 | 1637 | *-oki) |
1612 | os=proelf | |
1638 | os=-proelf | |
1613 | 1639 | ;; |
1614 | 1640 | *-hp) |
1615 | os=hpux | |
1641 | os=-hpux | |
1616 | 1642 | ;; |
1617 | 1643 | *-hitachi) |
1618 | os=hiux | |
1644 | os=-hiux | |
1619 | 1645 | ;; |
1620 | 1646 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
1621 | os=sysv | |
1647 | os=-sysv | |
1622 | 1648 | ;; |
1623 | 1649 | *-cbm) |
1624 | os=amigaos | |
1650 | os=-amigaos | |
1625 | 1651 | ;; |
1626 | 1652 | *-dg) |
1627 | os=dgux | |
1653 | os=-dgux | |
1628 | 1654 | ;; |
1629 | 1655 | *-dolphin) |
1630 | os=sysv3 | |
1656 | os=-sysv3 | |
1631 | 1657 | ;; |
1632 | 1658 | m68k-ccur) |
1633 | os=rtu | |
1659 | os=-rtu | |
1634 | 1660 | ;; |
1635 | 1661 | m88k-omron*) |
1636 | os=luna | |
1662 | os=-luna | |
1637 | 1663 | ;; |
1638 | 1664 | *-next) |
1639 | os=nextstep | |
1665 | os=-nextstep | |
1640 | 1666 | ;; |
1641 | 1667 | *-sequent) |
1642 | os=ptx | |
1668 | os=-ptx | |
1643 | 1669 | ;; |
1644 | 1670 | *-crds) |
1645 | os=unos | |
1671 | os=-unos | |
1646 | 1672 | ;; |
1647 | 1673 | *-ns) |
1648 | os=genix | |
1674 | os=-genix | |
1649 | 1675 | ;; |
1650 | 1676 | i370-*) |
1651 | os=mvs | |
1677 | os=-mvs | |
1652 | 1678 | ;; |
1653 | 1679 | *-gould) |
1654 | os=sysv | |
1680 | os=-sysv | |
1655 | 1681 | ;; |
1656 | 1682 | *-highlevel) |
1657 | os=bsd | |
1683 | os=-bsd | |
1658 | 1684 | ;; |
1659 | 1685 | *-encore) |
1660 | os=bsd | |
1686 | os=-bsd | |
1661 | 1687 | ;; |
1662 | 1688 | *-sgi) |
1663 | os=irix | |
1689 | os=-irix | |
1664 | 1690 | ;; |
1665 | 1691 | *-siemens) |
1666 | os=sysv4 | |
1692 | os=-sysv4 | |
1667 | 1693 | ;; |
1668 | 1694 | *-masscomp) |
1669 | os=rtu | |
1695 | os=-rtu | |
1670 | 1696 | ;; |
1671 | 1697 | f30[01]-fujitsu | f700-fujitsu) |
1672 | os=uxpv | |
1698 | os=-uxpv | |
1673 | 1699 | ;; |
1674 | 1700 | *-rom68k) |
1675 | os=coff | |
1701 | os=-coff | |
1676 | 1702 | ;; |
1677 | 1703 | *-*bug) |
1678 | os=coff | |
1704 | os=-coff | |
1679 | 1705 | ;; |
1680 | 1706 | *-apple) |
1681 | os=macos | |
1707 | os=-macos | |
1682 | 1708 | ;; |
1683 | 1709 | *-atari*) |
1684 | os=mint | |
1685 | ;; | |
1686 | *-wrs) | |
1687 | os=vxworks | |
1710 | os=-mint | |
1688 | 1711 | ;; |
1689 | 1712 | *) |
1690 | os=none | |
1713 | os=-none | |
1691 | 1714 | ;; |
1692 | 1715 | esac |
1693 | ||
1694 | 1716 | fi |
1695 | ||
1696 | # Now, validate our (potentially fixed-up) OS. | |
1697 | case $os in | |
1698 | # Sometimes we do "kernel-libc", so those need to count as OSes. | |
1699 | musl* | newlib* | uclibc*) | |
1700 | ;; | |
1701 | # Likewise for "kernel-abi" | |
1702 | eabi* | gnueabi*) | |
1703 | ;; | |
1704 | # VxWorks passes extra cpu info in the 4th filed. | |
1705 | simlinux | simwindows | spe) | |
1706 | ;; | |
1707 | # Now accept the basic system types. | |
1708 | # The portable systems comes first. | |
1709 | # Each alternative MUST end in a * to match a version number. | |
1710 | gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ | |
1711 | | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ | |
1712 | | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | |
1713 | | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | |
1714 | | hiux* | abug | nacl* | netware* | windows* \ | |
1715 | | os9* | macos* | osx* | ios* \ | |
1716 | | mpw* | magic* | mmixware* | mon960* | lnews* \ | |
1717 | | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | |
1718 | | aos* | aros* | cloudabi* | sortix* | twizzler* \ | |
1719 | | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | |
1720 | | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | |
1721 | | mirbsd* | netbsd* | dicos* | openedition* | ose* \ | |
1722 | | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | |
1723 | | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ | |
1724 | | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | |
1725 | | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | |
1726 | | udi* | lites* | ieee* | go32* | aux* | hcos* \ | |
1727 | | chorusrdb* | cegcc* | glidix* | serenity* \ | |
1728 | | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | |
1729 | | midipix* | mingw32* | mingw64* | mint* \ | |
1730 | | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | |
1731 | | interix* | uwin* | mks* | rhapsody* | darwin* \ | |
1732 | | openstep* | oskit* | conix* | pw32* | nonstopux* \ | |
1733 | | storm-chaos* | tops10* | tenex* | tops20* | its* \ | |
1734 | | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ | |
1735 | | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ | |
1736 | | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | |
1737 | | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | |
1738 | | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | |
1739 | | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | |
1740 | | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) | |
1741 | ;; | |
1742 | # This one is extra strict with allowed versions | |
1743 | sco3.2v2 | sco3.2v[4-9]* | sco5v6*) | |
1744 | # Don't forget version if it is 3.2v4 or newer. | |
1745 | ;; | |
1746 | none) | |
1747 | ;; | |
1748 | *) | |
1749 | echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 | |
1750 | exit 1 | |
1751 | ;; | |
1752 | esac | |
1753 | ||
1754 | # As a final step for OS-related things, validate the OS-kernel combination | |
1755 | # (given a valid OS), if there is a kernel. | |
1756 | case $kernel-$os in | |
1757 | linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) | |
1758 | ;; | |
1759 | uclinux-uclibc* ) | |
1760 | ;; | |
1761 | -dietlibc* | -newlib* | -musl* | -uclibc* ) | |
1762 | # These are just libc implementations, not actual OSes, and thus | |
1763 | # require a kernel. | |
1764 | echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 | |
1765 | exit 1 | |
1766 | ;; | |
1767 | kfreebsd*-gnu* | kopensolaris*-gnu*) | |
1768 | ;; | |
1769 | vxworks-simlinux | vxworks-simwindows | vxworks-spe) | |
1770 | ;; | |
1771 | nto-qnx*) | |
1772 | ;; | |
1773 | os2-emx) | |
1774 | ;; | |
1775 | *-eabi* | *-gnueabi*) | |
1776 | ;; | |
1777 | -*) | |
1778 | # Blank kernel with real OS is always fine. | |
1779 | ;; | |
1780 | *-*) | |
1781 | echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 | |
1782 | exit 1 | |
1783 | ;; | |
1784 | esac | |
1785 | 1717 | |
1786 | 1718 | # Here we handle the case where we know the os, and the CPU type, but not the |
1787 | 1719 | # manufacturer. We pick the logical manufacturer. |
1788 | case $vendor in | |
1789 | unknown) | |
1790 | case $cpu-$os in | |
1791 | *-riscix*) | |
1720 | vendor=unknown | |
1721 | case $basic_machine in | |
1722 | *-unknown) | |
1723 | case $os in | |
1724 | -riscix*) | |
1792 | 1725 | vendor=acorn |
1793 | 1726 | ;; |
1794 | *-sunos*) | |
1727 | -sunos*) | |
1795 | 1728 | vendor=sun |
1796 | 1729 | ;; |
1797 | *-cnk* | *-aix*) | |
1730 | -cnk*|-aix*) | |
1798 | 1731 | vendor=ibm |
1799 | 1732 | ;; |
1800 | *-beos*) | |
1733 | -beos*) | |
1801 | 1734 | vendor=be |
1802 | 1735 | ;; |
1803 | *-hpux*) | |
1736 | -hpux*) | |
1804 | 1737 | vendor=hp |
1805 | 1738 | ;; |
1806 | *-mpeix*) | |
1739 | -mpeix*) | |
1807 | 1740 | vendor=hp |
1808 | 1741 | ;; |
1809 | *-hiux*) | |
1742 | -hiux*) | |
1810 | 1743 | vendor=hitachi |
1811 | 1744 | ;; |
1812 | *-unos*) | |
1745 | -unos*) | |
1813 | 1746 | vendor=crds |
1814 | 1747 | ;; |
1815 | *-dgux*) | |
1748 | -dgux*) | |
1816 | 1749 | vendor=dg |
1817 | 1750 | ;; |
1818 | *-luna*) | |
1751 | -luna*) | |
1819 | 1752 | vendor=omron |
1820 | 1753 | ;; |
1821 | *-genix*) | |
1754 | -genix*) | |
1822 | 1755 | vendor=ns |
1823 | 1756 | ;; |
1824 | *-clix*) | |
1825 | vendor=intergraph | |
1826 | ;; | |
1827 | *-mvs* | *-opened*) | |
1757 | -mvs* | -opened*) | |
1828 | 1758 | vendor=ibm |
1829 | 1759 | ;; |
1830 | *-os400*) | |
1760 | -os400*) | |
1831 | 1761 | vendor=ibm |
1832 | 1762 | ;; |
1833 | s390-* | s390x-*) | |
1763 | -ptx*) | |
1764 | vendor=sequent | |
1765 | ;; | |
1766 | -tpf*) | |
1834 | 1767 | vendor=ibm |
1835 | 1768 | ;; |
1836 | *-ptx*) | |
1837 | vendor=sequent | |
1838 | ;; | |
1839 | *-tpf*) | |
1840 | vendor=ibm | |
1841 | ;; | |
1842 | *-vxsim* | *-vxworks* | *-windiss*) | |
1769 | -vxsim* | -vxworks* | -windiss*) | |
1843 | 1770 | vendor=wrs |
1844 | 1771 | ;; |
1845 | *-aux*) | |
1772 | -aux*) | |
1846 | 1773 | vendor=apple |
1847 | 1774 | ;; |
1848 | *-hms*) | |
1775 | -hms*) | |
1849 | 1776 | vendor=hitachi |
1850 | 1777 | ;; |
1851 | *-mpw* | *-macos*) | |
1778 | -mpw* | -macos*) | |
1852 | 1779 | vendor=apple |
1853 | 1780 | ;; |
1854 | *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) | |
1781 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
1855 | 1782 | vendor=atari |
1856 | 1783 | ;; |
1857 | *-vos*) | |
1784 | -vos*) | |
1858 | 1785 | vendor=stratus |
1859 | 1786 | ;; |
1860 | 1787 | esac |
1788 | basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` | |
1861 | 1789 | ;; |
1862 | 1790 | esac |
1863 | 1791 | |
1864 | echo "$cpu-$vendor-${kernel:+$kernel-}$os" | |
1792 | echo "$basic_machine$os" | |
1865 | 1793 | exit |
1866 | 1794 | |
1867 | 1795 | # Local variables: |
1868 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1796 | # eval: (add-hook 'write-file-functions 'time-stamp) | |
1869 | 1797 | # time-stamp-start: "timestamp='" |
1870 | 1798 | # time-stamp-format: "%:y-%02m-%02d" |
1871 | 1799 | # time-stamp-end: "'" |
5840 | 5840 | lt_cv_deplibs_check_method=pass_all |
5841 | 5841 | ;; |
5842 | 5842 | |
5843 | netbsd*) | |
5843 | netbsd* | netbsdelf*-gnu) | |
5844 | 5844 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
5845 | 5845 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' |
5846 | 5846 | else |
6224 | 6224 | fi |
6225 | 6225 | |
6226 | 6226 | : ${AR=ar} |
6227 | : ${AR_FLAGS=cru} | |
6227 | : ${AR_FLAGS=cr} | |
6228 | 6228 | |
6229 | 6229 | |
6230 | 6230 | |
6748 | 6748 | test $ac_status = 0; }; then |
6749 | 6749 | # Now try to grab the symbols. |
6750 | 6750 | nlist=conftest.nm |
6751 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 | |
6752 | (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 | |
6753 | ac_status=$? | |
6754 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6755 | test $ac_status = 0; } && test -s "$nlist"; then | |
6751 | $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 | |
6752 | if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then | |
6756 | 6753 | # Try sorting and uniquifying the output. |
6757 | 6754 | if sort "$nlist" | uniq > "$nlist"T; then |
6758 | 6755 | mv -f "$nlist"T "$nlist" |
8047 | 8044 | _LT_EOF |
8048 | 8045 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 |
8049 | 8046 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 |
8050 | echo "$AR cru libconftest.a conftest.o" >&5 | |
8051 | $AR cru libconftest.a conftest.o 2>&5 | |
8047 | echo "$AR cr libconftest.a conftest.o" >&5 | |
8048 | $AR cr libconftest.a conftest.o 2>&5 | |
8052 | 8049 | echo "$RANLIB libconftest.a" >&5 |
8053 | 8050 | $RANLIB libconftest.a 2>&5 |
8054 | 8051 | cat > conftest.c << _LT_EOF |
8075 | 8072 | _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; |
8076 | 8073 | darwin1.*) |
8077 | 8074 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; |
8078 | darwin*) | |
8079 | case ${MACOSX_DEPLOYMENT_TARGET},$host in | |
8080 | 10.[012],*|,*powerpc*) | |
8075 | darwin*) # darwin 5.x on | |
8076 | # if running on 10.5 or later, the deployment target defaults | |
8077 | # to the OS version, if on x86, and 10.4, the deployment | |
8078 | # target defaults to 10.4. Don't you love it? | |
8079 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
8080 | 10.0,*86*-darwin8*|10.0,*-darwin[912]*) | |
8081 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | |
8082 | 10.[012][,.]*) | |
8081 | 8083 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; |
8082 | *) | |
8084 | 10.*|11.*) | |
8083 | 8085 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; |
8084 | 8086 | esac |
8085 | 8087 | ;; |
8935 | 8937 | ecc*) |
8936 | 8938 | lt_prog_compiler_wl='-Wl,' |
8937 | 8939 | lt_prog_compiler_pic='-KPIC' |
8940 | lt_prog_compiler_static='-static' | |
8941 | ;; | |
8942 | # flang / f18. f95 an alias for gfortran or flang on Debian | |
8943 | flang* | f18* | f95*) | |
8944 | lt_prog_compiler_wl='-Wl,' | |
8945 | lt_prog_compiler_pic='-fPIC' | |
8938 | 8946 | lt_prog_compiler_static='-static' |
8939 | 8947 | ;; |
8940 | 8948 | # icc used to be incompatible with GCC. |
9418 | 9426 | openbsd* | bitrig*) |
9419 | 9427 | with_gnu_ld=no |
9420 | 9428 | ;; |
9429 | linux* | k*bsd*-gnu | gnu*) | |
9430 | link_all_deplibs=no | |
9431 | ;; | |
9421 | 9432 | esac |
9422 | 9433 | |
9423 | 9434 | ld_shlibs=yes |
9672 | 9683 | fi |
9673 | 9684 | ;; |
9674 | 9685 | |
9675 | netbsd*) | |
9686 | netbsd* | netbsdelf*-gnu) | |
9676 | 9687 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
9677 | 9688 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
9678 | 9689 | wlarc= |
10349 | 10360 | if test yes = "$lt_cv_irix_exported_symbol"; then |
10350 | 10361 | archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' |
10351 | 10362 | fi |
10363 | link_all_deplibs=no | |
10352 | 10364 | else |
10353 | 10365 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' |
10354 | 10366 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' |
10370 | 10382 | esac |
10371 | 10383 | ;; |
10372 | 10384 | |
10373 | netbsd*) | |
10385 | netbsd* | netbsdelf*-gnu) | |
10374 | 10386 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
10375 | 10387 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
10376 | 10388 | else |
11487 | 11499 | # people can always --disable-shared, the test was removed, and we |
11488 | 11500 | # assume the GNU/Linux dynamic linker is in use. |
11489 | 11501 | dynamic_linker='GNU/Linux ld.so' |
11502 | ;; | |
11503 | ||
11504 | netbsdelf*-gnu) | |
11505 | version_type=linux | |
11506 | need_lib_prefix=no | |
11507 | need_version=no | |
11508 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
11509 | soname_spec='${libname}${release}${shared_ext}$major' | |
11510 | shlibpath_var=LD_LIBRARY_PATH | |
11511 | shlibpath_overrides_runpath=no | |
11512 | hardcode_into_libs=yes | |
11513 | dynamic_linker='NetBSD ld.elf_so' | |
11490 | 11514 | ;; |
11491 | 11515 | |
11492 | 11516 | netbsd*) |
16688 | 16712 | cat <<_LT_EOF >> "$cfgfile" |
16689 | 16713 | #! $SHELL |
16690 | 16714 | # Generated automatically by $as_me ($PACKAGE) $VERSION |
16691 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
16692 | 16715 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
16693 | 16716 | |
16694 | 16717 | # Provide generalized library-building support services. |
11 | 11 | nasm_verbose_0 = @echo " NASM " $@; |
12 | 12 | |
13 | 13 | .asm.lo: |
14 | $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $< -prefer-non-pic | |
14 | $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $< | |
15 | 15 | |
16 | 16 | SRC_INTEL = x86/rasterizer.asm x86/blend_bitmaps.asm x86/be_blur.asm x86/blur.asm x86/cpuid.asm \ |
17 | 17 | x86/cpuid.h |
844 | 844 | |
845 | 845 | |
846 | 846 | .asm.lo: |
847 | $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $< -prefer-non-pic | |
847 | $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $< | |
848 | 848 | |
849 | 849 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
850 | 850 | # Otherwise a system limit (for SysV at least) may be exceeded. |
362 | 362 | NEXT(p, token); |
363 | 363 | |
364 | 364 | ALIAS(End, Duration) // temporarily store end timecode in event->Duration |
365 | ALIAS(Actor, Name) // both variants are used in files | |
365 | 366 | PARSE_START |
366 | 367 | INTVAL(Layer) |
367 | 368 | STYLEVAL(Style) |
578 | 579 | |
579 | 580 | static bool format_line_compare(const char *fmt1, const char *fmt2) |
580 | 581 | { |
582 | #define TOKEN_ALIAS1(token, name, alias) \ | |
583 | if (token ## _end - token ## _start == sizeof( #alias ) - 1 && \ | |
584 | !strncmp(token ## _start, #alias, sizeof( #alias ) - 1)) { \ | |
585 | token ## _start = #name; \ | |
586 | token ## _end = token ## _start + sizeof( #name ) - 1; \ | |
587 | } | |
588 | #define TOKEN_ALIAS(name, alias) TOKEN_ALIAS1(tk1, name, alias) TOKEN_ALIAS1(tk2, name, alias) | |
589 | ||
581 | 590 | while (true) { |
582 | 591 | const char *tk1_start, *tk2_start; |
583 | 592 | const char *tk1_end, *tk2_end; |
590 | 599 | advance_token_pos(&fmt1, &tk1_start, &tk1_end); |
591 | 600 | advance_token_pos(&fmt2, &tk2_start, &tk2_end); |
592 | 601 | |
602 | TOKEN_ALIAS(Name, Actor) | |
593 | 603 | if ((tk1_end-tk1_start) != (tk2_end-tk2_start)) |
594 | 604 | return false; |
595 | 605 | if (ass_strncasecmp(tk1_start, tk2_start, tk1_end-tk1_start)) |
596 | 606 | return false; |
597 | 607 | } |
598 | 608 | return *fmt1 == *fmt2; |
609 | ||
610 | #undef TOKEN_ALIAS | |
611 | #undef TOKEN_ALIAS1 | |
599 | 612 | } |
600 | 613 | |
601 | 614 |
394 | 394 | } |
395 | 395 | } |
396 | 396 | |
397 | void ass_sub_bitmaps_c(uint8_t *dst, intptr_t dst_stride, | |
398 | uint8_t *src, intptr_t src_stride, | |
399 | intptr_t width, intptr_t height) | |
400 | { | |
401 | short out; | |
397 | void ass_imul_bitmaps_c(uint8_t *dst, intptr_t dst_stride, | |
398 | uint8_t *src, intptr_t src_stride, | |
399 | intptr_t width, intptr_t height) | |
400 | { | |
402 | 401 | uint8_t* end = dst + dst_stride * height; |
403 | 402 | while (dst < end) { |
404 | 403 | for (unsigned j = 0; j < width; ++j) { |
405 | out = dst[j] - src[j]; | |
406 | dst[j] = FFMAX(out, 0); | |
404 | dst[j] = (dst[j] * (255 - src[j]) + 255) >> 8; | |
407 | 405 | } |
408 | 406 | dst += dst_stride; |
409 | 407 | src += src_stride; |
68 | 68 | FillGenericTileFunc fill_generic; |
69 | 69 | |
70 | 70 | // blend functions |
71 | BitmapBlendFunc add_bitmaps, sub_bitmaps; | |
71 | BitmapBlendFunc add_bitmaps, imul_bitmaps; | |
72 | 72 | BitmapMulFunc mul_bitmaps; |
73 | 73 | |
74 | 74 | // be blur function |
33 | 33 | void DECORATE(add_bitmaps)(uint8_t *dst, intptr_t dst_stride, |
34 | 34 | uint8_t *src, intptr_t src_stride, |
35 | 35 | intptr_t width, intptr_t height); |
36 | void DECORATE(sub_bitmaps)(uint8_t *dst, intptr_t dst_stride, | |
37 | uint8_t *src, intptr_t src_stride, | |
38 | intptr_t width, intptr_t height); | |
36 | void DECORATE(imul_bitmaps)(uint8_t *dst, intptr_t dst_stride, | |
37 | uint8_t *src, intptr_t src_stride, | |
38 | intptr_t width, intptr_t height); | |
39 | 39 | void DECORATE(mul_bitmaps)(uint8_t *dst, intptr_t dst_stride, |
40 | 40 | uint8_t *src1, intptr_t src1_stride, |
41 | 41 | uint8_t *src2, intptr_t src2_stride, |
104 | 104 | #endif |
105 | 105 | |
106 | 106 | .add_bitmaps = DECORATE(add_bitmaps), |
107 | .sub_bitmaps = DECORATE(sub_bitmaps), | |
107 | .imul_bitmaps = DECORATE(imul_bitmaps), | |
108 | 108 | .mul_bitmaps = DECORATE(mul_bitmaps), |
109 | 109 | |
110 | 110 | .be_blur = DECORATE(be_blur), |
730 | 730 | |
731 | 731 | // Blend together |
732 | 732 | memcpy(nbuffer, abuffer, ((ah - 1) * as) + aw); |
733 | render_priv->engine->sub_bitmaps(nbuffer + atop * as + aleft, as, | |
734 | bbuffer + btop * bs + bleft, bs, | |
735 | w, h); | |
733 | render_priv->engine->imul_bitmaps(nbuffer + atop * as + aleft, as, | |
734 | bbuffer + btop * bs + bleft, bs, | |
735 | w, h); | |
736 | 736 | } else { |
737 | 737 | // Regular clip |
738 | 738 | if (ax + aw < bx || ay + ah < by || ax > bx + bw || |
59 | 59 | %endmacro |
60 | 60 | |
61 | 61 | ;------------------------------------------------------------------------------ |
62 | ; BLEND_BITMAPS 1:add/sub | |
62 | ; ADD_BITMAPS | |
63 | 63 | ; void add_bitmaps(uint8_t *dst, intptr_t dst_stride, |
64 | 64 | ; uint8_t *src, intptr_t src_stride, |
65 | 65 | ; intptr_t width, intptr_t height); |
66 | ; void sub_bitmaps(uint8_t *dst, intptr_t dst_stride, | |
67 | ; uint8_t *src, intptr_t src_stride, | |
68 | ; intptr_t width, intptr_t height); | |
69 | ;------------------------------------------------------------------------------ | |
70 | ||
71 | %macro BLEND_BITMAPS 1 | |
72 | %if ARCH_X86_64 | |
73 | cglobal %1_bitmaps, 6,8,3 | |
66 | ;------------------------------------------------------------------------------ | |
67 | ||
68 | %macro ADD_BITMAPS 0 | |
69 | %if ARCH_X86_64 | |
70 | cglobal add_bitmaps, 6,8,3 | |
74 | 71 | DECLARE_REG_TMP 7 |
75 | 72 | %else |
76 | cglobal %1_bitmaps, 5,7,3 | |
73 | cglobal add_bitmaps, 5,7,3 | |
77 | 74 | DECLARE_REG_TMP 5 |
78 | 75 | %endif |
79 | 76 | lea r0, [r0 + r4] |
91 | 88 | jmp .loop_entry |
92 | 89 | |
93 | 90 | .width_loop: |
94 | p%1usb m0, m1 | |
91 | paddusb m0, m1 | |
95 | 92 | movu [r0 + r4 - mmsize], m0 |
96 | 93 | .loop_entry: |
97 | 94 | movu m0, [r0 + r4] |
99 | 96 | add r4, mmsize |
100 | 97 | jnc .width_loop |
101 | 98 | pand m1, m2 |
102 | p%1usb m0, m1 | |
99 | paddusb m0, m1 | |
103 | 100 | movu [r0 + r4 - mmsize], m0 |
104 | 101 | add r0, r1 |
105 | 102 | add r2, r3 |
110 | 107 | %endmacro |
111 | 108 | |
112 | 109 | INIT_XMM sse2 |
113 | BLEND_BITMAPS add | |
114 | BLEND_BITMAPS sub | |
110 | ADD_BITMAPS | |
115 | 111 | INIT_YMM avx2 |
116 | BLEND_BITMAPS add | |
117 | BLEND_BITMAPS sub | |
112 | ADD_BITMAPS | |
113 | ||
114 | ;------------------------------------------------------------------------------ | |
115 | ; IMUL_BITMAPS | |
116 | ; void imul_bitmaps(uint8_t *dst, intptr_t dst_stride, | |
117 | ; uint8_t *src, intptr_t src_stride, | |
118 | ; intptr_t width, intptr_t height); | |
119 | ;------------------------------------------------------------------------------ | |
120 | ||
121 | %macro IMUL_BITMAPS 0 | |
122 | %if ARCH_X86_64 | |
123 | cglobal imul_bitmaps, 6,8,8 | |
124 | DECLARE_REG_TMP 7 | |
125 | %else | |
126 | cglobal imul_bitmaps, 5,7,8 | |
127 | DECLARE_REG_TMP 5 | |
128 | %endif | |
129 | lea r0, [r0 + r4] | |
130 | lea r2, [r2 + r4] | |
131 | neg r4 | |
132 | mov r6, r4 | |
133 | and r4, mmsize - 1 | |
134 | LOAD_EDGE_MASK 4, r4, t0 | |
135 | %if ARCH_X86_64 || !PIC | |
136 | mova m5, [words_255] | |
137 | %else | |
138 | mov t0d, 255 * 0x10001 | |
139 | BCASTD 5, t0d | |
140 | %endif | |
141 | pxor m6, m6 | |
142 | pcmpeqb m7, m7 | |
143 | %if !ARCH_X86_64 | |
144 | mov r5, r5m | |
145 | %endif | |
146 | imul r5, r3 | |
147 | add r5, r2 | |
148 | mov r4, r6 | |
149 | jmp .loop_entry | |
150 | ||
151 | .width_loop: | |
152 | pxor m1, m7 | |
153 | punpckhbw m2, m0, m6 | |
154 | punpckhbw m3, m1, m6 | |
155 | punpcklbw m0, m6 | |
156 | punpcklbw m1, m6 | |
157 | pmullw m2, m3 | |
158 | pmullw m0, m1 | |
159 | paddw m2, m5 | |
160 | paddw m0, m5 | |
161 | psrlw m2, 8 | |
162 | psrlw m0, 8 | |
163 | packuswb m0, m2 | |
164 | movu [r0 + r4 - mmsize], m0 | |
165 | .loop_entry: | |
166 | movu m0, [r0 + r4] | |
167 | movu m1, [r2 + r4] | |
168 | add r4, mmsize | |
169 | jnc .width_loop | |
170 | pand m1, m4 | |
171 | pxor m1, m7 | |
172 | punpckhbw m2, m0, m6 | |
173 | punpckhbw m3, m1, m6 | |
174 | punpcklbw m0, m6 | |
175 | punpcklbw m1, m6 | |
176 | pmullw m2, m3 | |
177 | pmullw m0, m1 | |
178 | paddw m2, m5 | |
179 | paddw m0, m5 | |
180 | psrlw m2, 8 | |
181 | psrlw m0, 8 | |
182 | packuswb m0, m2 | |
183 | movu [r0 + r4 - mmsize], m0 | |
184 | add r0, r1 | |
185 | add r2, r3 | |
186 | mov r4, r6 | |
187 | cmp r2, r5 | |
188 | jl .loop_entry | |
189 | RET | |
190 | %endmacro | |
191 | ||
192 | INIT_XMM sse2 | |
193 | IMUL_BITMAPS | |
194 | INIT_YMM avx2 | |
195 | IMUL_BITMAPS | |
118 | 196 | |
119 | 197 | ;------------------------------------------------------------------------------ |
120 | 198 | ; MUL_BITMAPS |
30 | 30 | |
31 | 31 | PROGRAM=libtool |
32 | 32 | PACKAGE=libtool |
33 | VERSION=2.4.6 | |
33 | VERSION="2.4.6 Debian-2.4.6-15" | |
34 | 34 | package_revision=2.4.6 |
35 | 35 | |
36 | 36 | |
386 | 386 | # putting '$debug_cmd' at the start of all your functions, you can get |
387 | 387 | # bash to show function call trace with: |
388 | 388 | # |
389 | # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name | |
389 | # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name | |
390 | 390 | debug_cmd=${debug_cmd-":"} |
391 | 391 | exit_cmd=: |
392 | 392 | |
1369 | 1369 | #! /bin/sh |
1370 | 1370 | |
1371 | 1371 | # Set a version string for this script. |
1372 | scriptversion=2014-01-07.03; # UTC | |
1372 | scriptversion=2015-10-07.11; # UTC | |
1373 | 1373 | |
1374 | 1374 | # A portable, pluggable option parser for Bourne shell. |
1375 | 1375 | # Written by Gary V. Vaughan, 2010 |
1529 | 1529 | { |
1530 | 1530 | $debug_cmd |
1531 | 1531 | |
1532 | _G_rc_run_hooks=false | |
1533 | ||
1532 | 1534 | case " $hookable_fns " in |
1533 | 1535 | *" $1 "*) ;; |
1534 | 1536 | *) func_fatal_error "'$1' does not support hook funcions.n" ;; |
1537 | 1539 | eval _G_hook_fns=\$$1_hooks; shift |
1538 | 1540 | |
1539 | 1541 | for _G_hook in $_G_hook_fns; do |
1540 | eval $_G_hook '"$@"' | |
1541 | ||
1542 | # store returned options list back into positional | |
1543 | # parameters for next 'cmd' execution. | |
1544 | eval _G_hook_result=\$${_G_hook}_result | |
1545 | eval set dummy "$_G_hook_result"; shift | |
1542 | if eval $_G_hook '"$@"'; then | |
1543 | # store returned options list back into positional | |
1544 | # parameters for next 'cmd' execution. | |
1545 | eval _G_hook_result=\$${_G_hook}_result | |
1546 | eval set dummy "$_G_hook_result"; shift | |
1547 | _G_rc_run_hooks=: | |
1548 | fi | |
1546 | 1549 | done |
1547 | 1550 | |
1548 | func_quote_for_eval ${1+"$@"} | |
1549 | func_run_hooks_result=$func_quote_for_eval_result | |
1551 | $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result | |
1550 | 1552 | } |
1551 | 1553 | |
1552 | 1554 | |
1556 | 1558 | ## --------------- ## |
1557 | 1559 | |
1558 | 1560 | # In order to add your own option parsing hooks, you must accept the |
1559 | # full positional parameter list in your hook function, remove any | |
1560 | # options that you action, and then pass back the remaining unprocessed | |
1561 | # full positional parameter list in your hook function, you may remove/edit | |
1562 | # any options that you action, and then pass back the remaining unprocessed | |
1561 | 1563 | # options in '<hooked_function_name>_result', escaped suitably for |
1562 | # 'eval'. Like this: | |
1564 | # 'eval'. In this case you also must return $EXIT_SUCCESS to let the | |
1565 | # hook's caller know that it should pay attention to | |
1566 | # '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that | |
1567 | # arguments are left untouched by the hook and therefore caller will ignore the | |
1568 | # result variable. | |
1569 | # | |
1570 | # Like this: | |
1563 | 1571 | # |
1564 | 1572 | # my_options_prep () |
1565 | 1573 | # { |
1569 | 1577 | # usage_message=$usage_message' |
1570 | 1578 | # -s, --silent don'\''t print informational messages |
1571 | 1579 | # ' |
1572 | # | |
1573 | # func_quote_for_eval ${1+"$@"} | |
1574 | # my_options_prep_result=$func_quote_for_eval_result | |
1580 | # # No change in '$@' (ignored completely by this hook). There is | |
1581 | # # no need to do the equivalent (but slower) action: | |
1582 | # # func_quote_for_eval ${1+"$@"} | |
1583 | # # my_options_prep_result=$func_quote_for_eval_result | |
1584 | # false | |
1575 | 1585 | # } |
1576 | 1586 | # func_add_hook func_options_prep my_options_prep |
1577 | 1587 | # |
1580 | 1590 | # { |
1581 | 1591 | # $debug_cmd |
1582 | 1592 | # |
1593 | # args_changed=false | |
1594 | # | |
1583 | 1595 | # # Note that for efficiency, we parse as many options as we can |
1584 | 1596 | # # recognise in a loop before passing the remainder back to the |
1585 | 1597 | # # caller on the first unrecognised argument we encounter. |
1586 | 1598 | # while test $# -gt 0; do |
1587 | 1599 | # opt=$1; shift |
1588 | 1600 | # case $opt in |
1589 | # --silent|-s) opt_silent=: ;; | |
1601 | # --silent|-s) opt_silent=: | |
1602 | # args_changed=: | |
1603 | # ;; | |
1590 | 1604 | # # Separate non-argument short options: |
1591 | 1605 | # -s*) func_split_short_opt "$_G_opt" |
1592 | 1606 | # set dummy "$func_split_short_opt_name" \ |
1593 | 1607 | # "-$func_split_short_opt_arg" ${1+"$@"} |
1594 | 1608 | # shift |
1609 | # args_changed=: | |
1595 | 1610 | # ;; |
1596 | # *) set dummy "$_G_opt" "$*"; shift; break ;; | |
1611 | # *) # Make sure the first unrecognised option "$_G_opt" | |
1612 | # # is added back to "$@", we could need that later | |
1613 | # # if $args_changed is true. | |
1614 | # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
1597 | 1615 | # esac |
1598 | 1616 | # done |
1599 | 1617 | # |
1600 | # func_quote_for_eval ${1+"$@"} | |
1601 | # my_silent_option_result=$func_quote_for_eval_result | |
1618 | # if $args_changed; then | |
1619 | # func_quote_for_eval ${1+"$@"} | |
1620 | # my_silent_option_result=$func_quote_for_eval_result | |
1621 | # fi | |
1622 | # | |
1623 | # $args_changed | |
1602 | 1624 | # } |
1603 | 1625 | # func_add_hook func_parse_options my_silent_option |
1604 | 1626 | # |
1610 | 1632 | # $opt_silent && $opt_verbose && func_fatal_help "\ |
1611 | 1633 | # '--silent' and '--verbose' options are mutually exclusive." |
1612 | 1634 | # |
1613 | # func_quote_for_eval ${1+"$@"} | |
1614 | # my_option_validation_result=$func_quote_for_eval_result | |
1635 | # false | |
1615 | 1636 | # } |
1616 | 1637 | # func_add_hook func_validate_options my_option_validation |
1617 | 1638 | # |
1618 | # You'll alse need to manually amend $usage_message to reflect the extra | |
1639 | # You'll also need to manually amend $usage_message to reflect the extra | |
1619 | 1640 | # options you parse. It's preferable to append if you can, so that |
1620 | 1641 | # multiple option parsing hooks can be added safely. |
1642 | ||
1643 | ||
1644 | # func_options_finish [ARG]... | |
1645 | # ---------------------------- | |
1646 | # Finishing the option parse loop (call 'func_options' hooks ATM). | |
1647 | func_options_finish () | |
1648 | { | |
1649 | $debug_cmd | |
1650 | ||
1651 | _G_func_options_finish_exit=false | |
1652 | if func_run_hooks func_options ${1+"$@"}; then | |
1653 | func_options_finish_result=$func_run_hooks_result | |
1654 | _G_func_options_finish_exit=: | |
1655 | fi | |
1656 | ||
1657 | $_G_func_options_finish_exit | |
1658 | } | |
1621 | 1659 | |
1622 | 1660 | |
1623 | 1661 | # func_options [ARG]... |
1629 | 1667 | { |
1630 | 1668 | $debug_cmd |
1631 | 1669 | |
1632 | func_options_prep ${1+"$@"} | |
1633 | eval func_parse_options \ | |
1634 | ${func_options_prep_result+"$func_options_prep_result"} | |
1635 | eval func_validate_options \ | |
1636 | ${func_parse_options_result+"$func_parse_options_result"} | |
1637 | ||
1638 | eval func_run_hooks func_options \ | |
1639 | ${func_validate_options_result+"$func_validate_options_result"} | |
1640 | ||
1641 | # save modified positional parameters for caller | |
1642 | func_options_result=$func_run_hooks_result | |
1670 | _G_rc_options=false | |
1671 | ||
1672 | for my_func in options_prep parse_options validate_options options_finish | |
1673 | do | |
1674 | if eval func_$my_func '${1+"$@"}'; then | |
1675 | eval _G_res_var='$'"func_${my_func}_result" | |
1676 | eval set dummy "$_G_res_var" ; shift | |
1677 | _G_rc_options=: | |
1678 | fi | |
1679 | done | |
1680 | ||
1681 | # Save modified positional parameters for caller. As a top-level | |
1682 | # options-parser function we always need to set the 'func_options_result' | |
1683 | # variable (regardless the $_G_rc_options value). | |
1684 | if $_G_rc_options; then | |
1685 | func_options_result=$_G_res_var | |
1686 | else | |
1687 | func_quote_for_eval ${1+"$@"} | |
1688 | func_options_result=$func_quote_for_eval_result | |
1689 | fi | |
1690 | ||
1691 | $_G_rc_options | |
1643 | 1692 | } |
1644 | 1693 | |
1645 | 1694 | |
1648 | 1697 | # All initialisations required before starting the option parse loop. |
1649 | 1698 | # Note that when calling hook functions, we pass through the list of |
1650 | 1699 | # positional parameters. If a hook function modifies that list, and |
1651 | # needs to propogate that back to rest of this script, then the complete | |
1700 | # needs to propagate that back to rest of this script, then the complete | |
1652 | 1701 | # modified list must be put in 'func_run_hooks_result' before |
1653 | # returning. | |
1702 | # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). | |
1654 | 1703 | func_hookable func_options_prep |
1655 | 1704 | func_options_prep () |
1656 | 1705 | { |
1660 | 1709 | opt_verbose=false |
1661 | 1710 | opt_warning_types= |
1662 | 1711 | |
1663 | func_run_hooks func_options_prep ${1+"$@"} | |
1664 | ||
1665 | # save modified positional parameters for caller | |
1666 | func_options_prep_result=$func_run_hooks_result | |
1712 | _G_rc_options_prep=false | |
1713 | if func_run_hooks func_options_prep ${1+"$@"}; then | |
1714 | _G_rc_options_prep=: | |
1715 | # save modified positional parameters for caller | |
1716 | func_options_prep_result=$func_run_hooks_result | |
1717 | fi | |
1718 | ||
1719 | $_G_rc_options_prep | |
1667 | 1720 | } |
1668 | 1721 | |
1669 | 1722 | |
1677 | 1730 | |
1678 | 1731 | func_parse_options_result= |
1679 | 1732 | |
1733 | _G_rc_parse_options=false | |
1680 | 1734 | # this just eases exit handling |
1681 | 1735 | while test $# -gt 0; do |
1682 | 1736 | # Defer to hook functions for initial option parsing, so they |
1683 | 1737 | # get priority in the event of reusing an option name. |
1684 | func_run_hooks func_parse_options ${1+"$@"} | |
1685 | ||
1686 | # Adjust func_parse_options positional parameters to match | |
1687 | eval set dummy "$func_run_hooks_result"; shift | |
1738 | if func_run_hooks func_parse_options ${1+"$@"}; then | |
1739 | eval set dummy "$func_run_hooks_result"; shift | |
1740 | _G_rc_parse_options=: | |
1741 | fi | |
1688 | 1742 | |
1689 | 1743 | # Break out of the loop if we already parsed every option. |
1690 | 1744 | test $# -gt 0 || break |
1691 | 1745 | |
1746 | _G_match_parse_options=: | |
1692 | 1747 | _G_opt=$1 |
1693 | 1748 | shift |
1694 | 1749 | case $_G_opt in |
1703 | 1758 | ;; |
1704 | 1759 | |
1705 | 1760 | --warnings|--warning|-W) |
1706 | test $# = 0 && func_missing_arg $_G_opt && break | |
1761 | if test $# = 0 && func_missing_arg $_G_opt; then | |
1762 | _G_rc_parse_options=: | |
1763 | break | |
1764 | fi | |
1707 | 1765 | case " $warning_categories $1" in |
1708 | 1766 | *" $1 "*) |
1709 | 1767 | # trailing space prevents matching last $1 above |
1756 | 1814 | shift |
1757 | 1815 | ;; |
1758 | 1816 | |
1759 | --) break ;; | |
1817 | --) _G_rc_parse_options=: ; break ;; | |
1760 | 1818 | -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; |
1761 | *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
1819 | *) set dummy "$_G_opt" ${1+"$@"}; shift | |
1820 | _G_match_parse_options=false | |
1821 | break | |
1822 | ;; | |
1762 | 1823 | esac |
1824 | ||
1825 | $_G_match_parse_options && _G_rc_parse_options=: | |
1763 | 1826 | done |
1764 | 1827 | |
1765 | # save modified positional parameters for caller | |
1766 | func_quote_for_eval ${1+"$@"} | |
1767 | func_parse_options_result=$func_quote_for_eval_result | |
1828 | ||
1829 | if $_G_rc_parse_options; then | |
1830 | # save modified positional parameters for caller | |
1831 | func_quote_for_eval ${1+"$@"} | |
1832 | func_parse_options_result=$func_quote_for_eval_result | |
1833 | fi | |
1834 | ||
1835 | $_G_rc_parse_options | |
1768 | 1836 | } |
1769 | 1837 | |
1770 | 1838 | |
1777 | 1845 | { |
1778 | 1846 | $debug_cmd |
1779 | 1847 | |
1848 | _G_rc_validate_options=false | |
1849 | ||
1780 | 1850 | # Display all warnings if -W was not given. |
1781 | 1851 | test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" |
1782 | 1852 | |
1783 | func_run_hooks func_validate_options ${1+"$@"} | |
1853 | if func_run_hooks func_validate_options ${1+"$@"}; then | |
1854 | # save modified positional parameters for caller | |
1855 | func_validate_options_result=$func_run_hooks_result | |
1856 | _G_rc_validate_options=: | |
1857 | fi | |
1784 | 1858 | |
1785 | 1859 | # Bail if the options were screwed! |
1786 | 1860 | $exit_cmd $EXIT_FAILURE |
1787 | 1861 | |
1788 | # save modified positional parameters for caller | |
1789 | func_validate_options_result=$func_run_hooks_result | |
1862 | $_G_rc_validate_options | |
1790 | 1863 | } |
1791 | 1864 | |
1792 | 1865 | |
2067 | 2140 | compiler: $LTCC |
2068 | 2141 | compiler flags: $LTCFLAGS |
2069 | 2142 | linker: $LD (gnu? $with_gnu_ld) |
2070 | version: $progname (GNU libtool) 2.4.6 | |
2143 | version: $progname $scriptversion Debian-2.4.6-15 | |
2071 | 2144 | automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` |
2072 | 2145 | autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` |
2073 | 2146 | |
2074 | 2147 | Report bugs to <bug-libtool@gnu.org>. |
2075 | GNU libtool home page: <http://www.gnu.org/software/libtool/>. | |
2148 | GNU libtool home page: <http://www.gnu.org/s/libtool/>. | |
2076 | 2149 | General help using GNU software: <http://www.gnu.org/gethelp/>." |
2077 | 2150 | exit 0 |
2078 | 2151 | } |
2269 | 2342 | nonopt= |
2270 | 2343 | preserve_args= |
2271 | 2344 | |
2345 | _G_rc_lt_options_prep=: | |
2346 | ||
2272 | 2347 | # Shorthand for --mode=foo, only valid as the first argument |
2273 | 2348 | case $1 in |
2274 | 2349 | clean|clea|cle|cl) |
2292 | 2367 | uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) |
2293 | 2368 | shift; set dummy --mode uninstall ${1+"$@"}; shift |
2294 | 2369 | ;; |
2370 | *) | |
2371 | _G_rc_lt_options_prep=false | |
2372 | ;; | |
2295 | 2373 | esac |
2296 | 2374 | |
2297 | # Pass back the list of options. | |
2298 | func_quote_for_eval ${1+"$@"} | |
2299 | libtool_options_prep_result=$func_quote_for_eval_result | |
2375 | if $_G_rc_lt_options_prep; then | |
2376 | # Pass back the list of options. | |
2377 | func_quote_for_eval ${1+"$@"} | |
2378 | libtool_options_prep_result=$func_quote_for_eval_result | |
2379 | fi | |
2380 | ||
2381 | $_G_rc_lt_options_prep | |
2300 | 2382 | } |
2301 | 2383 | func_add_hook func_options_prep libtool_options_prep |
2302 | 2384 | |
2308 | 2390 | { |
2309 | 2391 | $debug_cmd |
2310 | 2392 | |
2393 | _G_rc_lt_parse_options=false | |
2394 | ||
2311 | 2395 | # Perform our own loop to consume as many options as possible in |
2312 | 2396 | # each iteration. |
2313 | 2397 | while test $# -gt 0; do |
2398 | _G_match_lt_parse_options=: | |
2314 | 2399 | _G_opt=$1 |
2315 | 2400 | shift |
2316 | 2401 | case $_G_opt in |
2385 | 2470 | func_append preserve_args " $_G_opt" |
2386 | 2471 | ;; |
2387 | 2472 | |
2388 | # An option not handled by this hook function: | |
2389 | *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |
2473 | # An option not handled by this hook function: | |
2474 | *) set dummy "$_G_opt" ${1+"$@"} ; shift | |
2475 | _G_match_lt_parse_options=false | |
2476 | break | |
2477 | ;; | |
2390 | 2478 | esac |
2479 | $_G_match_lt_parse_options && _G_rc_lt_parse_options=: | |
2391 | 2480 | done |
2392 | 2481 | |
2393 | ||
2394 | # save modified positional parameters for caller | |
2395 | func_quote_for_eval ${1+"$@"} | |
2396 | libtool_parse_options_result=$func_quote_for_eval_result | |
2482 | if $_G_rc_lt_parse_options; then | |
2483 | # save modified positional parameters for caller | |
2484 | func_quote_for_eval ${1+"$@"} | |
2485 | libtool_parse_options_result=$func_quote_for_eval_result | |
2486 | fi | |
2487 | ||
2488 | $_G_rc_lt_parse_options | |
2397 | 2489 | } |
2398 | 2490 | func_add_hook func_parse_options libtool_parse_options |
2399 | 2491 | |
7271 | 7363 | # -tp=* Portland pgcc target processor selection |
7272 | 7364 | # --sysroot=* for sysroot support |
7273 | 7365 | # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization |
7366 | # -specs=* GCC specs files | |
7274 | 7367 | # -stdlib=* select c++ std lib with clang |
7368 | # -fsanitize=* Clang/GCC memory and address sanitizer | |
7369 | # -fuse-ld=* Linker select flags for GCC | |
7370 | # -static-* direct GCC to link specific libraries statically | |
7371 | # -fcilkplus Cilk Plus language extension features for C/C++ | |
7275 | 7372 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ |
7276 | 7373 | -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ |
7277 | -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) | |
7374 | -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ | |
7375 | -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) | |
7278 | 7376 | func_quote_for_eval "$arg" |
7279 | 7377 | arg=$func_quote_for_eval_result |
7280 | 7378 | func_append compile_command " $arg" |
7567 | 7665 | case $pass in |
7568 | 7666 | dlopen) libs=$dlfiles ;; |
7569 | 7667 | dlpreopen) libs=$dlprefiles ;; |
7570 | link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; | |
7668 | link) | |
7669 | libs="$deplibs %DEPLIBS%" | |
7670 | test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" | |
7671 | ;; | |
7571 | 7672 | esac |
7572 | 7673 | fi |
7573 | 7674 | if test lib,dlpreopen = "$linkmode,$pass"; then |
7886 | 7987 | # It is a libtool convenience library, so add in its objects. |
7887 | 7988 | func_append convenience " $ladir/$objdir/$old_library" |
7888 | 7989 | func_append old_convenience " $ladir/$objdir/$old_library" |
7990 | tmp_libs= | |
7991 | for deplib in $dependency_libs; do | |
7992 | deplibs="$deplib $deplibs" | |
7993 | if $opt_preserve_dup_deps; then | |
7994 | case "$tmp_libs " in | |
7995 | *" $deplib "*) func_append specialdeplibs " $deplib" ;; | |
7996 | esac | |
7997 | fi | |
7998 | func_append tmp_libs " $deplib" | |
7999 | done | |
7889 | 8000 | elif test prog != "$linkmode" && test lib != "$linkmode"; then |
7890 | 8001 | func_fatal_error "'$lib' is not a convenience library" |
7891 | 8002 | fi |
7892 | tmp_libs= | |
7893 | for deplib in $dependency_libs; do | |
7894 | deplibs="$deplib $deplibs" | |
7895 | if $opt_preserve_dup_deps; then | |
7896 | case "$tmp_libs " in | |
7897 | *" $deplib "*) func_append specialdeplibs " $deplib" ;; | |
7898 | esac | |
7899 | fi | |
7900 | func_append tmp_libs " $deplib" | |
7901 | done | |
7902 | 8003 | continue |
7903 | 8004 | fi # $pass = conv |
7904 | 8005 | |
8821 | 8922 | age=$number_minor |
8822 | 8923 | revision=$number_minor |
8823 | 8924 | lt_irix_increment=no |
8925 | ;; | |
8926 | *) | |
8927 | func_fatal_configuration "$modename: unknown library version type '$version_type'" | |
8824 | 8928 | ;; |
8825 | 8929 | esac |
8826 | 8930 | ;; |
0 | #!/bin/sh | |
1 | ||
2 | # Translate libtool supplied C-compiler options for NASM. | |
3 | # libtool treats NASM like the C compiler, and may supply -f… options | |
4 | # which are interpreted as the output file format by NASM, causing errors. | |
5 | # Notably libtool will set -DPIC -fPIC and -fno-common; | |
6 | # we want to use -DPIC by translating it to -DPIC=1, but remove everything else | |
7 | # | |
8 | # Theoretically the way the filtering is done here in a plain POSIX shell script, | |
9 | # does mess up if there were spaces in any argument. However this will never happen | |
10 | # since neither our filenames nor options do not contain spaces and source paths | |
11 | # are not allowed to contain spaces by configure. | |
12 | ||
13 | cmd="" | |
14 | while [ "$#" -gt 0 ] ; do | |
15 | case "$1" in | |
16 | # NASM accepts both -f format and -fformat, | |
17 | # we always use the former, and libtool supplied | |
18 | # C-compiler options will always use the latter. | |
19 | -f) cmd="$cmd $1" ;; | |
20 | -f*) : ;; | |
21 | -DPIC) cmd="$cmd -DPIC=1" ;; | |
22 | *) cmd="$cmd $1" ;; | |
23 | esac | |
24 | shift | |
25 | done | |
26 | ||
27 | exec $cmd |
727 | 727 | cat <<_LT_EOF >> "$cfgfile" |
728 | 728 | #! $SHELL |
729 | 729 | # Generated automatically by $as_me ($PACKAGE) $VERSION |
730 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
731 | 730 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
732 | 731 | |
733 | 732 | # Provide generalized library-building support services. |
1041 | 1040 | _LT_EOF |
1042 | 1041 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD |
1043 | 1042 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD |
1044 | echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD | |
1045 | $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD | |
1043 | echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD | |
1044 | $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD | |
1046 | 1045 | echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD |
1047 | 1046 | $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD |
1048 | 1047 | cat > conftest.c << _LT_EOF |
1066 | 1065 | _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; |
1067 | 1066 | darwin1.*) |
1068 | 1067 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; |
1069 | darwin*) | |
1070 | case ${MACOSX_DEPLOYMENT_TARGET},$host in | |
1071 | 10.[[012]],*|,*powerpc*) | |
1068 | darwin*) # darwin 5.x on | |
1069 | # if running on 10.5 or later, the deployment target defaults | |
1070 | # to the OS version, if on x86, and 10.4, the deployment | |
1071 | # target defaults to 10.4. Don't you love it? | |
1072 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
1073 | 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) | |
1074 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | |
1075 | 10.[[012]][[,.]]*) | |
1072 | 1076 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; |
1073 | *) | |
1077 | 10.*|11.*) | |
1074 | 1078 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; |
1075 | 1079 | esac |
1076 | 1080 | ;; |
1487 | 1491 | m4_defun([_LT_PROG_AR], |
1488 | 1492 | [AC_CHECK_TOOLS(AR, [ar], false) |
1489 | 1493 | : ${AR=ar} |
1490 | : ${AR_FLAGS=cru} | |
1494 | : ${AR_FLAGS=cr} | |
1491 | 1495 | _LT_DECL([], [AR], [1], [The archiver]) |
1492 | 1496 | _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) |
1493 | 1497 | |
2881 | 2885 | dynamic_linker='GNU/Linux ld.so' |
2882 | 2886 | ;; |
2883 | 2887 | |
2888 | netbsdelf*-gnu) | |
2889 | version_type=linux | |
2890 | need_lib_prefix=no | |
2891 | need_version=no | |
2892 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2893 | soname_spec='${libname}${release}${shared_ext}$major' | |
2894 | shlibpath_var=LD_LIBRARY_PATH | |
2895 | shlibpath_overrides_runpath=no | |
2896 | hardcode_into_libs=yes | |
2897 | dynamic_linker='NetBSD ld.elf_so' | |
2898 | ;; | |
2899 | ||
2884 | 2900 | netbsd*) |
2885 | 2901 | version_type=sunos |
2886 | 2902 | need_lib_prefix=no |
3540 | 3556 | lt_cv_deplibs_check_method=pass_all |
3541 | 3557 | ;; |
3542 | 3558 | |
3543 | netbsd*) | |
3559 | netbsd* | netbsdelf*-gnu) | |
3544 | 3560 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
3545 | 3561 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
3546 | 3562 | else |
4046 | 4062 | if AC_TRY_EVAL(ac_compile); then |
4047 | 4063 | # Now try to grab the symbols. |
4048 | 4064 | nlist=conftest.nm |
4049 | if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then | |
4065 | $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD | |
4066 | if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then | |
4050 | 4067 | # Try sorting and uniquifying the output. |
4051 | 4068 | if sort "$nlist" | uniq > "$nlist"T; then |
4052 | 4069 | mv -f "$nlist"T "$nlist" |
4418 | 4435 | ;; |
4419 | 4436 | esac |
4420 | 4437 | ;; |
4421 | netbsd*) | |
4438 | netbsd* | netbsdelf*-gnu) | |
4422 | 4439 | ;; |
4423 | 4440 | *qnx* | *nto*) |
4424 | 4441 | # QNX uses GNU C++, but need to define -shared option too, otherwise |
4686 | 4703 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4687 | 4704 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
4688 | 4705 | ;; |
4706 | # flang / f18. f95 an alias for gfortran or flang on Debian | |
4707 | flang* | f18* | f95*) | |
4708 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4709 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4710 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4711 | ;; | |
4689 | 4712 | # icc used to be incompatible with GCC. |
4690 | 4713 | # ICC 10 doesn't accept -KPIC any more. |
4691 | 4714 | icc* | ifort*) |
4930 | 4953 | ;; |
4931 | 4954 | esac |
4932 | 4955 | ;; |
4956 | linux* | k*bsd*-gnu | gnu*) | |
4957 | _LT_TAGVAR(link_all_deplibs, $1)=no | |
4958 | ;; | |
4933 | 4959 | *) |
4934 | 4960 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
4935 | 4961 | ;; |
4991 | 5017 | ;; |
4992 | 5018 | openbsd* | bitrig*) |
4993 | 5019 | with_gnu_ld=no |
5020 | ;; | |
5021 | linux* | k*bsd*-gnu | gnu*) | |
5022 | _LT_TAGVAR(link_all_deplibs, $1)=no | |
4994 | 5023 | ;; |
4995 | 5024 | esac |
4996 | 5025 | |
5246 | 5275 | fi |
5247 | 5276 | ;; |
5248 | 5277 | |
5249 | netbsd*) | |
5278 | netbsd* | netbsdelf*-gnu) | |
5250 | 5279 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
5251 | 5280 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
5252 | 5281 | wlarc= |
5767 | 5796 | if test yes = "$lt_cv_irix_exported_symbol"; then |
5768 | 5797 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' |
5769 | 5798 | fi |
5799 | _LT_TAGVAR(link_all_deplibs, $1)=no | |
5770 | 5800 | else |
5771 | 5801 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' |
5772 | 5802 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' |
5788 | 5818 | esac |
5789 | 5819 | ;; |
5790 | 5820 | |
5791 | netbsd*) | |
5821 | netbsd* | netbsdelf*-gnu) | |
5792 | 5822 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
5793 | 5823 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
5794 | 5824 | else |
6414 | 6444 | # Commands to make compiler produce verbose output that lists |
6415 | 6445 | # what "hidden" libraries, object files and flags are used when |
6416 | 6446 | # linking a shared library. |
6417 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
6447 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
6418 | 6448 | |
6419 | 6449 | else |
6420 | 6450 | GXX=no |
6789 | 6819 | # explicitly linking system object files so we need to strip them |
6790 | 6820 | # from the output so that they don't get included in the library |
6791 | 6821 | # dependencies. |
6792 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
6822 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
6793 | 6823 | ;; |
6794 | 6824 | *) |
6795 | 6825 | if test yes = "$GXX"; then |
6854 | 6884 | # explicitly linking system object files so we need to strip them |
6855 | 6885 | # from the output so that they don't get included in the library |
6856 | 6886 | # dependencies. |
6857 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
6887 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | |
6858 | 6888 | ;; |
6859 | 6889 | *) |
6860 | 6890 | if test yes = "$GXX"; then |
7193 | 7223 | # Commands to make compiler produce verbose output that lists |
7194 | 7224 | # what "hidden" libraries, object files and flags are used when |
7195 | 7225 | # linking a shared library. |
7196 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
7226 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
7197 | 7227 | |
7198 | 7228 | else |
7199 | 7229 | # FIXME: insert proper C++ library support |
7277 | 7307 | # Commands to make compiler produce verbose output that lists |
7278 | 7308 | # what "hidden" libraries, object files and flags are used when |
7279 | 7309 | # linking a shared library. |
7280 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
7310 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
7281 | 7311 | else |
7282 | 7312 | # g++ 2.7 appears to require '-G' NOT '-shared' on this |
7283 | 7313 | # platform. |
7288 | 7318 | # Commands to make compiler produce verbose output that lists |
7289 | 7319 | # what "hidden" libraries, object files and flags are used when |
7290 | 7320 | # linking a shared library. |
7291 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
7321 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' | |
7292 | 7322 | fi |
7293 | 7323 | |
7294 | 7324 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' |