config.guess 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487
  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.ccensus.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: