config.guess 43 KB

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