patch-lib_libmad_config_guess 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  1. --- xbmc-imx6-13.2.orig/lib/libmad/config.guess 2014-09-02 13:26:18.000000000 +0200
  2. +++ xbmc-imx6-13.2/lib/libmad/config.guess 2014-08-18 15:18:32.461397057 +0200
  3. @@ -1,14 +1,12 @@
  4. #! /bin/sh
  5. # Attempt to guess a canonical system name.
  6. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  7. -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
  8. -# Free Software Foundation, Inc.
  9. +# Copyright 1992-2014 Free Software Foundation, Inc.
  10. -timestamp='2009-04-27'
  11. +timestamp='2014-01-25'
  12. # This file is free software; you can redistribute it and/or modify it
  13. # under the terms of the GNU General Public License as published by
  14. -# the Free Software Foundation; either version 2 of the License, or
  15. +# the Free Software Foundation; either version 3 of the License, or
  16. # (at your option) any later version.
  17. #
  18. # This program is distributed in the hope that it will be useful, but
  19. @@ -17,26 +15,22 @@ timestamp='2009-04-27'
  20. # General Public License for more details.
  21. #
  22. # You should have received a copy of the GNU General Public License
  23. -# along with this program; if not, write to the Free Software
  24. -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  25. -# 02110-1301, USA.
  26. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  27. #
  28. # As a special exception to the GNU General Public License, if you
  29. # distribute this file as part of a program that contains a
  30. # configuration script generated by Autoconf, you may include it under
  31. -# the same distribution terms that you use for the rest of that program.
  32. -
  33. -
  34. -# Originally written by Per Bothner <per@bothner.com>.
  35. -# Please send patches to <config-patches@gnu.org>. Submit a context
  36. -# diff and a properly formatted ChangeLog entry.
  37. +# the same distribution terms that you use for the rest of that
  38. +# program. This Exception is an additional permission under section 7
  39. +# of the GNU General Public License, version 3 ("GPLv3").
  40. #
  41. -# This script attempts to guess a canonical system name similar to
  42. -# config.sub. If it succeeds, it prints the system name on stdout, and
  43. -# exits with 0. Otherwise, it exits with 1.
  44. +# Originally written by Per Bothner.
  45. #
  46. -# The plan is that this can be called by configure scripts if you
  47. -# don't specify an explicit build system type.
  48. +# You can get the latest version of this script from:
  49. +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  50. +#
  51. +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
  52. +
  53. me=`echo "$0" | sed -e 's,.*/,,'`
  54. @@ -56,8 +50,7 @@ version="\
  55. GNU config.guess ($timestamp)
  56. Originally written by Per Bothner.
  57. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
  58. -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  59. +Copyright 1992-2014 Free Software Foundation, Inc.
  60. This is free software; see the source for copying conditions. There is NO
  61. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  62. @@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
  63. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  64. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  65. +case "${UNAME_SYSTEM}" in
  66. +Linux|GNU|GNU/*)
  67. + # If the system lacks a compiler, then just pick glibc.
  68. + # We could probably try harder.
  69. + LIBC=gnu
  70. +
  71. + eval $set_cc_for_build
  72. + cat <<-EOF > $dummy.c
  73. + #include <features.h>
  74. + #if defined(__UCLIBC__)
  75. + LIBC=uclibc
  76. + #elif defined(__dietlibc__)
  77. + LIBC=dietlibc
  78. + #else
  79. + LIBC=gnu
  80. + #endif
  81. + EOF
  82. + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
  83. + ;;
  84. +esac
  85. +
  86. # Note: order is significant - the case branches are not exclusive.
  87. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  88. *:NetBSD:*:*)
  89. # NetBSD (nbsd) targets should (where applicable) match one or
  90. - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
  91. + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
  92. # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
  93. # switched to ELF, *-*-netbsd* would select the old
  94. # object file format. This provides both forward
  95. @@ -170,7 +184,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  96. arm*|i386|m68k|ns32k|sh3*|sparc|vax)
  97. eval $set_cc_for_build
  98. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  99. - | grep __ELF__ >/dev/null
  100. + | grep -q __ELF__
  101. then
  102. # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
  103. # Return netbsd for either. FIX?
  104. @@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  105. fi
  106. ;;
  107. *)
  108. - os=netbsd
  109. + os=netbsd
  110. ;;
  111. esac
  112. # The OS release
  113. @@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  114. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  115. echo "${machine}-${os}${release}"
  116. exit ;;
  117. + *:Bitrig:*:*)
  118. + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
  119. + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
  120. + exit ;;
  121. *:OpenBSD:*:*)
  122. UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  123. echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
  124. @@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  125. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  126. ;;
  127. *5.*)
  128. - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  129. + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  130. ;;
  131. esac
  132. # According to Compaq, /usr/sbin/psrinfo has been available on
  133. @@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  134. # A Xn.n version is an unreleased experimental baselevel.
  135. # 1.2 uses "1.2" for uname -r.
  136. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  137. - exit ;;
  138. + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
  139. + exitcode=$?
  140. + trap '' 0
  141. + exit $exitcode ;;
  142. Alpha\ *:Windows_NT*:*)
  143. # How do we know it's Interix rather than the generic POSIX subsystem?
  144. # Should we change UNAME_MACHINE based on the output of uname instead
  145. @@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  146. echo s390-ibm-zvmoe
  147. exit ;;
  148. *:OS400:*:*)
  149. - echo powerpc-ibm-os400
  150. + echo powerpc-ibm-os400
  151. exit ;;
  152. arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  153. echo arm-acorn-riscix${UNAME_RELEASE}
  154. exit ;;
  155. - arm:riscos:*:*|arm:RISCOS:*:*)
  156. + arm*:riscos:*:*|arm*:RISCOS:*:*)
  157. echo arm-unknown-riscos
  158. exit ;;
  159. SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  160. @@ -333,6 +354,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  161. sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  162. echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  163. exit ;;
  164. + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
  165. + echo i386-pc-auroraux${UNAME_RELEASE}
  166. + exit ;;
  167. i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
  168. eval $set_cc_for_build
  169. SUN_ARCH="i386"
  170. @@ -391,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  171. # MiNT. But MiNT is downward compatible to TOS, so this should
  172. # be no problem.
  173. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  174. - echo m68k-atari-mint${UNAME_RELEASE}
  175. + echo m68k-atari-mint${UNAME_RELEASE}
  176. exit ;;
  177. atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  178. echo m68k-atari-mint${UNAME_RELEASE}
  179. - exit ;;
  180. + exit ;;
  181. *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  182. - echo m68k-atari-mint${UNAME_RELEASE}
  183. + echo m68k-atari-mint${UNAME_RELEASE}
  184. exit ;;
  185. milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  186. - echo m68k-milan-mint${UNAME_RELEASE}
  187. - exit ;;
  188. + echo m68k-milan-mint${UNAME_RELEASE}
  189. + exit ;;
  190. hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  191. - echo m68k-hades-mint${UNAME_RELEASE}
  192. - exit ;;
  193. + echo m68k-hades-mint${UNAME_RELEASE}
  194. + exit ;;
  195. *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  196. - echo m68k-unknown-mint${UNAME_RELEASE}
  197. - exit ;;
  198. + echo m68k-unknown-mint${UNAME_RELEASE}
  199. + exit ;;
  200. m68k:machten:*:*)
  201. echo m68k-apple-machten${UNAME_RELEASE}
  202. exit ;;
  203. @@ -477,8 +501,8 @@ EOF
  204. echo m88k-motorola-sysv3
  205. exit ;;
  206. AViiON:dgux:*:*)
  207. - # DG/UX returns AViiON for all architectures
  208. - UNAME_PROCESSOR=`/usr/bin/uname -p`
  209. + # DG/UX returns AViiON for all architectures
  210. + UNAME_PROCESSOR=`/usr/bin/uname -p`
  211. if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  212. then
  213. if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
  214. @@ -491,7 +515,7 @@ EOF
  215. else
  216. echo i586-dg-dgux${UNAME_RELEASE}
  217. fi
  218. - exit ;;
  219. + exit ;;
  220. M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  221. echo m88k-dolphin-sysv3
  222. exit ;;
  223. @@ -548,7 +572,7 @@ EOF
  224. echo rs6000-ibm-aix3.2
  225. fi
  226. exit ;;
  227. - *:AIX:*:[456])
  228. + *:AIX:*:[4567])
  229. IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  230. if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  231. IBM_ARCH=rs6000
  232. @@ -591,52 +615,52 @@ EOF
  233. 9000/[678][0-9][0-9])
  234. if [ -x /usr/bin/getconf ]; then
  235. sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  236. - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  237. - case "${sc_cpu_version}" in
  238. - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  239. - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  240. - 532) # CPU_PA_RISC2_0
  241. - case "${sc_kernel_bits}" in
  242. - 32) HP_ARCH="hppa2.0n" ;;
  243. - 64) HP_ARCH="hppa2.0w" ;;
  244. + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  245. + case "${sc_cpu_version}" in
  246. + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  247. + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  248. + 532) # CPU_PA_RISC2_0
  249. + case "${sc_kernel_bits}" in
  250. + 32) HP_ARCH="hppa2.0n" ;;
  251. + 64) HP_ARCH="hppa2.0w" ;;
  252. '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
  253. - esac ;;
  254. - esac
  255. + esac ;;
  256. + esac
  257. fi
  258. if [ "${HP_ARCH}" = "" ]; then
  259. eval $set_cc_for_build
  260. - sed 's/^ //' << EOF >$dummy.c
  261. + sed 's/^ //' << EOF >$dummy.c
  262. - #define _HPUX_SOURCE
  263. - #include <stdlib.h>
  264. - #include <unistd.h>
  265. + #define _HPUX_SOURCE
  266. + #include <stdlib.h>
  267. + #include <unistd.h>
  268. - int main ()
  269. - {
  270. - #if defined(_SC_KERNEL_BITS)
  271. - long bits = sysconf(_SC_KERNEL_BITS);
  272. - #endif
  273. - long cpu = sysconf (_SC_CPU_VERSION);
  274. + int main ()
  275. + {
  276. + #if defined(_SC_KERNEL_BITS)
  277. + long bits = sysconf(_SC_KERNEL_BITS);
  278. + #endif
  279. + long cpu = sysconf (_SC_CPU_VERSION);
  280. - switch (cpu)
  281. - {
  282. - case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  283. - case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  284. - case CPU_PA_RISC2_0:
  285. - #if defined(_SC_KERNEL_BITS)
  286. - switch (bits)
  287. - {
  288. - case 64: puts ("hppa2.0w"); break;
  289. - case 32: puts ("hppa2.0n"); break;
  290. - default: puts ("hppa2.0"); break;
  291. - } break;
  292. - #else /* !defined(_SC_KERNEL_BITS) */
  293. - puts ("hppa2.0"); break;
  294. - #endif
  295. - default: puts ("hppa1.0"); break;
  296. - }
  297. - exit (0);
  298. - }
  299. + switch (cpu)
  300. + {
  301. + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  302. + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  303. + case CPU_PA_RISC2_0:
  304. + #if defined(_SC_KERNEL_BITS)
  305. + switch (bits)
  306. + {
  307. + case 64: puts ("hppa2.0w"); break;
  308. + case 32: puts ("hppa2.0n"); break;
  309. + default: puts ("hppa2.0"); break;
  310. + } break;
  311. + #else /* !defined(_SC_KERNEL_BITS) */
  312. + puts ("hppa2.0"); break;
  313. + #endif
  314. + default: puts ("hppa1.0"); break;
  315. + }
  316. + exit (0);
  317. + }
  318. EOF
  319. (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  320. test -z "$HP_ARCH" && HP_ARCH=hppa
  321. @@ -656,7 +680,7 @@ EOF
  322. # => hppa64-hp-hpux11.23
  323. if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
  324. - grep __LP64__ >/dev/null
  325. + grep -q __LP64__
  326. then
  327. HP_ARCH="hppa2.0w"
  328. else
  329. @@ -727,22 +751,22 @@ EOF
  330. exit ;;
  331. C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  332. echo c1-convex-bsd
  333. - exit ;;
  334. + exit ;;
  335. C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  336. if getsysinfo -f scalar_acc
  337. then echo c32-convex-bsd
  338. else echo c2-convex-bsd
  339. fi
  340. - exit ;;
  341. + exit ;;
  342. C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  343. echo c34-convex-bsd
  344. - exit ;;
  345. + exit ;;
  346. C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  347. echo c38-convex-bsd
  348. - exit ;;
  349. + exit ;;
  350. C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  351. echo c4-convex-bsd
  352. - exit ;;
  353. + exit ;;
  354. CRAY*Y-MP:*:*:*)
  355. echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  356. exit ;;
  357. @@ -766,14 +790,14 @@ EOF
  358. exit ;;
  359. F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  360. FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  361. - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  362. - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  363. - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  364. - exit ;;
  365. + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  366. + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  367. + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  368. + exit ;;
  369. 5000:UNIX_System_V:4.*:*)
  370. - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  371. - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  372. - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  373. + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  374. + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  375. + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  376. exit ;;
  377. i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  378. echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  379. @@ -785,34 +809,39 @@ EOF
  380. echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  381. exit ;;
  382. *:FreeBSD:*:*)
  383. - case ${UNAME_MACHINE} in
  384. - pc98)
  385. - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  386. + UNAME_PROCESSOR=`/usr/bin/uname -p`
  387. + case ${UNAME_PROCESSOR} in
  388. amd64)
  389. echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  390. *)
  391. - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  392. + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  393. esac
  394. exit ;;
  395. i*:CYGWIN*:*)
  396. echo ${UNAME_MACHINE}-pc-cygwin
  397. exit ;;
  398. + *:MINGW64*:*)
  399. + echo ${UNAME_MACHINE}-pc-mingw64
  400. + exit ;;
  401. *:MINGW*:*)
  402. echo ${UNAME_MACHINE}-pc-mingw32
  403. exit ;;
  404. + i*:MSYS*:*)
  405. + echo ${UNAME_MACHINE}-pc-msys
  406. + exit ;;
  407. i*:windows32*:*)
  408. - # uname -m includes "-pc" on this system.
  409. - echo ${UNAME_MACHINE}-mingw32
  410. + # uname -m includes "-pc" on this system.
  411. + echo ${UNAME_MACHINE}-mingw32
  412. exit ;;
  413. i*:PW*:*)
  414. echo ${UNAME_MACHINE}-pc-pw32
  415. exit ;;
  416. - *:Interix*:[3456]*)
  417. - case ${UNAME_MACHINE} in
  418. + *:Interix*:*)
  419. + case ${UNAME_MACHINE} in
  420. x86)
  421. echo i586-pc-interix${UNAME_RELEASE}
  422. exit ;;
  423. - EM64T | authenticamd | genuineintel)
  424. + authenticamd | genuineintel | EM64T)
  425. echo x86_64-unknown-interix${UNAME_RELEASE}
  426. exit ;;
  427. IA64)
  428. @@ -822,6 +851,9 @@ EOF
  429. [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
  430. echo i${UNAME_MACHINE}-pc-mks
  431. exit ;;
  432. + 8664:Windows_NT:*)
  433. + echo x86_64-pc-mks
  434. + exit ;;
  435. i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  436. # How do we know it's Interix rather than the generic POSIX subsystem?
  437. # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  438. @@ -842,210 +874,157 @@ EOF
  439. exit ;;
  440. *:GNU:*:*)
  441. # the GNU system
  442. - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  443. + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  444. exit ;;
  445. *:GNU/*:*:*)
  446. # other systems with GNU libc and userland
  447. - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
  448. + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
  449. exit ;;
  450. i*86:Minix:*:*)
  451. echo ${UNAME_MACHINE}-pc-minix
  452. exit ;;
  453. + aarch64:Linux:*:*)
  454. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  455. + exit ;;
  456. + aarch64_be:Linux:*:*)
  457. + UNAME_MACHINE=aarch64_be
  458. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  459. + exit ;;
  460. + alpha:Linux:*:*)
  461. + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  462. + EV5) UNAME_MACHINE=alphaev5 ;;
  463. + EV56) UNAME_MACHINE=alphaev56 ;;
  464. + PCA56) UNAME_MACHINE=alphapca56 ;;
  465. + PCA57) UNAME_MACHINE=alphapca56 ;;
  466. + EV6) UNAME_MACHINE=alphaev6 ;;
  467. + EV67) UNAME_MACHINE=alphaev67 ;;
  468. + EV68*) UNAME_MACHINE=alphaev68 ;;
  469. + esac
  470. + objdump --private-headers /bin/sh | grep -q ld.so.1
  471. + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
  472. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  473. + exit ;;
  474. + arc:Linux:*:* | arceb:Linux:*:*)
  475. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  476. + exit ;;
  477. arm*:Linux:*:*)
  478. eval $set_cc_for_build
  479. if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  480. | grep -q __ARM_EABI__
  481. then
  482. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  483. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  484. else
  485. - echo ${UNAME_MACHINE}-unknown-linux-gnueabi
  486. + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  487. + | grep -q __ARM_PCS_VFP
  488. + then
  489. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
  490. + else
  491. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
  492. + fi
  493. fi
  494. exit ;;
  495. avr32*:Linux:*:*)
  496. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  497. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  498. exit ;;
  499. cris:Linux:*:*)
  500. - echo cris-axis-linux-gnu
  501. + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
  502. exit ;;
  503. crisv32:Linux:*:*)
  504. - echo crisv32-axis-linux-gnu
  505. + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
  506. exit ;;
  507. frv:Linux:*:*)
  508. - echo frv-unknown-linux-gnu
  509. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  510. + exit ;;
  511. + hexagon:Linux:*:*)
  512. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  513. + exit ;;
  514. + i*86:Linux:*:*)
  515. + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
  516. exit ;;
  517. ia64:Linux:*:*)
  518. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  519. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  520. exit ;;
  521. m32r*:Linux:*:*)
  522. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  523. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  524. exit ;;
  525. m68*:Linux:*:*)
  526. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  527. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  528. exit ;;
  529. - mips:Linux:*:*)
  530. - eval $set_cc_for_build
  531. - sed 's/^ //' << EOF >$dummy.c
  532. - #undef CPU
  533. - #undef mips
  534. - #undef mipsel
  535. - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  536. - CPU=mipsel
  537. - #else
  538. - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  539. - CPU=mips
  540. - #else
  541. - CPU=
  542. - #endif
  543. - #endif
  544. -EOF
  545. - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  546. - /^CPU/{
  547. - s: ::g
  548. - p
  549. - }'`"
  550. - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  551. - ;;
  552. - mips64:Linux:*:*)
  553. + mips:Linux:*:* | mips64:Linux:*:*)
  554. eval $set_cc_for_build
  555. sed 's/^ //' << EOF >$dummy.c
  556. #undef CPU
  557. - #undef mips64
  558. - #undef mips64el
  559. + #undef ${UNAME_MACHINE}
  560. + #undef ${UNAME_MACHINE}el
  561. #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  562. - CPU=mips64el
  563. + CPU=${UNAME_MACHINE}el
  564. #else
  565. #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  566. - CPU=mips64
  567. + CPU=${UNAME_MACHINE}
  568. #else
  569. CPU=
  570. #endif
  571. #endif
  572. EOF
  573. - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  574. - /^CPU/{
  575. - s: ::g
  576. - p
  577. - }'`"
  578. - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  579. + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  580. + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
  581. ;;
  582. - or32:Linux:*:*)
  583. - echo or32-unknown-linux-gnu
  584. - exit ;;
  585. - ppc:Linux:*:*)
  586. - echo powerpc-unknown-linux-gnu
  587. - exit ;;
  588. - ppc64:Linux:*:*)
  589. - echo powerpc64-unknown-linux-gnu
  590. + or1k:Linux:*:*)
  591. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  592. exit ;;
  593. - alpha:Linux:*:*)
  594. - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  595. - EV5) UNAME_MACHINE=alphaev5 ;;
  596. - EV56) UNAME_MACHINE=alphaev56 ;;
  597. - PCA56) UNAME_MACHINE=alphapca56 ;;
  598. - PCA57) UNAME_MACHINE=alphapca56 ;;
  599. - EV6) UNAME_MACHINE=alphaev6 ;;
  600. - EV67) UNAME_MACHINE=alphaev67 ;;
  601. - EV68*) UNAME_MACHINE=alphaev68 ;;
  602. - esac
  603. - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
  604. - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  605. - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  606. + or32:Linux:*:*)
  607. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  608. exit ;;
  609. padre:Linux:*:*)
  610. - echo sparc-unknown-linux-gnu
  611. + echo sparc-unknown-linux-${LIBC}
  612. + exit ;;
  613. + parisc64:Linux:*:* | hppa64:Linux:*:*)
  614. + echo hppa64-unknown-linux-${LIBC}
  615. exit ;;
  616. parisc:Linux:*:* | hppa:Linux:*:*)
  617. # Look for CPU level
  618. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  619. - PA7*) echo hppa1.1-unknown-linux-gnu ;;
  620. - PA8*) echo hppa2.0-unknown-linux-gnu ;;
  621. - *) echo hppa-unknown-linux-gnu ;;
  622. + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
  623. + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
  624. + *) echo hppa-unknown-linux-${LIBC} ;;
  625. esac
  626. exit ;;
  627. - parisc64:Linux:*:* | hppa64:Linux:*:*)
  628. - echo hppa64-unknown-linux-gnu
  629. + ppc64:Linux:*:*)
  630. + echo powerpc64-unknown-linux-${LIBC}
  631. + exit ;;
  632. + ppc:Linux:*:*)
  633. + echo powerpc-unknown-linux-${LIBC}
  634. + exit ;;
  635. + ppc64le:Linux:*:*)
  636. + echo powerpc64le-unknown-linux-${LIBC}
  637. + exit ;;
  638. + ppcle:Linux:*:*)
  639. + echo powerpcle-unknown-linux-${LIBC}
  640. exit ;;
  641. s390:Linux:*:* | s390x:Linux:*:*)
  642. - echo ${UNAME_MACHINE}-ibm-linux
  643. + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
  644. exit ;;
  645. sh64*:Linux:*:*)
  646. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  647. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  648. exit ;;
  649. sh*:Linux:*:*)
  650. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  651. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  652. exit ;;
  653. sparc:Linux:*:* | sparc64:Linux:*:*)
  654. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  655. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  656. + exit ;;
  657. + tile*:Linux:*:*)
  658. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  659. exit ;;
  660. vax:Linux:*:*)
  661. - echo ${UNAME_MACHINE}-dec-linux-gnu
  662. + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
  663. exit ;;
  664. x86_64:Linux:*:*)
  665. - echo x86_64-unknown-linux-gnu
  666. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  667. exit ;;
  668. xtensa*:Linux:*:*)
  669. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  670. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  671. exit ;;
  672. - i*86:Linux:*:*)
  673. - # The BFD linker knows what the default object file format is, so
  674. - # first see if it will tell us. cd to the root directory to prevent
  675. - # problems with other programs or directories called `ld' in the path.
  676. - # Set LC_ALL=C to ensure ld outputs messages in English.
  677. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
  678. - | sed -ne '/supported targets:/!d
  679. - s/[ ][ ]*/ /g
  680. - s/.*supported targets: *//
  681. - s/ .*//
  682. - p'`
  683. - case "$ld_supported_targets" in
  684. - elf32-i386)
  685. - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
  686. - ;;
  687. - a.out-i386-linux)
  688. - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
  689. - exit ;;
  690. - "")
  691. - # Either a pre-BFD a.out linker (linux-gnuoldld) or
  692. - # one that does not give us useful --help.
  693. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
  694. - exit ;;
  695. - esac
  696. - # Determine whether the default compiler is a.out or elf
  697. - eval $set_cc_for_build
  698. - sed 's/^ //' << EOF >$dummy.c
  699. - #include <features.h>
  700. - #ifdef __ELF__
  701. - # ifdef __GLIBC__
  702. - # if __GLIBC__ >= 2
  703. - LIBC=gnu
  704. - # else
  705. - LIBC=gnulibc1
  706. - # endif
  707. - # else
  708. - LIBC=gnulibc1
  709. - # endif
  710. - #else
  711. - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
  712. - LIBC=gnu
  713. - #else
  714. - LIBC=gnuaout
  715. - #endif
  716. - #endif
  717. - #ifdef __dietlibc__
  718. - LIBC=dietlibc
  719. - #endif
  720. -EOF
  721. - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  722. - /^LIBC/{
  723. - s: ::g
  724. - p
  725. - }'`"
  726. - test x"${LIBC}" != x && {
  727. - echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  728. - exit
  729. - }
  730. - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
  731. - ;;
  732. i*86:DYNIX/ptx:4*:*)
  733. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  734. # earlier versions are messed up and put the nodename in both
  735. @@ -1053,11 +1032,11 @@ EOF
  736. echo i386-sequent-sysv4
  737. exit ;;
  738. i*86:UNIX_SV:4.2MP:2.*)
  739. - # Unixware is an offshoot of SVR4, but it has its own version
  740. - # number series starting with 2...
  741. - # I am not positive that other SVR4 systems won't match this,
  742. + # Unixware is an offshoot of SVR4, but it has its own version
  743. + # number series starting with 2...
  744. + # I am not positive that other SVR4 systems won't match this,
  745. # I just have to hope. -- rms.
  746. - # Use sysv4.2uw... so that sysv4* matches it.
  747. + # Use sysv4.2uw... so that sysv4* matches it.
  748. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  749. exit ;;
  750. i*86:OS/2:*:*)
  751. @@ -1074,7 +1053,7 @@ EOF
  752. i*86:syllable:*:*)
  753. echo ${UNAME_MACHINE}-pc-syllable
  754. exit ;;
  755. - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
  756. + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
  757. echo i386-unknown-lynxos${UNAME_RELEASE}
  758. exit ;;
  759. i*86:*DOS:*:*)
  760. @@ -1089,7 +1068,7 @@ EOF
  761. fi
  762. exit ;;
  763. i*86:*:5:[678]*)
  764. - # UnixWare 7.x, OpenUNIX and OpenServer 6.
  765. + # UnixWare 7.x, OpenUNIX and OpenServer 6.
  766. case `/bin/uname -X | grep "^Machine"` in
  767. *486*) UNAME_MACHINE=i486 ;;
  768. *Pentium) UNAME_MACHINE=i586 ;;
  769. @@ -1117,13 +1096,13 @@ EOF
  770. exit ;;
  771. pc:*:*:*)
  772. # Left here for compatibility:
  773. - # uname -m prints for DJGPP always 'pc', but it prints nothing about
  774. - # the processor, so we play safe by assuming i586.
  775. + # uname -m prints for DJGPP always 'pc', but it prints nothing about
  776. + # the processor, so we play safe by assuming i586.
  777. # Note: whatever this is, it MUST be the same as what config.sub
  778. # prints for the "djgpp" host, or else GDB configury will decide that
  779. # this is a cross-build.
  780. echo i586-pc-msdosdjgpp
  781. - exit ;;
  782. + exit ;;
  783. Intel:Mach:3*:*)
  784. echo i386-pc-mach3
  785. exit ;;
  786. @@ -1158,8 +1137,8 @@ EOF
  787. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  788. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  789. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  790. - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  791. - && { echo i486-ncr-sysv4; exit; } ;;
  792. + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  793. + && { echo i486-ncr-sysv4; exit; } ;;
  794. NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  795. OS_REL='.3'
  796. test -r /etc/.relid \
  797. @@ -1182,7 +1161,7 @@ EOF
  798. rs6000:LynxOS:2.*:*)
  799. echo rs6000-unknown-lynxos${UNAME_RELEASE}
  800. exit ;;
  801. - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
  802. + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
  803. echo powerpc-unknown-lynxos${UNAME_RELEASE}
  804. exit ;;
  805. SM[BE]S:UNIX_SV:*:*)
  806. @@ -1202,10 +1181,10 @@ EOF
  807. echo ns32k-sni-sysv
  808. fi
  809. exit ;;
  810. - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  811. - # says <Richard.M.Bartel@ccMail.Census.GOV>
  812. - echo i586-unisys-sysv4
  813. - exit ;;
  814. + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  815. + # says <Richard.M.Bartel@ccMail.Census.GOV>
  816. + echo i586-unisys-sysv4
  817. + exit ;;
  818. *:UNIX_System_V:4*:FTX*)
  819. # From Gerald Hewes <hewes@openmarket.com>.
  820. # How about differentiating between stratus architectures? -djm
  821. @@ -1231,11 +1210,11 @@ EOF
  822. exit ;;
  823. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  824. if [ -d /usr/nec ]; then
  825. - echo mips-nec-sysv${UNAME_RELEASE}
  826. + echo mips-nec-sysv${UNAME_RELEASE}
  827. else
  828. - echo mips-unknown-sysv${UNAME_RELEASE}
  829. + echo mips-unknown-sysv${UNAME_RELEASE}
  830. fi
  831. - exit ;;
  832. + exit ;;
  833. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  834. echo powerpc-be-beos
  835. exit ;;
  836. @@ -1248,6 +1227,9 @@ EOF
  837. BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
  838. echo i586-pc-haiku
  839. exit ;;
  840. + x86_64:Haiku:*:*)
  841. + echo x86_64-unknown-haiku
  842. + exit ;;
  843. SX-4:SUPER-UX:*:*)
  844. echo sx4-nec-superux${UNAME_RELEASE}
  845. exit ;;
  846. @@ -1274,9 +1256,31 @@ EOF
  847. exit ;;
  848. *:Darwin:*:*)
  849. UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  850. - case $UNAME_PROCESSOR in
  851. - unknown) UNAME_PROCESSOR=powerpc ;;
  852. - esac
  853. + eval $set_cc_for_build
  854. + if test "$UNAME_PROCESSOR" = unknown ; then
  855. + UNAME_PROCESSOR=powerpc
  856. + fi
  857. + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
  858. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  859. + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  860. + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  861. + grep IS_64BIT_ARCH >/dev/null
  862. + then
  863. + case $UNAME_PROCESSOR in
  864. + i386) UNAME_PROCESSOR=x86_64 ;;
  865. + powerpc) UNAME_PROCESSOR=powerpc64 ;;
  866. + esac
  867. + fi
  868. + fi
  869. + elif test "$UNAME_PROCESSOR" = i386 ; then
  870. + # Avoid executing cc on OS X 10.9, as it ships with a stub
  871. + # that puts up a graphical alert prompting to install
  872. + # developer tools. Any system running Mac OS X 10.7 or
  873. + # later (Darwin 11 and later) is required to have a 64-bit
  874. + # processor. This is not true of the ARM version of Darwin
  875. + # that Apple uses in portable devices.
  876. + UNAME_PROCESSOR=x86_64
  877. + fi
  878. echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  879. exit ;;
  880. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  881. @@ -1290,7 +1294,10 @@ EOF
  882. *:QNX:*:4*)
  883. echo i386-pc-qnx
  884. exit ;;
  885. - NSE-?:NONSTOP_KERNEL:*:*)
  886. + NEO-?:NONSTOP_KERNEL:*:*)
  887. + echo neo-tandem-nsk${UNAME_RELEASE}
  888. + exit ;;
  889. + NSE-*:NONSTOP_KERNEL:*:*)
  890. echo nse-tandem-nsk${UNAME_RELEASE}
  891. exit ;;
  892. NSR-?:NONSTOP_KERNEL:*:*)
  893. @@ -1335,13 +1342,13 @@ EOF
  894. echo pdp10-unknown-its
  895. exit ;;
  896. SEI:*:*:SEIUX)
  897. - echo mips-sei-seiux${UNAME_RELEASE}
  898. + echo mips-sei-seiux${UNAME_RELEASE}
  899. exit ;;
  900. *:DragonFly:*:*)
  901. echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  902. exit ;;
  903. *:*VMS:*:*)
  904. - UNAME_MACHINE=`(uname -p) 2>/dev/null`
  905. + UNAME_MACHINE=`(uname -p) 2>/dev/null`
  906. case "${UNAME_MACHINE}" in
  907. A*) echo alpha-dec-vms ; exit ;;
  908. I*) echo ia64-dec-vms ; exit ;;
  909. @@ -1359,158 +1366,10 @@ EOF
  910. i*86:AROS:*:*)
  911. echo ${UNAME_MACHINE}-pc-aros
  912. exit ;;
  913. -esac
  914. -
  915. -#echo '(No uname command or uname output not recognized.)' 1>&2
  916. -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  917. -
  918. -eval $set_cc_for_build
  919. -cat >$dummy.c <<EOF
  920. -#ifdef _SEQUENT_
  921. -# include <sys/types.h>
  922. -# include <sys/utsname.h>
  923. -#endif
  924. -main ()
  925. -{
  926. -#if defined (sony)
  927. -#if defined (MIPSEB)
  928. - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
  929. - I don't know.... */
  930. - printf ("mips-sony-bsd\n"); exit (0);
  931. -#else
  932. -#include <sys/param.h>
  933. - printf ("m68k-sony-newsos%s\n",
  934. -#ifdef NEWSOS4
  935. - "4"
  936. -#else
  937. - ""
  938. -#endif
  939. - ); exit (0);
  940. -#endif
  941. -#endif
  942. -
  943. -#if defined (__arm) && defined (__acorn) && defined (__unix)
  944. - printf ("arm-acorn-riscix\n"); exit (0);
  945. -#endif
  946. -
  947. -#if defined (hp300) && !defined (hpux)
  948. - printf ("m68k-hp-bsd\n"); exit (0);
  949. -#endif
  950. -
  951. -#if defined (NeXT)
  952. -#if !defined (__ARCHITECTURE__)
  953. -#define __ARCHITECTURE__ "m68k"
  954. -#endif
  955. - int version;
  956. - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  957. - if (version < 4)
  958. - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  959. - else
  960. - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  961. - exit (0);
  962. -#endif
  963. -
  964. -#if defined (MULTIMAX) || defined (n16)
  965. -#if defined (UMAXV)
  966. - printf ("ns32k-encore-sysv\n"); exit (0);
  967. -#else
  968. -#if defined (CMU)
  969. - printf ("ns32k-encore-mach\n"); exit (0);
  970. -#else
  971. - printf ("ns32k-encore-bsd\n"); exit (0);
  972. -#endif
  973. -#endif
  974. -#endif
  975. -
  976. -#if defined (__386BSD__)
  977. - printf ("i386-pc-bsd\n"); exit (0);
  978. -#endif
  979. -
  980. -#if defined (sequent)
  981. -#if defined (i386)
  982. - printf ("i386-sequent-dynix\n"); exit (0);
  983. -#endif
  984. -#if defined (ns32000)
  985. - printf ("ns32k-sequent-dynix\n"); exit (0);
  986. -#endif
  987. -#endif
  988. -
  989. -#if defined (_SEQUENT_)
  990. - struct utsname un;
  991. -
  992. - uname(&un);
  993. -
  994. - if (strncmp(un.version, "V2", 2) == 0) {
  995. - printf ("i386-sequent-ptx2\n"); exit (0);
  996. - }
  997. - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  998. - printf ("i386-sequent-ptx1\n"); exit (0);
  999. - }
  1000. - printf ("i386-sequent-ptx\n"); exit (0);
  1001. -
  1002. -#endif
  1003. -
  1004. -#if defined (vax)
  1005. -# if !defined (ultrix)
  1006. -# include <sys/param.h>
  1007. -# if defined (BSD)
  1008. -# if BSD == 43
  1009. - printf ("vax-dec-bsd4.3\n"); exit (0);
  1010. -# else
  1011. -# if BSD == 199006
  1012. - printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1013. -# else
  1014. - printf ("vax-dec-bsd\n"); exit (0);
  1015. -# endif
  1016. -# endif
  1017. -# else
  1018. - printf ("vax-dec-bsd\n"); exit (0);
  1019. -# endif
  1020. -# else
  1021. - printf ("vax-dec-ultrix\n"); exit (0);
  1022. -# endif
  1023. -#endif
  1024. -
  1025. -#if defined (alliant) && defined (i860)
  1026. - printf ("i860-alliant-bsd\n"); exit (0);
  1027. -#endif
  1028. -
  1029. - exit (1);
  1030. -}
  1031. -EOF
  1032. -
  1033. -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1034. - { echo "$SYSTEM_NAME"; exit; }
  1035. -
  1036. -# Apollos put the system type in the environment.
  1037. -
  1038. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1039. -
  1040. -# Convex versions that predate uname can use getsysinfo(1)
  1041. -
  1042. -if [ -x /usr/convex/getsysinfo ]
  1043. -then
  1044. - case `getsysinfo -f cpu_type` in
  1045. - c1*)
  1046. - echo c1-convex-bsd
  1047. - exit ;;
  1048. - c2*)
  1049. - if getsysinfo -f scalar_acc
  1050. - then echo c32-convex-bsd
  1051. - else echo c2-convex-bsd
  1052. - fi
  1053. - exit ;;
  1054. - c34*)
  1055. - echo c34-convex-bsd
  1056. - exit ;;
  1057. - c38*)
  1058. - echo c38-convex-bsd
  1059. - exit ;;
  1060. - c4*)
  1061. - echo c4-convex-bsd
  1062. + x86_64:VMkernel:*:*)
  1063. + echo ${UNAME_MACHINE}-unknown-esx
  1064. exit ;;
  1065. - esac
  1066. -fi
  1067. +esac
  1068. cat >&2 <<EOF
  1069. $0: unable to guess system type