config.guess 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486
  1. #! /bin/sh
  2. # Attempt to guess a canonical system name.
  3. # Copyright 1992-2018 Free Software Foundation, Inc.
  4. timestamp='2018-08-29'
  5. # This file is free software; you can redistribute it and/or modify it
  6. # under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. # General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, see <https://www.gnu.org/licenses/>.
  17. #
  18. # As a special exception to the GNU General Public License, if you
  19. # distribute this file as part of a program that contains a
  20. # configuration script generated by Autoconf, you may include it under
  21. # the same distribution terms that you use for the rest of that
  22. # program. This Exception is an additional permission under section 7
  23. # of the GNU General Public License, version 3 ("GPLv3").
  24. #
  25. # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
  26. #
  27. # You can get the latest version of this script from:
  28. # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
  29. #
  30. # Please send patches to <config-patches@gnu.org>.
  31. me=`echo "$0" | sed -e 's,.*/,,'`
  32. usage="\
  33. Usage: $0 [OPTION]
  34. Output the configuration name of the system \`$me' is run on.
  35. Options:
  36. -h, --help print this help, then exit
  37. -t, --time-stamp print date of last modification, then exit
  38. -v, --version print version number, then exit
  39. Report bugs and patches to <config-patches@gnu.org>."
  40. version="\
  41. GNU config.guess ($timestamp)
  42. Originally written by Per Bothner.
  43. Copyright 1992-2018 Free Software Foundation, Inc.
  44. This is free software; see the source for copying conditions. There is NO
  45. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  46. help="
  47. Try \`$me --help' for more information."
  48. # Parse command line
  49. while test $# -gt 0 ; do
  50. case $1 in
  51. --time-stamp | --time* | -t )
  52. echo "$timestamp" ; exit ;;
  53. --version | -v )
  54. echo "$version" ; exit ;;
  55. --help | --h* | -h )
  56. echo "$usage"; exit ;;
  57. -- ) # Stop option processing
  58. shift; break ;;
  59. - ) # Use stdin as input.
  60. break ;;
  61. -* )
  62. echo "$me: invalid option $1$help" >&2
  63. exit 1 ;;
  64. * )
  65. break ;;
  66. esac
  67. done
  68. if test $# != 0; then
  69. echo "$me: too many arguments$help" >&2
  70. exit 1
  71. fi
  72. # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
  73. # compiler to aid in system detection is discouraged as it requires
  74. # temporary files to be created and, as you can see below, it is a
  75. # headache to deal with in a portable fashion.
  76. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
  77. # use `HOST_CC' if defined, but it is deprecated.
  78. # Portable tmp directory creation inspired by the Autoconf team.
  79. tmp=
  80. # shellcheck disable=SC2172
  81. trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
  82. trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
  83. set_cc_for_build() {
  84. : "${TMPDIR=/tmp}"
  85. # shellcheck disable=SC2039
  86. { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  87. { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
  88. { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  89. { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
  90. dummy=$tmp/dummy
  91. case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
  92. ,,) echo "int x;" > "$dummy.c"
  93. for driver in cc gcc c89 c99 ; do
  94. if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
  95. CC_FOR_BUILD="$driver"
  96. break
  97. fi
  98. done
  99. if test x"$CC_FOR_BUILD" = x ; then
  100. CC_FOR_BUILD=no_compiler_found
  101. fi
  102. ;;
  103. ,,*) CC_FOR_BUILD=$CC ;;
  104. ,*,*) CC_FOR_BUILD=$HOST_CC ;;
  105. esac
  106. }
  107. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
  108. # (ghazi@noc.rutgers.edu 1994-08-24)
  109. if test -f /.attbin/uname ; then
  110. PATH=$PATH:/.attbin ; export PATH
  111. fi
  112. UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
  113. UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  114. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  115. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  116. case "$UNAME_SYSTEM" in
  117. Linux|GNU|GNU/*)
  118. # If the system lacks a compiler, then just pick glibc.
  119. # We could probably try harder.
  120. LIBC=gnu
  121. set_cc_for_build
  122. cat <<-EOF > "$dummy.c"
  123. #include <features.h>
  124. #if defined(__UCLIBC__)
  125. LIBC=uclibc
  126. #elif defined(__dietlibc__)
  127. LIBC=dietlibc
  128. #else
  129. LIBC=gnu
  130. #endif
  131. EOF
  132. eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
  133. # If ldd exists, use it to detect musl libc.
  134. if command -v ldd >/dev/null && \
  135. ldd --version 2>&1 | grep -q ^musl
  136. then
  137. LIBC=musl
  138. fi
  139. ;;
  140. esac
  141. # Note: order is significant - the case branches are not exclusive.
  142. case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
  143. *:NetBSD:*:*)
  144. # NetBSD (nbsd) targets should (where applicable) match one or
  145. # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
  146. # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
  147. # switched to ELF, *-*-netbsd* would select the old
  148. # object file format. This provides both forward
  149. # compatibility and a consistent mechanism for selecting the
  150. # object file format.
  151. #
  152. # Note: NetBSD doesn't particularly care about the vendor
  153. # portion of the name. We always set it to "unknown".
  154. sysctl="sysctl -n hw.machine_arch"
  155. UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
  156. "/sbin/$sysctl" 2>/dev/null || \
  157. "/usr/sbin/$sysctl" 2>/dev/null || \
  158. echo unknown)`
  159. case "$UNAME_MACHINE_ARCH" in
  160. armeb) machine=armeb-unknown ;;
  161. arm*) machine=arm-unknown ;;
  162. sh3el) machine=shl-unknown ;;
  163. sh3eb) machine=sh-unknown ;;
  164. sh5el) machine=sh5le-unknown ;;
  165. earmv*)
  166. arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
  167. endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
  168. machine="${arch}${endian}"-unknown
  169. ;;
  170. *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
  171. esac
  172. # The Operating System including object format, if it has switched
  173. # to ELF recently (or will in the future) and ABI.
  174. case "$UNAME_MACHINE_ARCH" in
  175. earm*)
  176. os=netbsdelf
  177. ;;
  178. arm*|i386|m68k|ns32k|sh3*|sparc|vax)
  179. set_cc_for_build
  180. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  181. | grep -q __ELF__
  182. then
  183. # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
  184. # Return netbsd for either. FIX?
  185. os=netbsd
  186. else
  187. os=netbsdelf
  188. fi
  189. ;;
  190. *)
  191. os=netbsd
  192. ;;
  193. esac
  194. # Determine ABI tags.
  195. case "$UNAME_MACHINE_ARCH" in
  196. earm*)
  197. expr='s/^earmv[0-9]/-eabi/;s/eb$//'
  198. abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
  199. ;;
  200. esac
  201. # The OS release
  202. # Debian GNU/NetBSD machines have a different userland, and
  203. # thus, need a distinct triplet. However, they do not need
  204. # kernel version information, so it can be replaced with a
  205. # suitable tag, in the style of linux-gnu.
  206. case "$UNAME_VERSION" in
  207. Debian*)
  208. release='-gnu'
  209. ;;
  210. *)
  211. release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
  212. ;;
  213. esac
  214. # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
  215. # contains redundant information, the shorter form:
  216. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  217. echo "$machine-${os}${release}${abi-}"
  218. exit ;;
  219. *:Bitrig:*:*)
  220. UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
  221. echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
  222. exit ;;
  223. *:OpenBSD:*:*)
  224. UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  225. echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
  226. exit ;;
  227. *:LibertyBSD:*:*)
  228. UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
  229. echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
  230. exit ;;
  231. *:MidnightBSD:*:*)
  232. echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
  233. exit ;;
  234. *:ekkoBSD:*:*)
  235. echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
  236. exit ;;
  237. *:SolidBSD:*:*)
  238. echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
  239. exit ;;
  240. macppc:MirBSD:*:*)
  241. echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
  242. exit ;;
  243. *:MirBSD:*:*)
  244. echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
  245. exit ;;
  246. *:Sortix:*:*)
  247. echo "$UNAME_MACHINE"-unknown-sortix
  248. exit ;;
  249. *:Redox:*:*)
  250. echo "$UNAME_MACHINE"-unknown-redox
  251. exit ;;
  252. mips:OSF1:*.*)
  253. echo mips-dec-osf1
  254. exit ;;
  255. alpha:OSF1:*:*)
  256. case $UNAME_RELEASE in
  257. *4.0)
  258. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  259. ;;
  260. *5.*)
  261. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  262. ;;
  263. esac
  264. # According to Compaq, /usr/sbin/psrinfo has been available on
  265. # OSF/1 and Tru64 systems produced since 1995. I hope that
  266. # covers most systems running today. This code pipes the CPU
  267. # types through head -n 1, so we only detect the type of CPU 0.
  268. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
  269. case "$ALPHA_CPU_TYPE" in
  270. "EV4 (21064)")
  271. UNAME_MACHINE=alpha ;;
  272. "EV4.5 (21064)")
  273. UNAME_MACHINE=alpha ;;
  274. "LCA4 (21066/21068)")
  275. UNAME_MACHINE=alpha ;;
  276. "EV5 (21164)")
  277. UNAME_MACHINE=alphaev5 ;;
  278. "EV5.6 (21164A)")
  279. UNAME_MACHINE=alphaev56 ;;
  280. "EV5.6 (21164PC)")
  281. UNAME_MACHINE=alphapca56 ;;
  282. "EV5.7 (21164PC)")
  283. UNAME_MACHINE=alphapca57 ;;
  284. "EV6 (21264)")
  285. UNAME_MACHINE=alphaev6 ;;
  286. "EV6.7 (21264A)")
  287. UNAME_MACHINE=alphaev67 ;;
  288. "EV6.8CB (21264C)")
  289. UNAME_MACHINE=alphaev68 ;;
  290. "EV6.8AL (21264B)")
  291. UNAME_MACHINE=alphaev68 ;;
  292. "EV6.8CX (21264D)")
  293. UNAME_MACHINE=alphaev68 ;;
  294. "EV6.9A (21264/EV69A)")
  295. UNAME_MACHINE=alphaev69 ;;
  296. "EV7 (21364)")
  297. UNAME_MACHINE=alphaev7 ;;
  298. "EV7.9 (21364A)")
  299. UNAME_MACHINE=alphaev79 ;;
  300. esac
  301. # A Pn.n version is a patched version.
  302. # A Vn.n version is a released version.
  303. # A Tn.n version is a released field test version.
  304. # A Xn.n version is an unreleased experimental baselevel.
  305. # 1.2 uses "1.2" for uname -r.
  306. echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
  307. # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
  308. exitcode=$?
  309. trap '' 0
  310. exit $exitcode ;;
  311. Amiga*:UNIX_System_V:4.0:*)
  312. echo m68k-unknown-sysv4
  313. exit ;;
  314. *:[Aa]miga[Oo][Ss]:*:*)
  315. echo "$UNAME_MACHINE"-unknown-amigaos
  316. exit ;;
  317. *:[Mm]orph[Oo][Ss]:*:*)
  318. echo "$UNAME_MACHINE"-unknown-morphos
  319. exit ;;
  320. *:OS/390:*:*)
  321. echo i370-ibm-openedition
  322. exit ;;
  323. *:z/VM:*:*)
  324. echo s390-ibm-zvmoe
  325. exit ;;
  326. *:OS400:*:*)
  327. echo powerpc-ibm-os400
  328. exit ;;
  329. arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  330. echo arm-acorn-riscix"$UNAME_RELEASE"
  331. exit ;;
  332. arm*:riscos:*:*|arm*:RISCOS:*:*)
  333. echo arm-unknown-riscos
  334. exit ;;
  335. SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  336. echo hppa1.1-hitachi-hiuxmpp
  337. exit ;;
  338. Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
  339. # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
  340. if test "`(/bin/universe) 2>/dev/null`" = att ; then
  341. echo pyramid-pyramid-sysv3
  342. else
  343. echo pyramid-pyramid-bsd
  344. fi
  345. exit ;;
  346. NILE*:*:*:dcosx)
  347. echo pyramid-pyramid-svr4
  348. exit ;;
  349. DRS?6000:unix:4.0:6*)
  350. echo sparc-icl-nx6
  351. exit ;;
  352. DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
  353. case `/usr/bin/uname -p` in
  354. sparc) echo sparc-icl-nx7; exit ;;
  355. esac ;;
  356. s390x:SunOS:*:*)
  357. echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
  358. exit ;;
  359. sun4H:SunOS:5.*:*)
  360. echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
  361. exit ;;
  362. sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  363. echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
  364. exit ;;
  365. i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
  366. echo i386-pc-auroraux"$UNAME_RELEASE"
  367. exit ;;
  368. i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
  369. UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
  370. case `isainfo -b` in
  371. 32)
  372. echo i386-pc-solaris2"$UNAME_REL"
  373. ;;
  374. 64)
  375. echo x86_64-pc-solaris2"$UNAME_REL"
  376. ;;
  377. esac
  378. exit ;;
  379. sun4*:SunOS:6*:*)
  380. # According to config.sub, this is the proper way to canonicalize
  381. # SunOS6. Hard to guess exactly what SunOS6 will be like, but
  382. # it's likely to be more like Solaris than SunOS4.
  383. echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
  384. exit ;;
  385. sun4*:SunOS:*:*)
  386. case "`/usr/bin/arch -k`" in
  387. Series*|S4*)
  388. UNAME_RELEASE=`uname -v`
  389. ;;
  390. esac
  391. # Japanese Language versions have a version number like `4.1.3-JL'.
  392. echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
  393. exit ;;
  394. sun3*:SunOS:*:*)
  395. echo m68k-sun-sunos"$UNAME_RELEASE"
  396. exit ;;
  397. sun*:*:4.2BSD:*)
  398. UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  399. test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
  400. case "`/bin/arch`" in
  401. sun3)
  402. echo m68k-sun-sunos"$UNAME_RELEASE"
  403. ;;
  404. sun4)
  405. echo sparc-sun-sunos"$UNAME_RELEASE"
  406. ;;
  407. esac
  408. exit ;;
  409. aushp:SunOS:*:*)
  410. echo sparc-auspex-sunos"$UNAME_RELEASE"
  411. exit ;;
  412. # The situation for MiNT is a little confusing. The machine name
  413. # can be virtually everything (everything which is not
  414. # "atarist" or "atariste" at least should have a processor
  415. # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
  416. # to the lowercase version "mint" (or "freemint"). Finally
  417. # the system name "TOS" denotes a system which is actually not
  418. # MiNT. But MiNT is downward compatible to TOS, so this should
  419. # be no problem.
  420. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  421. echo m68k-atari-mint"$UNAME_RELEASE"
  422. exit ;;
  423. atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  424. echo m68k-atari-mint"$UNAME_RELEASE"
  425. exit ;;
  426. *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  427. echo m68k-atari-mint"$UNAME_RELEASE"
  428. exit ;;
  429. milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  430. echo m68k-milan-mint"$UNAME_RELEASE"
  431. exit ;;
  432. hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  433. echo m68k-hades-mint"$UNAME_RELEASE"
  434. exit ;;
  435. *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  436. echo m68k-unknown-mint"$UNAME_RELEASE"
  437. exit ;;
  438. m68k:machten:*:*)
  439. echo m68k-apple-machten"$UNAME_RELEASE"
  440. exit ;;
  441. powerpc:machten:*:*)
  442. echo powerpc-apple-machten"$UNAME_RELEASE"
  443. exit ;;
  444. RISC*:Mach:*:*)
  445. echo mips-dec-mach_bsd4.3
  446. exit ;;
  447. RISC*:ULTRIX:*:*)
  448. echo mips-dec-ultrix"$UNAME_RELEASE"
  449. exit ;;
  450. VAX*:ULTRIX*:*:*)
  451. echo vax-dec-ultrix"$UNAME_RELEASE"
  452. exit ;;
  453. 2020:CLIX:*:* | 2430:CLIX:*:*)
  454. echo clipper-intergraph-clix"$UNAME_RELEASE"
  455. exit ;;
  456. mips:*:*:UMIPS | mips:*:*:RISCos)
  457. set_cc_for_build
  458. sed 's/^ //' << EOF > "$dummy.c"
  459. #ifdef __cplusplus
  460. #include <stdio.h> /* for printf() prototype */
  461. int main (int argc, char *argv[]) {
  462. #else
  463. int main (argc, argv) int argc; char *argv[]; {
  464. #endif
  465. #if defined (host_mips) && defined (MIPSEB)
  466. #if defined (SYSTYPE_SYSV)
  467. printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
  468. #endif
  469. #if defined (SYSTYPE_SVR4)
  470. printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
  471. #endif
  472. #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
  473. printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
  474. #endif
  475. #endif
  476. exit (-1);
  477. }
  478. EOF
  479. $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
  480. dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
  481. SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
  482. { echo "$SYSTEM_NAME"; exit; }
  483. echo mips-mips-riscos"$UNAME_RELEASE"
  484. exit ;;
  485. Motorola:PowerMAX_OS:*:*)
  486. echo powerpc-motorola-powermax
  487. exit ;;
  488. Motorola:*:4.3:PL8-*)
  489. echo powerpc-harris-powermax
  490. exit ;;
  491. Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
  492. echo powerpc-harris-powermax
  493. exit ;;
  494. Night_Hawk:Power_UNIX:*:*)
  495. echo powerpc-harris-powerunix
  496. exit ;;
  497. m88k:CX/UX:7*:*)
  498. echo m88k-harris-cxux7
  499. exit ;;
  500. m88k:*:4*:R4*)
  501. echo m88k-motorola-sysv4
  502. exit ;;
  503. m88k:*:3*:R3*)
  504. echo m88k-motorola-sysv3
  505. exit ;;
  506. AViiON:dgux:*:*)
  507. # DG/UX returns AViiON for all architectures
  508. UNAME_PROCESSOR=`/usr/bin/uname -p`
  509. if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
  510. then
  511. if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
  512. [ "$TARGET_BINARY_INTERFACE"x = x ]
  513. then
  514. echo m88k-dg-dgux"$UNAME_RELEASE"
  515. else
  516. echo m88k-dg-dguxbcs"$UNAME_RELEASE"
  517. fi
  518. else
  519. echo i586-dg-dgux"$UNAME_RELEASE"
  520. fi
  521. exit ;;
  522. M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  523. echo m88k-dolphin-sysv3
  524. exit ;;
  525. M88*:*:R3*:*)
  526. # Delta 88k system running SVR3
  527. echo m88k-motorola-sysv3
  528. exit ;;
  529. XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  530. echo m88k-tektronix-sysv3
  531. exit ;;
  532. Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  533. echo m68k-tektronix-bsd
  534. exit ;;
  535. *:IRIX*:*:*)
  536. echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
  537. exit ;;
  538. ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
  539. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
  540. exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
  541. i*86:AIX:*:*)
  542. echo i386-ibm-aix
  543. exit ;;
  544. ia64:AIX:*:*)
  545. if [ -x /usr/bin/oslevel ] ; then
  546. IBM_REV=`/usr/bin/oslevel`
  547. else
  548. IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
  549. fi
  550. echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
  551. exit ;;
  552. *:AIX:2:3)
  553. if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  554. set_cc_for_build
  555. sed 's/^ //' << EOF > "$dummy.c"
  556. #include <sys/systemcfg.h>
  557. main()
  558. {
  559. if (!__power_pc())
  560. exit(1);
  561. puts("powerpc-ibm-aix3.2.5");
  562. exit(0);
  563. }
  564. EOF
  565. if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
  566. then
  567. echo "$SYSTEM_NAME"
  568. else
  569. echo rs6000-ibm-aix3.2.5
  570. fi
  571. elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  572. echo rs6000-ibm-aix3.2.4
  573. else
  574. echo rs6000-ibm-aix3.2
  575. fi
  576. exit ;;
  577. *:AIX:*:[4567])
  578. IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  579. if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
  580. IBM_ARCH=rs6000
  581. else
  582. IBM_ARCH=powerpc
  583. fi
  584. if [ -x /usr/bin/lslpp ] ; then
  585. IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
  586. awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
  587. else
  588. IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
  589. fi
  590. echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
  591. exit ;;
  592. *:AIX:*:*)
  593. echo rs6000-ibm-aix
  594. exit ;;
  595. ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
  596. echo romp-ibm-bsd4.4
  597. exit ;;
  598. ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
  599. echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
  600. exit ;; # report: romp-ibm BSD 4.3
  601. *:BOSX:*:*)
  602. echo rs6000-bull-bosx
  603. exit ;;
  604. DPX/2?00:B.O.S.:*:*)
  605. echo m68k-bull-sysv3
  606. exit ;;
  607. 9000/[34]??:4.3bsd:1.*:*)
  608. echo m68k-hp-bsd
  609. exit ;;
  610. hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  611. echo m68k-hp-bsd4.4
  612. exit ;;
  613. 9000/[34678]??:HP-UX:*:*)
  614. HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
  615. case "$UNAME_MACHINE" in
  616. 9000/31?) HP_ARCH=m68000 ;;
  617. 9000/[34]??) HP_ARCH=m68k ;;
  618. 9000/[678][0-9][0-9])
  619. if [ -x /usr/bin/getconf ]; then
  620. sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  621. sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  622. case "$sc_cpu_version" in
  623. 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
  624. 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
  625. 532) # CPU_PA_RISC2_0
  626. case "$sc_kernel_bits" in
  627. 32) HP_ARCH=hppa2.0n ;;
  628. 64) HP_ARCH=hppa2.0w ;;
  629. '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
  630. esac ;;
  631. esac
  632. fi
  633. if [ "$HP_ARCH" = "" ]; then
  634. set_cc_for_build
  635. sed 's/^ //' << EOF > "$dummy.c"
  636. #define _HPUX_SOURCE
  637. #include <stdlib.h>
  638. #include <unistd.h>
  639. int main ()
  640. {
  641. #if defined(_SC_KERNEL_BITS)
  642. long bits = sysconf(_SC_KERNEL_BITS);
  643. #endif
  644. long cpu = sysconf (_SC_CPU_VERSION);
  645. switch (cpu)
  646. {
  647. case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  648. case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  649. case CPU_PA_RISC2_0:
  650. #if defined(_SC_KERNEL_BITS)
  651. switch (bits)
  652. {
  653. case 64: puts ("hppa2.0w"); break;
  654. case 32: puts ("hppa2.0n"); break;
  655. default: puts ("hppa2.0"); break;
  656. } break;
  657. #else /* !defined(_SC_KERNEL_BITS) */
  658. puts ("hppa2.0"); break;
  659. #endif
  660. default: puts ("hppa1.0"); break;
  661. }
  662. exit (0);
  663. }
  664. EOF
  665. (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
  666. test -z "$HP_ARCH" && HP_ARCH=hppa
  667. fi ;;
  668. esac
  669. if [ "$HP_ARCH" = hppa2.0w ]
  670. then
  671. set_cc_for_build
  672. # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
  673. # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
  674. # generating 64-bit code. GNU and HP use different nomenclature:
  675. #
  676. # $ CC_FOR_BUILD=cc ./config.guess
  677. # => hppa2.0w-hp-hpux11.23
  678. # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
  679. # => hppa64-hp-hpux11.23
  680. if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
  681. grep -q __LP64__
  682. then
  683. HP_ARCH=hppa2.0w
  684. else
  685. HP_ARCH=hppa64
  686. fi
  687. fi
  688. echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
  689. exit ;;
  690. ia64:HP-UX:*:*)
  691. HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
  692. echo ia64-hp-hpux"$HPUX_REV"
  693. exit ;;
  694. 3050*:HI-UX:*:*)
  695. set_cc_for_build
  696. sed 's/^ //' << EOF > "$dummy.c"
  697. #include <unistd.h>
  698. int
  699. main ()
  700. {
  701. long cpu = sysconf (_SC_CPU_VERSION);
  702. /* The order matters, because CPU_IS_HP_MC68K erroneously returns
  703. true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
  704. results, however. */
  705. if (CPU_IS_PA_RISC (cpu))
  706. {
  707. switch (cpu)
  708. {
  709. case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  710. case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  711. case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  712. default: puts ("hppa-hitachi-hiuxwe2"); break;
  713. }
  714. }
  715. else if (CPU_IS_HP_MC68K (cpu))
  716. puts ("m68k-hitachi-hiuxwe2");
  717. else puts ("unknown-hitachi-hiuxwe2");
  718. exit (0);
  719. }
  720. EOF
  721. $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
  722. { echo "$SYSTEM_NAME"; exit; }
  723. echo unknown-hitachi-hiuxwe2
  724. exit ;;
  725. 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
  726. echo hppa1.1-hp-bsd
  727. exit ;;
  728. 9000/8??:4.3bsd:*:*)
  729. echo hppa1.0-hp-bsd
  730. exit ;;
  731. *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
  732. echo hppa1.0-hp-mpeix
  733. exit ;;
  734. hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
  735. echo hppa1.1-hp-osf
  736. exit ;;
  737. hp8??:OSF1:*:*)
  738. echo hppa1.0-hp-osf
  739. exit ;;
  740. i*86:OSF1:*:*)
  741. if [ -x /usr/sbin/sysversion ] ; then
  742. echo "$UNAME_MACHINE"-unknown-osf1mk
  743. else
  744. echo "$UNAME_MACHINE"-unknown-osf1
  745. fi
  746. exit ;;
  747. parisc*:Lites*:*:*)
  748. echo hppa1.1-hp-lites
  749. exit ;;
  750. C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  751. echo c1-convex-bsd
  752. exit ;;
  753. C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  754. if getsysinfo -f scalar_acc
  755. then echo c32-convex-bsd
  756. else echo c2-convex-bsd
  757. fi
  758. exit ;;
  759. C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  760. echo c34-convex-bsd
  761. exit ;;
  762. C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  763. echo c38-convex-bsd
  764. exit ;;
  765. C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  766. echo c4-convex-bsd
  767. exit ;;
  768. CRAY*Y-MP:*:*:*)
  769. echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
  770. exit ;;
  771. CRAY*[A-Z]90:*:*:*)
  772. echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
  773. | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
  774. -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
  775. -e 's/\.[^.]*$/.X/'
  776. exit ;;
  777. CRAY*TS:*:*:*)
  778. echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
  779. exit ;;
  780. CRAY*T3E:*:*:*)
  781. echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
  782. exit ;;
  783. CRAY*SV1:*:*:*)
  784. echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
  785. exit ;;
  786. *:UNICOS/mp:*:*)
  787. echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
  788. exit ;;
  789. F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  790. FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
  791. FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
  792. FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
  793. echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  794. exit ;;
  795. 5000:UNIX_System_V:4.*:*)
  796. FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
  797. FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
  798. echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  799. exit ;;
  800. i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  801. echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
  802. exit ;;
  803. sparc*:BSD/OS:*:*)
  804. echo sparc-unknown-bsdi"$UNAME_RELEASE"
  805. exit ;;
  806. *:BSD/OS:*:*)
  807. echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
  808. exit ;;
  809. arm:FreeBSD:*:*)
  810. UNAME_PROCESSOR=`uname -p`
  811. set_cc_for_build
  812. if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  813. | grep -q __ARM_PCS_VFP
  814. then
  815. echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
  816. else
  817. echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
  818. fi
  819. exit ;;
  820. *:FreeBSD:*:*)
  821. UNAME_PROCESSOR=`/usr/bin/uname -p`
  822. case "$UNAME_PROCESSOR" in
  823. amd64)
  824. UNAME_PROCESSOR=x86_64 ;;
  825. i386)
  826. UNAME_PROCESSOR=i586 ;;
  827. esac
  828. echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
  829. exit ;;
  830. i*:CYGWIN*:*)
  831. echo "$UNAME_MACHINE"-pc-cygwin
  832. exit ;;
  833. *:MINGW64*:*)
  834. echo "$UNAME_MACHINE"-pc-mingw64
  835. exit ;;
  836. *:MINGW*:*)
  837. echo "$UNAME_MACHINE"-pc-mingw32
  838. exit ;;
  839. *:MSYS*:*)
  840. echo "$UNAME_MACHINE"-pc-msys
  841. exit ;;
  842. i*:PW*:*)
  843. echo "$UNAME_MACHINE"-pc-pw32
  844. exit ;;
  845. *:Interix*:*)
  846. case "$UNAME_MACHINE" in
  847. x86)
  848. echo i586-pc-interix"$UNAME_RELEASE"
  849. exit ;;
  850. authenticamd | genuineintel | EM64T)
  851. echo x86_64-unknown-interix"$UNAME_RELEASE"
  852. exit ;;
  853. IA64)
  854. echo ia64-unknown-interix"$UNAME_RELEASE"
  855. exit ;;
  856. esac ;;
  857. i*:UWIN*:*)
  858. echo "$UNAME_MACHINE"-pc-uwin
  859. exit ;;
  860. amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
  861. echo x86_64-pc-cygwin
  862. exit ;;
  863. prep*:SunOS:5.*:*)
  864. echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
  865. exit ;;
  866. *:GNU:*:*)
  867. # the GNU system
  868. echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
  869. exit ;;
  870. *:GNU/*:*:*)
  871. # other systems with GNU libc and userland
  872. echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
  873. exit ;;
  874. *:Minix:*:*)
  875. echo "$UNAME_MACHINE"-unknown-minix
  876. exit ;;
  877. aarch64:Linux:*:*)
  878. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  879. exit ;;
  880. aarch64_be:Linux:*:*)
  881. UNAME_MACHINE=aarch64_be
  882. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  883. exit ;;
  884. alpha:Linux:*:*)
  885. case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  886. EV5) UNAME_MACHINE=alphaev5 ;;
  887. EV56) UNAME_MACHINE=alphaev56 ;;
  888. PCA56) UNAME_MACHINE=alphapca56 ;;
  889. PCA57) UNAME_MACHINE=alphapca56 ;;
  890. EV6) UNAME_MACHINE=alphaev6 ;;
  891. EV67) UNAME_MACHINE=alphaev67 ;;
  892. EV68*) UNAME_MACHINE=alphaev68 ;;
  893. esac
  894. objdump --private-headers /bin/sh | grep -q ld.so.1
  895. if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
  896. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  897. exit ;;
  898. arc:Linux:*:* | arceb:Linux:*:*)
  899. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  900. exit ;;
  901. arm*:Linux:*:*)
  902. set_cc_for_build
  903. if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  904. | grep -q __ARM_EABI__
  905. then
  906. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  907. else
  908. if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  909. | grep -q __ARM_PCS_VFP
  910. then
  911. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
  912. else
  913. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
  914. fi
  915. fi
  916. exit ;;
  917. avr32*:Linux:*:*)
  918. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  919. exit ;;
  920. cris:Linux:*:*)
  921. echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
  922. exit ;;
  923. crisv32:Linux:*:*)
  924. echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
  925. exit ;;
  926. e2k:Linux:*:*)
  927. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  928. exit ;;
  929. frv:Linux:*:*)
  930. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  931. exit ;;
  932. hexagon:Linux:*:*)
  933. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  934. exit ;;
  935. i*86:Linux:*:*)
  936. echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
  937. exit ;;
  938. ia64:Linux:*:*)
  939. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  940. exit ;;
  941. k1om:Linux:*:*)
  942. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  943. exit ;;
  944. m32r*:Linux:*:*)
  945. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  946. exit ;;
  947. m68*:Linux:*:*)
  948. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  949. exit ;;
  950. mips:Linux:*:* | mips64:Linux:*:*)
  951. set_cc_for_build
  952. sed 's/^ //' << EOF > "$dummy.c"
  953. #undef CPU
  954. #undef ${UNAME_MACHINE}
  955. #undef ${UNAME_MACHINE}el
  956. #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  957. CPU=${UNAME_MACHINE}el
  958. #else
  959. #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  960. CPU=${UNAME_MACHINE}
  961. #else
  962. CPU=
  963. #endif
  964. #endif
  965. EOF
  966. eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
  967. test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
  968. ;;
  969. mips64el:Linux:*:*)
  970. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  971. exit ;;
  972. openrisc*:Linux:*:*)
  973. echo or1k-unknown-linux-"$LIBC"
  974. exit ;;
  975. or32:Linux:*:* | or1k*:Linux:*:*)
  976. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  977. exit ;;
  978. padre:Linux:*:*)
  979. echo sparc-unknown-linux-"$LIBC"
  980. exit ;;
  981. parisc64:Linux:*:* | hppa64:Linux:*:*)
  982. echo hppa64-unknown-linux-"$LIBC"
  983. exit ;;
  984. parisc:Linux:*:* | hppa:Linux:*:*)
  985. # Look for CPU level
  986. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  987. PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
  988. PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
  989. *) echo hppa-unknown-linux-"$LIBC" ;;
  990. esac
  991. exit ;;
  992. ppc64:Linux:*:*)
  993. echo powerpc64-unknown-linux-"$LIBC"
  994. exit ;;
  995. ppc:Linux:*:*)
  996. echo powerpc-unknown-linux-"$LIBC"
  997. exit ;;
  998. ppc64le:Linux:*:*)
  999. echo powerpc64le-unknown-linux-"$LIBC"
  1000. exit ;;
  1001. ppcle:Linux:*:*)
  1002. echo powerpcle-unknown-linux-"$LIBC"
  1003. exit ;;
  1004. riscv32:Linux:*:* | riscv64:Linux:*:*)
  1005. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  1006. exit ;;
  1007. s390:Linux:*:* | s390x:Linux:*:*)
  1008. echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
  1009. exit ;;
  1010. sh64*:Linux:*:*)
  1011. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  1012. exit ;;
  1013. sh*:Linux:*:*)
  1014. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  1015. exit ;;
  1016. sparc:Linux:*:* | sparc64:Linux:*:*)
  1017. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  1018. exit ;;
  1019. tile*:Linux:*:*)
  1020. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  1021. exit ;;
  1022. vax:Linux:*:*)
  1023. echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
  1024. exit ;;
  1025. x86_64:Linux:*:*)
  1026. echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
  1027. exit ;;
  1028. xtensa*:Linux:*:*)
  1029. echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
  1030. exit ;;
  1031. i*86:DYNIX/ptx:4*:*)
  1032. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  1033. # earlier versions are messed up and put the nodename in both
  1034. # sysname and nodename.
  1035. echo i386-sequent-sysv4
  1036. exit ;;
  1037. i*86:UNIX_SV:4.2MP:2.*)
  1038. # Unixware is an offshoot of SVR4, but it has its own version
  1039. # number series starting with 2...
  1040. # I am not positive that other SVR4 systems won't match this,
  1041. # I just have to hope. -- rms.
  1042. # Use sysv4.2uw... so that sysv4* matches it.
  1043. echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
  1044. exit ;;
  1045. i*86:OS/2:*:*)
  1046. # If we were able to find `uname', then EMX Unix compatibility
  1047. # is probably installed.
  1048. echo "$UNAME_MACHINE"-pc-os2-emx
  1049. exit ;;
  1050. i*86:XTS-300:*:STOP)
  1051. echo "$UNAME_MACHINE"-unknown-stop
  1052. exit ;;
  1053. i*86:atheos:*:*)
  1054. echo "$UNAME_MACHINE"-unknown-atheos
  1055. exit ;;
  1056. i*86:syllable:*:*)
  1057. echo "$UNAME_MACHINE"-pc-syllable
  1058. exit ;;
  1059. i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
  1060. echo i386-unknown-lynxos"$UNAME_RELEASE"
  1061. exit ;;
  1062. i*86:*DOS:*:*)
  1063. echo "$UNAME_MACHINE"-pc-msdosdjgpp
  1064. exit ;;
  1065. i*86:*:4.*:*)
  1066. UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
  1067. if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  1068. echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
  1069. else
  1070. echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
  1071. fi
  1072. exit ;;
  1073. i*86:*:5:[678]*)
  1074. # UnixWare 7.x, OpenUNIX and OpenServer 6.
  1075. case `/bin/uname -X | grep "^Machine"` in
  1076. *486*) UNAME_MACHINE=i486 ;;
  1077. *Pentium) UNAME_MACHINE=i586 ;;
  1078. *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  1079. esac
  1080. echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
  1081. exit ;;
  1082. i*86:*:3.2:*)
  1083. if test -f /usr/options/cb.name; then
  1084. UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  1085. echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
  1086. elif /bin/uname -X 2>/dev/null >/dev/null ; then
  1087. UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
  1088. (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
  1089. (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
  1090. && UNAME_MACHINE=i586
  1091. (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
  1092. && UNAME_MACHINE=i686
  1093. (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
  1094. && UNAME_MACHINE=i686
  1095. echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
  1096. else
  1097. echo "$UNAME_MACHINE"-pc-sysv32
  1098. fi
  1099. exit ;;
  1100. pc:*:*:*)
  1101. # Left here for compatibility:
  1102. # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1103. # the processor, so we play safe by assuming i586.
  1104. # Note: whatever this is, it MUST be the same as what config.sub
  1105. # prints for the "djgpp" host, or else GDB configure will decide that
  1106. # this is a cross-build.
  1107. echo i586-pc-msdosdjgpp
  1108. exit ;;
  1109. Intel:Mach:3*:*)
  1110. echo i386-pc-mach3
  1111. exit ;;
  1112. paragon:*:*:*)
  1113. echo i860-intel-osf1
  1114. exit ;;
  1115. i860:*:4.*:*) # i860-SVR4
  1116. if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  1117. echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
  1118. else # Add other i860-SVR4 vendors below as they are discovered.
  1119. echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
  1120. fi
  1121. exit ;;
  1122. mini*:CTIX:SYS*5:*)
  1123. # "miniframe"
  1124. echo m68010-convergent-sysv
  1125. exit ;;
  1126. mc68k:UNIX:SYSTEM5:3.51m)
  1127. echo m68k-convergent-sysv
  1128. exit ;;
  1129. M680?0:D-NIX:5.3:*)
  1130. echo m68k-diab-dnix
  1131. exit ;;
  1132. M68*:*:R3V[5678]*:*)
  1133. test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
  1134. 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)
  1135. OS_REL=''
  1136. test -r /etc/.relid \
  1137. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1138. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1139. && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
  1140. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1141. && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
  1142. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1143. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1144. && { echo i486-ncr-sysv4; exit; } ;;
  1145. NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  1146. OS_REL='.3'
  1147. test -r /etc/.relid \
  1148. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1149. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1150. && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
  1151. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1152. && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
  1153. /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
  1154. && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
  1155. m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  1156. echo m68k-unknown-lynxos"$UNAME_RELEASE"
  1157. exit ;;
  1158. mc68030:UNIX_System_V:4.*:*)
  1159. echo m68k-atari-sysv4
  1160. exit ;;
  1161. TSUNAMI:LynxOS:2.*:*)
  1162. echo sparc-unknown-lynxos"$UNAME_RELEASE"
  1163. exit ;;
  1164. rs6000:LynxOS:2.*:*)
  1165. echo rs6000-unknown-lynxos"$UNAME_RELEASE"
  1166. exit ;;
  1167. PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
  1168. echo powerpc-unknown-lynxos"$UNAME_RELEASE"
  1169. exit ;;
  1170. SM[BE]S:UNIX_SV:*:*)
  1171. echo mips-dde-sysv"$UNAME_RELEASE"
  1172. exit ;;
  1173. RM*:ReliantUNIX-*:*:*)
  1174. echo mips-sni-sysv4
  1175. exit ;;
  1176. RM*:SINIX-*:*:*)
  1177. echo mips-sni-sysv4
  1178. exit ;;
  1179. *:SINIX-*:*:*)
  1180. if uname -p 2>/dev/null >/dev/null ; then
  1181. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1182. echo "$UNAME_MACHINE"-sni-sysv4
  1183. else
  1184. echo ns32k-sni-sysv
  1185. fi
  1186. exit ;;
  1187. PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1188. # says <Richard.M.Bartel@ccMail.Census.GOV>
  1189. echo i586-unisys-sysv4
  1190. exit ;;
  1191. *:UNIX_System_V:4*:FTX*)
  1192. # From Gerald Hewes <hewes@openmarket.com>.
  1193. # How about differentiating between stratus architectures? -djm
  1194. echo hppa1.1-stratus-sysv4
  1195. exit ;;
  1196. *:*:*:FTX*)
  1197. # From seanf@swdc.stratus.com.
  1198. echo i860-stratus-sysv4
  1199. exit ;;
  1200. i*86:VOS:*:*)
  1201. # From Paul.Green@stratus.com.
  1202. echo "$UNAME_MACHINE"-stratus-vos
  1203. exit ;;
  1204. *:VOS:*:*)
  1205. # From Paul.Green@stratus.com.
  1206. echo hppa1.1-stratus-vos
  1207. exit ;;
  1208. mc68*:A/UX:*:*)
  1209. echo m68k-apple-aux"$UNAME_RELEASE"
  1210. exit ;;
  1211. news*:NEWS-OS:6*:*)
  1212. echo mips-sony-newsos6
  1213. exit ;;
  1214. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  1215. if [ -d /usr/nec ]; then
  1216. echo mips-nec-sysv"$UNAME_RELEASE"
  1217. else
  1218. echo mips-unknown-sysv"$UNAME_RELEASE"
  1219. fi
  1220. exit ;;
  1221. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  1222. echo powerpc-be-beos
  1223. exit ;;
  1224. BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
  1225. echo powerpc-apple-beos
  1226. exit ;;
  1227. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
  1228. echo i586-pc-beos
  1229. exit ;;
  1230. BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
  1231. echo i586-pc-haiku
  1232. exit ;;
  1233. x86_64:Haiku:*:*)
  1234. echo x86_64-unknown-haiku
  1235. exit ;;
  1236. SX-4:SUPER-UX:*:*)
  1237. echo sx4-nec-superux"$UNAME_RELEASE"
  1238. exit ;;
  1239. SX-5:SUPER-UX:*:*)
  1240. echo sx5-nec-superux"$UNAME_RELEASE"
  1241. exit ;;
  1242. SX-6:SUPER-UX:*:*)
  1243. echo sx6-nec-superux"$UNAME_RELEASE"
  1244. exit ;;
  1245. SX-7:SUPER-UX:*:*)
  1246. echo sx7-nec-superux"$UNAME_RELEASE"
  1247. exit ;;
  1248. SX-8:SUPER-UX:*:*)
  1249. echo sx8-nec-superux"$UNAME_RELEASE"
  1250. exit ;;
  1251. SX-8R:SUPER-UX:*:*)
  1252. echo sx8r-nec-superux"$UNAME_RELEASE"
  1253. exit ;;
  1254. SX-ACE:SUPER-UX:*:*)
  1255. echo sxace-nec-superux"$UNAME_RELEASE"
  1256. exit ;;
  1257. Power*:Rhapsody:*:*)
  1258. echo powerpc-apple-rhapsody"$UNAME_RELEASE"
  1259. exit ;;
  1260. *:Rhapsody:*:*)
  1261. echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
  1262. exit ;;
  1263. *:Darwin:*:*)
  1264. UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  1265. set_cc_for_build
  1266. if test "$UNAME_PROCESSOR" = unknown ; then
  1267. UNAME_PROCESSOR=powerpc
  1268. fi
  1269. if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
  1270. if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
  1271. if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  1272. (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
  1273. grep IS_64BIT_ARCH >/dev/null
  1274. then
  1275. case $UNAME_PROCESSOR in
  1276. i386) UNAME_PROCESSOR=x86_64 ;;
  1277. powerpc) UNAME_PROCESSOR=powerpc64 ;;
  1278. esac
  1279. fi
  1280. # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
  1281. if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
  1282. (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
  1283. grep IS_PPC >/dev/null
  1284. then
  1285. UNAME_PROCESSOR=powerpc
  1286. fi
  1287. fi
  1288. elif test "$UNAME_PROCESSOR" = i386 ; then
  1289. # Avoid executing cc on OS X 10.9, as it ships with a stub
  1290. # that puts up a graphical alert prompting to install
  1291. # developer tools. Any system running Mac OS X 10.7 or
  1292. # later (Darwin 11 and later) is required to have a 64-bit
  1293. # processor. This is not true of the ARM version of Darwin
  1294. # that Apple uses in portable devices.
  1295. UNAME_PROCESSOR=x86_64
  1296. fi
  1297. echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
  1298. exit ;;
  1299. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1300. UNAME_PROCESSOR=`uname -p`
  1301. if test "$UNAME_PROCESSOR" = x86; then
  1302. UNAME_PROCESSOR=i386
  1303. UNAME_MACHINE=pc
  1304. fi
  1305. echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
  1306. exit ;;
  1307. *:QNX:*:4*)
  1308. echo i386-pc-qnx
  1309. exit ;;
  1310. NEO-*:NONSTOP_KERNEL:*:*)
  1311. echo neo-tandem-nsk"$UNAME_RELEASE"
  1312. exit ;;
  1313. NSE-*:NONSTOP_KERNEL:*:*)
  1314. echo nse-tandem-nsk"$UNAME_RELEASE"
  1315. exit ;;
  1316. NSR-*:NONSTOP_KERNEL:*:*)
  1317. echo nsr-tandem-nsk"$UNAME_RELEASE"
  1318. exit ;;
  1319. NSV-*:NONSTOP_KERNEL:*:*)
  1320. echo nsv-tandem-nsk"$UNAME_RELEASE"
  1321. exit ;;
  1322. NSX-*:NONSTOP_KERNEL:*:*)
  1323. echo nsx-tandem-nsk"$UNAME_RELEASE"
  1324. exit ;;
  1325. *:NonStop-UX:*:*)
  1326. echo mips-compaq-nonstopux
  1327. exit ;;
  1328. BS2000:POSIX*:*:*)
  1329. echo bs2000-siemens-sysv
  1330. exit ;;
  1331. DS/*:UNIX_System_V:*:*)
  1332. echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
  1333. exit ;;
  1334. *:Plan9:*:*)
  1335. # "uname -m" is not consistent, so use $cputype instead. 386
  1336. # is converted to i386 for consistency with other x86
  1337. # operating systems.
  1338. # shellcheck disable=SC2154
  1339. if test "$cputype" = 386; then
  1340. UNAME_MACHINE=i386
  1341. else
  1342. UNAME_MACHINE="$cputype"
  1343. fi
  1344. echo "$UNAME_MACHINE"-unknown-plan9
  1345. exit ;;
  1346. *:TOPS-10:*:*)
  1347. echo pdp10-unknown-tops10
  1348. exit ;;
  1349. *:TENEX:*:*)
  1350. echo pdp10-unknown-tenex
  1351. exit ;;
  1352. KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
  1353. echo pdp10-dec-tops20
  1354. exit ;;
  1355. XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
  1356. echo pdp10-xkl-tops20
  1357. exit ;;
  1358. *:TOPS-20:*:*)
  1359. echo pdp10-unknown-tops20
  1360. exit ;;
  1361. *:ITS:*:*)
  1362. echo pdp10-unknown-its
  1363. exit ;;
  1364. SEI:*:*:SEIUX)
  1365. echo mips-sei-seiux"$UNAME_RELEASE"
  1366. exit ;;
  1367. *:DragonFly:*:*)
  1368. echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
  1369. exit ;;
  1370. *:*VMS:*:*)
  1371. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1372. case "$UNAME_MACHINE" in
  1373. A*) echo alpha-dec-vms ; exit ;;
  1374. I*) echo ia64-dec-vms ; exit ;;
  1375. V*) echo vax-dec-vms ; exit ;;
  1376. esac ;;
  1377. *:XENIX:*:SysV)
  1378. echo i386-pc-xenix
  1379. exit ;;
  1380. i*86:skyos:*:*)
  1381. echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
  1382. exit ;;
  1383. i*86:rdos:*:*)
  1384. echo "$UNAME_MACHINE"-pc-rdos
  1385. exit ;;
  1386. i*86:AROS:*:*)
  1387. echo "$UNAME_MACHINE"-pc-aros
  1388. exit ;;
  1389. x86_64:VMkernel:*:*)
  1390. echo "$UNAME_MACHINE"-unknown-esx
  1391. exit ;;
  1392. amd64:Isilon\ OneFS:*:*)
  1393. echo x86_64-unknown-onefs
  1394. exit ;;
  1395. esac
  1396. echo "$0: unable to guess system type" >&2
  1397. case "$UNAME_MACHINE:$UNAME_SYSTEM" in
  1398. mips:Linux | mips64:Linux)
  1399. # If we got here on MIPS GNU/Linux, output extra information.
  1400. cat >&2 <<EOF
  1401. NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
  1402. the system type. Please install a C compiler and try again.
  1403. EOF
  1404. ;;
  1405. esac
  1406. cat >&2 <<EOF
  1407. This script (version $timestamp), has failed to recognize the
  1408. operating system you are using. If your script is old, overwrite *all*
  1409. copies of config.guess and config.sub with the latest versions from:
  1410. https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
  1411. and
  1412. https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
  1413. If $0 has already been updated, send the following data and any
  1414. information you think might be pertinent to config-patches@gnu.org to
  1415. provide the necessary information to handle your system.
  1416. config.guess timestamp = $timestamp
  1417. uname -m = `(uname -m) 2>/dev/null || echo unknown`
  1418. uname -r = `(uname -r) 2>/dev/null || echo unknown`
  1419. uname -s = `(uname -s) 2>/dev/null || echo unknown`
  1420. uname -v = `(uname -v) 2>/dev/null || echo unknown`
  1421. /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
  1422. /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
  1423. hostinfo = `(hostinfo) 2>/dev/null`
  1424. /bin/universe = `(/bin/universe) 2>/dev/null`
  1425. /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
  1426. /bin/arch = `(/bin/arch) 2>/dev/null`
  1427. /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
  1428. /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
  1429. UNAME_MACHINE = "$UNAME_MACHINE"
  1430. UNAME_RELEASE = "$UNAME_RELEASE"
  1431. UNAME_SYSTEM = "$UNAME_SYSTEM"
  1432. UNAME_VERSION = "$UNAME_VERSION"
  1433. EOF
  1434. exit 1
  1435. # Local variables:
  1436. # eval: (add-hook 'before-save-hook 'time-stamp)
  1437. # time-stamp-start: "timestamp='"
  1438. # time-stamp-format: "%:y-%02m-%02d"
  1439. # time-stamp-end: "'"
  1440. # End: