ffi 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ffi might be problematic. Click here for more details.

Files changed (203) hide show
  1. data/LICENSE +1 -27
  2. data/Rakefile +2 -11
  3. data/ext/ffi_c/AbstractMemory.c +6 -8
  4. data/ext/ffi_c/AbstractMemory.h +23 -21
  5. data/ext/ffi_c/AutoPointer.c +0 -1
  6. data/ext/ffi_c/Buffer.c +23 -8
  7. data/ext/ffi_c/Call.c +28 -0
  8. data/ext/ffi_c/Call.h +5 -1
  9. data/ext/ffi_c/DynamicLibrary.c +0 -1
  10. data/ext/ffi_c/Function.c +19 -2
  11. data/ext/ffi_c/MemoryPointer.c +2 -3
  12. data/ext/ffi_c/Pointer.c +23 -9
  13. data/ext/ffi_c/Struct.c +142 -69
  14. data/ext/ffi_c/Struct.h +16 -7
  15. data/ext/ffi_c/StructLayout.c +92 -55
  16. data/ext/ffi_c/Type.c +5 -22
  17. data/ext/ffi_c/Type.h +1 -1
  18. data/ext/ffi_c/Types.c +8 -2
  19. data/ext/ffi_c/Types.h +2 -0
  20. data/ext/ffi_c/extconf.rb +11 -7
  21. data/ext/ffi_c/libffi/ChangeLog +900 -84
  22. data/ext/ffi_c/libffi/ChangeLog.libffi +311 -0
  23. data/ext/ffi_c/libffi/LICENSE +1 -1
  24. data/ext/ffi_c/libffi/Makefile.am +14 -4
  25. data/ext/ffi_c/libffi/Makefile.in +362 -211
  26. data/ext/ffi_c/libffi/README +70 -92
  27. data/ext/ffi_c/libffi/aclocal.m4 +6068 -4586
  28. data/ext/ffi_c/libffi/config.guess +125 -143
  29. data/ext/ffi_c/libffi/config.sub +103 -27
  30. data/ext/ffi_c/libffi/configure +11364 -18497
  31. data/ext/ffi_c/libffi/configure.ac +43 -4
  32. data/ext/ffi_c/libffi/doc/libffi.info +15 -15
  33. data/ext/ffi_c/libffi/doc/libffi.texi +1 -1
  34. data/ext/ffi_c/libffi/doc/stamp-vti +4 -4
  35. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  36. data/ext/ffi_c/libffi/fficonfig.h.in +24 -3
  37. data/ext/ffi_c/libffi/include/Makefile.am +1 -1
  38. data/ext/ffi_c/libffi/include/Makefile.in +97 -50
  39. data/ext/ffi_c/libffi/include/ffi.h.in +8 -2
  40. data/ext/ffi_c/libffi/include/ffi_common.h +24 -0
  41. data/ext/ffi_c/libffi/libtool-version +1 -1
  42. data/ext/ffi_c/libffi/ltmain.sh +7346 -5870
  43. data/ext/ffi_c/libffi/m4/libtool.m4 +7360 -0
  44. data/ext/ffi_c/libffi/m4/ltoptions.m4 +368 -0
  45. data/ext/ffi_c/libffi/m4/ltsugar.m4 +123 -0
  46. data/ext/ffi_c/libffi/m4/ltversion.m4 +23 -0
  47. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +92 -0
  48. data/ext/ffi_c/libffi/man/Makefile.in +115 -62
  49. data/ext/ffi_c/libffi/man/ffi_call.3 +3 -3
  50. data/ext/ffi_c/libffi/missing +15 -8
  51. data/ext/ffi_c/libffi/src/arm/sysv.S +15 -8
  52. data/ext/ffi_c/libffi/src/avr32/ffi.c +421 -0
  53. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +50 -0
  54. data/ext/ffi_c/libffi/src/avr32/sysv.S +208 -0
  55. data/ext/ffi_c/libffi/src/closures.c +47 -10
  56. data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
  57. data/ext/ffi_c/libffi/src/java_raw_api.c +0 -3
  58. data/ext/ffi_c/libffi/src/mips/ffi.c +135 -32
  59. data/ext/ffi_c/libffi/src/mips/ffitarget.h +37 -4
  60. data/ext/ffi_c/libffi/src/mips/n32.S +67 -10
  61. data/ext/ffi_c/libffi/src/mips/o32.S +8 -8
  62. data/ext/ffi_c/libffi/src/pa/ffi.c +7 -0
  63. data/ext/ffi_c/libffi/src/powerpc/aix.S +163 -64
  64. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +308 -112
  65. data/ext/ffi_c/libffi/src/powerpc/ffi.c +20 -7
  66. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +208 -80
  67. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +11 -3
  68. data/ext/ffi_c/libffi/src/powerpc/sysv.S +12 -23
  69. data/ext/ffi_c/libffi/src/s390/sysv.S +1 -1
  70. data/ext/ffi_c/libffi/src/sh/sysv.S +9 -9
  71. data/ext/ffi_c/libffi/src/sh64/ffi.c +37 -22
  72. data/ext/ffi_c/libffi/src/sh64/sysv.S +23 -14
  73. data/ext/ffi_c/libffi/src/sparc/ffi.c +21 -6
  74. data/ext/ffi_c/libffi/src/sparc/v8.S +55 -14
  75. data/ext/ffi_c/libffi/src/x86/darwin.S +10 -9
  76. data/ext/ffi_c/libffi/src/x86/ffi.c +293 -86
  77. data/ext/ffi_c/libffi/src/x86/ffi64.c +73 -19
  78. data/ext/ffi_c/libffi/src/x86/ffitarget.h +30 -0
  79. data/ext/ffi_c/libffi/src/x86/sysv.S +21 -4
  80. data/ext/ffi_c/libffi/src/x86/unix64.S +8 -4
  81. data/ext/ffi_c/libffi/src/x86/win32.S +633 -147
  82. data/ext/ffi_c/libffi/src/x86/win64.S +460 -0
  83. data/ext/ffi_c/libffi/testsuite/Makefile.am +63 -54
  84. data/ext/ffi_c/libffi/testsuite/Makefile.in +112 -77
  85. data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +12 -1
  86. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +4 -4
  87. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn0.c +7 -15
  88. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn1.c +7 -15
  89. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn2.c +7 -15
  90. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn3.c +7 -15
  91. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn4.c +7 -15
  92. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn5.c +7 -14
  93. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn6.c +7 -15
  94. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_loc_fn0.c +95 -0
  95. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_stdcall.c +6 -14
  96. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c +4 -12
  97. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c +4 -12
  98. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c +4 -12
  99. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c +4 -12
  100. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c +4 -12
  101. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c +4 -12
  102. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c +4 -12
  103. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c +4 -12
  104. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c +4 -12
  105. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c +4 -12
  106. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c +4 -12
  107. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c +4 -12
  108. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c +4 -12
  109. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c +4 -12
  110. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c +4 -12
  111. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c +4 -12
  112. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c +4 -12
  113. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c +4 -12
  114. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c +4 -12
  115. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c +4 -12
  116. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c +4 -12
  117. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c +4 -12
  118. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c +4 -12
  119. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c +4 -12
  120. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c +4 -12
  121. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c +4 -12
  122. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c +4 -12
  123. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c +134 -0
  124. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c +117 -0
  125. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c +11 -17
  126. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c +4 -12
  127. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c +4 -12
  128. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +7 -15
  129. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c +4 -12
  130. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c +4 -12
  131. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +7 -15
  132. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_dbls_struct.c +66 -0
  133. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double.c +4 -12
  134. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +57 -0
  135. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_float.c +4 -13
  136. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c +105 -0
  137. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c +57 -0
  138. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_schar.c +4 -12
  139. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshort.c +4 -12
  140. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshortchar.c +4 -12
  141. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_uchar.c +4 -12
  142. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushort.c +4 -12
  143. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushortchar.c +4 -12
  144. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c +74 -0
  145. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c +140 -0
  146. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_schar.c +4 -12
  147. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_sint.c +4 -12
  148. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_sshort.c +4 -12
  149. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar.c +4 -12
  150. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uint.c +4 -12
  151. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +8 -16
  152. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort.c +4 -12
  153. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_abi.c +37 -0
  154. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +25 -0
  155. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +31 -0
  156. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +2 -1
  157. data/ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c +342 -0
  158. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c +4 -12
  159. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c +4 -12
  160. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +4 -12
  161. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c +4 -12
  162. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c +4 -12
  163. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c +4 -12
  164. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c +4 -12
  165. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c +4 -12
  166. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c +4 -12
  167. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c +4 -12
  168. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c +4 -12
  169. data/ext/ffi_c/libffi/testsuite/libffi.call/problem1.c +4 -12
  170. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +1 -1
  171. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +1 -1
  172. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large.c +145 -0
  173. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large2.c +148 -0
  174. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium.c +124 -0
  175. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c +124 -0
  176. data/ext/ffi_c/libffi/testsuite/libffi.call/testclosure.c +70 -0
  177. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +10 -0
  178. data/ext/ffi_c/libffi/testsuite/libffi.special/special.exp +4 -5
  179. data/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest.cc +17 -16
  180. data/ext/ffi_c/libffi/texinfo.tex +155 -427
  181. data/lib/ffi/autopointer.rb +79 -20
  182. data/lib/ffi/callback.rb +4 -10
  183. data/lib/ffi/enum.rb +28 -0
  184. data/lib/ffi/io.rb +28 -0
  185. data/lib/ffi/library.rb +237 -182
  186. data/lib/ffi/memorypointer.rb +28 -62
  187. data/lib/ffi/platform.rb +27 -0
  188. data/lib/ffi/pointer.rb +28 -0
  189. data/lib/ffi/struct.rb +55 -1
  190. data/lib/ffi/types.rb +29 -0
  191. data/lib/ffi/variadic.rb +29 -0
  192. data/spec/ffi/library_spec.rb +31 -5
  193. data/spec/ffi/rbx/attach_function_spec.rb +2 -1
  194. data/spec/ffi/rbx/memory_pointer_spec.rb +2 -1
  195. data/spec/ffi/spec_helper.rb +5 -1
  196. data/spec/ffi/struct_spec.rb +64 -0
  197. metadata +28 -8
  198. data/ext/ffi_c/libffi/TODO +0 -1
  199. data/ext/ffi_c/libffi/ltcf-c.sh +0 -861
  200. data/ext/ffi_c/libffi/ltcf-cxx.sh +0 -1069
  201. data/ext/ffi_c/libffi/ltcf-gcj.sh +0 -700
  202. data/ext/ffi_c/libffi/ltconfig +0 -2862
  203. data/ext/ffi_c/libffi/mkinstalldirs +0 -158
@@ -1,10 +1,10 @@
1
1
  #! /bin/sh
2
2
  # Attempt to guess a canonical system name.
3
3
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
- # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
- # Inc.
4
+ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
+ # Free Software Foundation, Inc.
6
6
 
7
- timestamp='2007-05-17'
7
+ timestamp='2009-11-19'
8
8
 
9
9
  # This file is free software; you can redistribute it and/or modify it
10
10
  # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2007-05-17'
27
27
  # the same distribution terms that you use for the rest of that program.
28
28
 
29
29
 
30
- # Originally written by Per Bothner <per@bothner.com>.
31
- # Please send patches to <config-patches@gnu.org>. Submit a context
32
- # diff and a properly formatted ChangeLog entry.
30
+ # Originally written by Per Bothner. Please send patches (context
31
+ # diff format) to <config-patches@gnu.org> and include a ChangeLog
32
+ # entry.
33
33
  #
34
34
  # This script attempts to guess a canonical system name similar to
35
35
  # config.sub. If it succeeds, it prints the system name on stdout, and
36
36
  # exits with 0. Otherwise, it exits with 1.
37
37
  #
38
- # The plan is that this can be called by configure scripts if you
39
- # don't specify an explicit build system type.
38
+ # You can get the latest version of this script from:
39
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
40
40
 
41
41
  me=`echo "$0" | sed -e 's,.*/,,'`
42
42
 
@@ -56,8 +56,8 @@ version="\
56
56
  GNU config.guess ($timestamp)
57
57
 
58
58
  Originally written by Per Bothner.
59
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
60
- Free Software Foundation, Inc.
59
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
61
61
 
62
62
  This is free software; see the source for copying conditions. There is NO
63
63
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
170
170
  arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171
171
  eval $set_cc_for_build
172
172
  if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173
- | grep __ELF__ >/dev/null
173
+ | grep -q __ELF__
174
174
  then
175
175
  # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176
176
  # Return netbsd for either. FIX?
@@ -324,14 +324,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
324
324
  case `/usr/bin/uname -p` in
325
325
  sparc) echo sparc-icl-nx7; exit ;;
326
326
  esac ;;
327
+ s390x:SunOS:*:*)
328
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329
+ exit ;;
327
330
  sun4H:SunOS:5.*:*)
328
331
  echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329
332
  exit ;;
330
333
  sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
331
334
  echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332
335
  exit ;;
333
- i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
334
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
337
+ eval $set_cc_for_build
338
+ SUN_ARCH="i386"
339
+ # If there is a compiler, see if it is configured for 64-bit objects.
340
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
341
+ # This test works for both compilers.
342
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
343
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
344
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
345
+ grep IS_64BIT_ARCH >/dev/null
346
+ then
347
+ SUN_ARCH="x86_64"
348
+ fi
349
+ fi
350
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335
351
  exit ;;
336
352
  sun4*:SunOS:6*:*)
337
353
  # According to config.sub, this is the proper way to canonicalize
@@ -532,7 +548,7 @@ EOF
532
548
  echo rs6000-ibm-aix3.2
533
549
  fi
534
550
  exit ;;
535
- *:AIX:*:[45])
551
+ *:AIX:*:[456])
536
552
  IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
537
553
  if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
538
554
  IBM_ARCH=rs6000
@@ -640,7 +656,7 @@ EOF
640
656
  # => hppa64-hp-hpux11.23
641
657
 
642
658
  if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
643
- grep __LP64__ >/dev/null
659
+ grep -q __LP64__
644
660
  then
645
661
  HP_ARCH="hppa2.0w"
646
662
  else
@@ -791,18 +807,24 @@ EOF
791
807
  i*:PW*:*)
792
808
  echo ${UNAME_MACHINE}-pc-pw32
793
809
  exit ;;
794
- *:Interix*:[3456]*)
810
+ *:Interix*:*)
795
811
  case ${UNAME_MACHINE} in
796
- x86)
812
+ x86)
797
813
  echo i586-pc-interix${UNAME_RELEASE}
798
814
  exit ;;
799
- EM64T | authenticamd)
815
+ authenticamd | genuineintel | EM64T)
800
816
  echo x86_64-unknown-interix${UNAME_RELEASE}
801
817
  exit ;;
818
+ IA64)
819
+ echo ia64-unknown-interix${UNAME_RELEASE}
820
+ exit ;;
802
821
  esac ;;
803
822
  [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
804
823
  echo i${UNAME_MACHINE}-pc-mks
805
824
  exit ;;
825
+ 8664:Windows_NT:*)
826
+ echo x86_64-pc-mks
827
+ exit ;;
806
828
  i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
807
829
  # How do we know it's Interix rather than the generic POSIX subsystem?
808
830
  # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -832,8 +854,29 @@ EOF
832
854
  i*86:Minix:*:*)
833
855
  echo ${UNAME_MACHINE}-pc-minix
834
856
  exit ;;
857
+ alpha:Linux:*:*)
858
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
859
+ EV5) UNAME_MACHINE=alphaev5 ;;
860
+ EV56) UNAME_MACHINE=alphaev56 ;;
861
+ PCA56) UNAME_MACHINE=alphapca56 ;;
862
+ PCA57) UNAME_MACHINE=alphapca56 ;;
863
+ EV6) UNAME_MACHINE=alphaev6 ;;
864
+ EV67) UNAME_MACHINE=alphaev67 ;;
865
+ EV68*) UNAME_MACHINE=alphaev68 ;;
866
+ esac
867
+ objdump --private-headers /bin/sh | grep -q ld.so.1
868
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
869
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
870
+ exit ;;
835
871
  arm*:Linux:*:*)
836
- echo ${UNAME_MACHINE}-unknown-linux-gnu
872
+ eval $set_cc_for_build
873
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
874
+ | grep -q __ARM_EABI__
875
+ then
876
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
877
+ else
878
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
879
+ fi
837
880
  exit ;;
838
881
  avr32*:Linux:*:*)
839
882
  echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -847,6 +890,17 @@ EOF
847
890
  frv:Linux:*:*)
848
891
  echo frv-unknown-linux-gnu
849
892
  exit ;;
893
+ i*86:Linux:*:*)
894
+ LIBC=gnu
895
+ eval $set_cc_for_build
896
+ sed 's/^ //' << EOF >$dummy.c
897
+ #ifdef __dietlibc__
898
+ LIBC=dietlibc
899
+ #endif
900
+ EOF
901
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
902
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
903
+ exit ;;
850
904
  ia64:Linux:*:*)
851
905
  echo ${UNAME_MACHINE}-unknown-linux-gnu
852
906
  exit ;;
@@ -856,74 +910,33 @@ EOF
856
910
  m68*:Linux:*:*)
857
911
  echo ${UNAME_MACHINE}-unknown-linux-gnu
858
912
  exit ;;
859
- mips:Linux:*:*)
913
+ mips:Linux:*:* | mips64:Linux:*:*)
860
914
  eval $set_cc_for_build
861
915
  sed 's/^ //' << EOF >$dummy.c
862
916
  #undef CPU
863
- #undef mips
864
- #undef mipsel
917
+ #undef ${UNAME_MACHINE}
918
+ #undef ${UNAME_MACHINE}el
865
919
  #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
866
- CPU=mipsel
920
+ CPU=${UNAME_MACHINE}el
867
921
  #else
868
922
  #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
869
- CPU=mips
923
+ CPU=${UNAME_MACHINE}
870
924
  #else
871
925
  CPU=
872
926
  #endif
873
927
  #endif
874
928
  EOF
875
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
876
- /^CPU/{
877
- s: ::g
878
- p
879
- }'`"
880
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
881
- ;;
882
- mips64:Linux:*:*)
883
- eval $set_cc_for_build
884
- sed 's/^ //' << EOF >$dummy.c
885
- #undef CPU
886
- #undef mips64
887
- #undef mips64el
888
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
889
- CPU=mips64el
890
- #else
891
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
892
- CPU=mips64
893
- #else
894
- CPU=
895
- #endif
896
- #endif
897
- EOF
898
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
899
- /^CPU/{
900
- s: ::g
901
- p
902
- }'`"
929
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
903
930
  test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
904
931
  ;;
905
932
  or32:Linux:*:*)
906
933
  echo or32-unknown-linux-gnu
907
934
  exit ;;
908
- ppc:Linux:*:*)
909
- echo powerpc-unknown-linux-gnu
935
+ padre:Linux:*:*)
936
+ echo sparc-unknown-linux-gnu
910
937
  exit ;;
911
- ppc64:Linux:*:*)
912
- echo powerpc64-unknown-linux-gnu
913
- exit ;;
914
- alpha:Linux:*:*)
915
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
916
- EV5) UNAME_MACHINE=alphaev5 ;;
917
- EV56) UNAME_MACHINE=alphaev56 ;;
918
- PCA56) UNAME_MACHINE=alphapca56 ;;
919
- PCA57) UNAME_MACHINE=alphapca56 ;;
920
- EV6) UNAME_MACHINE=alphaev6 ;;
921
- EV67) UNAME_MACHINE=alphaev67 ;;
922
- EV68*) UNAME_MACHINE=alphaev68 ;;
923
- esac
924
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
925
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
926
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
938
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
939
+ echo hppa64-unknown-linux-gnu
927
940
  exit ;;
928
941
  parisc:Linux:*:* | hppa:Linux:*:*)
929
942
  # Look for CPU level
@@ -933,8 +946,11 @@ EOF
933
946
  *) echo hppa-unknown-linux-gnu ;;
934
947
  esac
935
948
  exit ;;
936
- parisc64:Linux:*:* | hppa64:Linux:*:*)
937
- echo hppa64-unknown-linux-gnu
949
+ ppc64:Linux:*:*)
950
+ echo powerpc64-unknown-linux-gnu
951
+ exit ;;
952
+ ppc:Linux:*:*)
953
+ echo powerpc-unknown-linux-gnu
938
954
  exit ;;
939
955
  s390:Linux:*:* | s390x:Linux:*:*)
940
956
  echo ${UNAME_MACHINE}-ibm-linux
@@ -954,72 +970,9 @@ EOF
954
970
  x86_64:Linux:*:*)
955
971
  echo x86_64-unknown-linux-gnu
956
972
  exit ;;
957
- xtensa:Linux:*:*)
958
- echo xtensa-unknown-linux-gnu
973
+ xtensa*:Linux:*:*)
974
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
959
975
  exit ;;
960
- i*86:Linux:*:*)
961
- # The BFD linker knows what the default object file format is, so
962
- # first see if it will tell us. cd to the root directory to prevent
963
- # problems with other programs or directories called `ld' in the path.
964
- # Set LC_ALL=C to ensure ld outputs messages in English.
965
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
966
- | sed -ne '/supported targets:/!d
967
- s/[ ][ ]*/ /g
968
- s/.*supported targets: *//
969
- s/ .*//
970
- p'`
971
- case "$ld_supported_targets" in
972
- elf32-i386)
973
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
974
- ;;
975
- a.out-i386-linux)
976
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
977
- exit ;;
978
- coff-i386)
979
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
980
- exit ;;
981
- "")
982
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
983
- # one that does not give us useful --help.
984
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
985
- exit ;;
986
- esac
987
- # Determine whether the default compiler is a.out or elf
988
- eval $set_cc_for_build
989
- sed 's/^ //' << EOF >$dummy.c
990
- #include <features.h>
991
- #ifdef __ELF__
992
- # ifdef __GLIBC__
993
- # if __GLIBC__ >= 2
994
- LIBC=gnu
995
- # else
996
- LIBC=gnulibc1
997
- # endif
998
- # else
999
- LIBC=gnulibc1
1000
- # endif
1001
- #else
1002
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1003
- LIBC=gnu
1004
- #else
1005
- LIBC=gnuaout
1006
- #endif
1007
- #endif
1008
- #ifdef __dietlibc__
1009
- LIBC=dietlibc
1010
- #endif
1011
- EOF
1012
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1013
- /^LIBC/{
1014
- s: ::g
1015
- p
1016
- }'`"
1017
- test x"${LIBC}" != x && {
1018
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1019
- exit
1020
- }
1021
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1022
- ;;
1023
976
  i*86:DYNIX/ptx:4*:*)
1024
977
  # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1025
978
  # earlier versions are messed up and put the nodename in both
@@ -1048,7 +1001,7 @@ EOF
1048
1001
  i*86:syllable:*:*)
1049
1002
  echo ${UNAME_MACHINE}-pc-syllable
1050
1003
  exit ;;
1051
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1004
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1052
1005
  echo i386-unknown-lynxos${UNAME_RELEASE}
1053
1006
  exit ;;
1054
1007
  i*86:*DOS:*:*)
@@ -1092,8 +1045,11 @@ EOF
1092
1045
  pc:*:*:*)
1093
1046
  # Left here for compatibility:
1094
1047
  # uname -m prints for DJGPP always 'pc', but it prints nothing about
1095
- # the processor, so we play safe by assuming i386.
1096
- echo i386-pc-msdosdjgpp
1048
+ # the processor, so we play safe by assuming i586.
1049
+ # Note: whatever this is, it MUST be the same as what config.sub
1050
+ # prints for the "djgpp" host, or else GDB configury will decide that
1051
+ # this is a cross-build.
1052
+ echo i586-pc-msdosdjgpp
1097
1053
  exit ;;
1098
1054
  Intel:Mach:3*:*)
1099
1055
  echo i386-pc-mach3
@@ -1131,6 +1087,16 @@ EOF
1131
1087
  3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1132
1088
  /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1133
1089
  && { echo i486-ncr-sysv4; exit; } ;;
1090
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1091
+ OS_REL='.3'
1092
+ test -r /etc/.relid \
1093
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1094
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1095
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1096
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1097
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1098
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1099
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1134
1100
  m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1135
1101
  echo m68k-unknown-lynxos${UNAME_RELEASE}
1136
1102
  exit ;;
@@ -1143,7 +1109,7 @@ EOF
1143
1109
  rs6000:LynxOS:2.*:*)
1144
1110
  echo rs6000-unknown-lynxos${UNAME_RELEASE}
1145
1111
  exit ;;
1146
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1112
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1147
1113
  echo powerpc-unknown-lynxos${UNAME_RELEASE}
1148
1114
  exit ;;
1149
1115
  SM[BE]S:UNIX_SV:*:*)
@@ -1206,6 +1172,9 @@ EOF
1206
1172
  BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1207
1173
  echo i586-pc-beos
1208
1174
  exit ;;
1175
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1176
+ echo i586-pc-haiku
1177
+ exit ;;
1209
1178
  SX-4:SUPER-UX:*:*)
1210
1179
  echo sx4-nec-superux${UNAME_RELEASE}
1211
1180
  exit ;;
@@ -1233,6 +1202,16 @@ EOF
1233
1202
  *:Darwin:*:*)
1234
1203
  UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1235
1204
  case $UNAME_PROCESSOR in
1205
+ i386)
1206
+ eval $set_cc_for_build
1207
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1208
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1209
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1210
+ grep IS_64BIT_ARCH >/dev/null
1211
+ then
1212
+ UNAME_PROCESSOR="x86_64"
1213
+ fi
1214
+ fi ;;
1236
1215
  unknown) UNAME_PROCESSOR=powerpc ;;
1237
1216
  esac
1238
1217
  echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1314,6 +1293,9 @@ EOF
1314
1293
  i*86:rdos:*:*)
1315
1294
  echo ${UNAME_MACHINE}-pc-rdos
1316
1295
  exit ;;
1296
+ i*86:AROS:*:*)
1297
+ echo ${UNAME_MACHINE}-pc-aros
1298
+ exit ;;
1317
1299
  esac
1318
1300
 
1319
1301
  #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1474,9 +1456,9 @@ This script, last modified $timestamp, has failed to recognize
1474
1456
  the operating system you are using. It is advised that you
1475
1457
  download the most up to date version of the config scripts from
1476
1458
 
1477
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1459
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1478
1460
  and
1479
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1461
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1480
1462
 
1481
1463
  If the version you run ($0) is already up to date, please
1482
1464
  send the following data and any information you think might be
@@ -1,10 +1,10 @@
1
1
  #! /bin/sh
2
2
  # Configuration validation subroutine script.
3
3
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
- # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
- # Inc.
4
+ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
+ # Free Software Foundation, Inc.
6
6
 
7
- timestamp='2007-04-29'
7
+ timestamp='2009-11-07'
8
8
 
9
9
  # This file is (in principle) common to ALL GNU software.
10
10
  # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2007-04-29'
32
32
 
33
33
 
34
34
  # Please send patches to <config-patches@gnu.org>. Submit a context
35
- # diff and a properly formatted ChangeLog entry.
35
+ # diff and a properly formatted GNU ChangeLog entry.
36
36
  #
37
37
  # Configuration subroutine to validate and canonicalize a configuration type.
38
38
  # Supply the specified configuration type as an argument.
39
39
  # If it is invalid, we print an error message on stderr and exit with code 1.
40
40
  # Otherwise, we print the canonical config type on stdout and succeed.
41
41
 
42
+ # You can get the latest version of this script from:
43
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
44
+
42
45
  # This file is supposed to be the same for all GNU packages
43
46
  # and recognize all the CPU types, system types and aliases
44
47
  # that are meaningful with *any* GNU software.
@@ -72,8 +75,8 @@ Report bugs and patches to <config-patches@gnu.org>."
72
75
  version="\
73
76
  GNU config.sub ($timestamp)
74
77
 
75
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
76
- Free Software Foundation, Inc.
78
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
79
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
77
80
 
78
81
  This is free software; see the source for copying conditions. There is NO
79
82
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -122,6 +125,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122
125
  case $maybe_os in
123
126
  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
124
127
  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
128
+ kopensolaris*-gnu* | \
125
129
  storm-chaos* | os2-emx* | rtmk-nova*)
126
130
  os=-$maybe_os
127
131
  basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,10 +152,13 @@ case $os in
148
152
  -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149
153
  -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150
154
  -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151
- -apple | -axis | -knuth | -cray)
155
+ -apple | -axis | -knuth | -cray | -microblaze)
152
156
  os=
153
157
  basic_machine=$1
154
158
  ;;
159
+ -bluegene*)
160
+ os=-cnk
161
+ ;;
155
162
  -sim | -cisco | -oki | -wec | -winbond)
156
163
  os=
157
164
  basic_machine=$1
@@ -249,13 +256,16 @@ case $basic_machine in
249
256
  | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
250
257
  | i370 | i860 | i960 | ia64 \
251
258
  | ip2k | iq2000 \
259
+ | lm32 \
252
260
  | m32c | m32r | m32rle | m68000 | m68k | m88k \
253
- | maxq | mb | microblaze | mcore | mep \
261
+ | maxq | mb | microblaze | mcore | mep | metag \
254
262
  | mips | mipsbe | mipseb | mipsel | mipsle \
255
263
  | mips16 \
256
264
  | mips64 | mips64el \
257
- | mips64vr | mips64vrel \
265
+ | mips64octeon | mips64octeonel \
258
266
  | mips64orion | mips64orionel \
267
+ | mips64r5900 | mips64r5900el \
268
+ | mips64vr | mips64vrel \
259
269
  | mips64vr4100 | mips64vr4100el \
260
270
  | mips64vr4300 | mips64vr4300el \
261
271
  | mips64vr5000 | mips64vr5000el \
@@ -268,6 +278,7 @@ case $basic_machine in
268
278
  | mipsisa64sr71k | mipsisa64sr71kel \
269
279
  | mipstx39 | mipstx39el \
270
280
  | mn10200 | mn10300 \
281
+ | moxie \
271
282
  | mt \
272
283
  | msp430 \
273
284
  | nios | nios2 \
@@ -276,20 +287,22 @@ case $basic_machine in
276
287
  | pdp10 | pdp11 | pj | pjl \
277
288
  | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
278
289
  | pyramid \
290
+ | rx \
279
291
  | score \
280
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
292
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
281
293
  | sh64 | sh64le \
282
294
  | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
283
295
  | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
284
296
  | spu | strongarm \
285
297
  | tahoe | thumb | tic4x | tic80 | tron \
298
+ | ubicom32 \
286
299
  | v850 | v850e \
287
300
  | we32k \
288
301
  | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
289
- | z8k)
302
+ | z8k | z80)
290
303
  basic_machine=$basic_machine-unknown
291
304
  ;;
292
- m6811 | m68hc11 | m6812 | m68hc12)
305
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
293
306
  # Motorola 68HC11/12.
294
307
  basic_machine=$basic_machine-unknown
295
308
  os=-none
@@ -329,14 +342,17 @@ case $basic_machine in
329
342
  | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
330
343
  | i*86-* | i860-* | i960-* | ia64-* \
331
344
  | ip2k-* | iq2000-* \
345
+ | lm32-* \
332
346
  | m32c-* | m32r-* | m32rle-* \
333
347
  | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
334
- | m88110-* | m88k-* | maxq-* | mcore-* \
348
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
335
349
  | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
336
350
  | mips16-* \
337
351
  | mips64-* | mips64el-* \
338
- | mips64vr-* | mips64vrel-* \
352
+ | mips64octeon-* | mips64octeonel-* \
339
353
  | mips64orion-* | mips64orionel-* \
354
+ | mips64r5900-* | mips64r5900el-* \
355
+ | mips64vr-* | mips64vrel-* \
340
356
  | mips64vr4100-* | mips64vr4100el-* \
341
357
  | mips64vr4300-* | mips64vr4300el-* \
342
358
  | mips64vr5000-* | mips64vr5000el-* \
@@ -357,21 +373,26 @@ case $basic_machine in
357
373
  | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
358
374
  | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
359
375
  | pyramid-* \
360
- | romp-* | rs6000-* \
361
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
376
+ | romp-* | rs6000-* | rx-* \
377
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
362
378
  | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
363
379
  | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
364
380
  | sparclite-* \
365
381
  | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
366
382
  | tahoe-* | thumb-* \
367
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
383
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
368
384
  | tron-* \
385
+ | ubicom32-* \
369
386
  | v850-* | v850e-* | vax-* \
370
387
  | we32k-* \
371
388
  | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
372
- | xstormy16-* | xtensa-* \
389
+ | xstormy16-* | xtensa*-* \
373
390
  | ymp-* \
374
- | z8k-*)
391
+ | z8k-* | z80-*)
392
+ ;;
393
+ # Recognize the basic CPU types without company name, with glob match.
394
+ xtensa*)
395
+ basic_machine=$basic_machine-unknown
375
396
  ;;
376
397
  # Recognize the various machine names and aliases which stand
377
398
  # for a CPU type and a company and sometimes even an OS.
@@ -435,6 +456,10 @@ case $basic_machine in
435
456
  basic_machine=m68k-apollo
436
457
  os=-bsd
437
458
  ;;
459
+ aros)
460
+ basic_machine=i386-pc
461
+ os=-aros
462
+ ;;
438
463
  aux)
439
464
  basic_machine=m68k-apple
440
465
  os=-aux
@@ -443,10 +468,26 @@ case $basic_machine in
443
468
  basic_machine=ns32k-sequent
444
469
  os=-dynix
445
470
  ;;
471
+ blackfin)
472
+ basic_machine=bfin-unknown
473
+ os=-linux
474
+ ;;
475
+ blackfin-*)
476
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
477
+ os=-linux
478
+ ;;
479
+ bluegene*)
480
+ basic_machine=powerpc-ibm
481
+ os=-cnk
482
+ ;;
446
483
  c90)
447
484
  basic_machine=c90-cray
448
485
  os=-unicos
449
486
  ;;
487
+ cegcc)
488
+ basic_machine=arm-unknown
489
+ os=-cegcc
490
+ ;;
450
491
  convex-c1)
451
492
  basic_machine=c1-convex
452
493
  os=-bsd
@@ -475,8 +516,8 @@ case $basic_machine in
475
516
  basic_machine=craynv-cray
476
517
  os=-unicosmp
477
518
  ;;
478
- cr16c)
479
- basic_machine=cr16c-unknown
519
+ cr16)
520
+ basic_machine=cr16-unknown
480
521
  os=-elf
481
522
  ;;
482
523
  crds | unos)
@@ -514,6 +555,10 @@ case $basic_machine in
514
555
  basic_machine=m88k-motorola
515
556
  os=-sysv3
516
557
  ;;
558
+ dicos)
559
+ basic_machine=i686-pc
560
+ os=-dicos
561
+ ;;
517
562
  djgpp)
518
563
  basic_machine=i586-pc
519
564
  os=-msdosdjgpp
@@ -668,6 +713,14 @@ case $basic_machine in
668
713
  basic_machine=m68k-isi
669
714
  os=-sysv
670
715
  ;;
716
+ m68knommu)
717
+ basic_machine=m68k-unknown
718
+ os=-linux
719
+ ;;
720
+ m68knommu-*)
721
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
722
+ os=-linux
723
+ ;;
671
724
  m88k-omron*)
672
725
  basic_machine=m88k-omron
673
726
  ;;
@@ -679,6 +732,9 @@ case $basic_machine in
679
732
  basic_machine=ns32k-utek
680
733
  os=-sysv
681
734
  ;;
735
+ microblaze)
736
+ basic_machine=microblaze-xilinx
737
+ ;;
682
738
  mingw32)
683
739
  basic_machine=i386-pc
684
740
  os=-mingw32
@@ -813,6 +869,14 @@ case $basic_machine in
813
869
  basic_machine=i860-intel
814
870
  os=-osf
815
871
  ;;
872
+ parisc)
873
+ basic_machine=hppa-unknown
874
+ os=-linux
875
+ ;;
876
+ parisc-*)
877
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
878
+ os=-linux
879
+ ;;
816
880
  pbd)
817
881
  basic_machine=sparc-tti
818
882
  ;;
@@ -1021,6 +1085,10 @@ case $basic_machine in
1021
1085
  basic_machine=tic6x-unknown
1022
1086
  os=-coff
1023
1087
  ;;
1088
+ tile*)
1089
+ basic_machine=tile-unknown
1090
+ os=-linux-gnu
1091
+ ;;
1024
1092
  tx39)
1025
1093
  basic_machine=mipstx39-unknown
1026
1094
  ;;
@@ -1096,6 +1164,10 @@ case $basic_machine in
1096
1164
  basic_machine=z8k-unknown
1097
1165
  os=-sim
1098
1166
  ;;
1167
+ z80-*-coff)
1168
+ basic_machine=z80-unknown
1169
+ os=-sim
1170
+ ;;
1099
1171
  none)
1100
1172
  basic_machine=none-none
1101
1173
  os=-none
@@ -1134,7 +1206,7 @@ case $basic_machine in
1134
1206
  we32k)
1135
1207
  basic_machine=we32k-att
1136
1208
  ;;
1137
- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1209
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1138
1210
  basic_machine=sh-unknown
1139
1211
  ;;
1140
1212
  sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1204,10 +1276,11 @@ case $os in
1204
1276
  # Each alternative MUST END IN A *, to match a version number.
1205
1277
  # -sysv* is not here because it comes later, after sysvr4.
1206
1278
  -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1207
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1279
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1208
1280
  | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1281
+ | -kopensolaris* \
1209
1282
  | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1210
- | -aos* \
1283
+ | -aos* | -aros* \
1211
1284
  | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1212
1285
  | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1213
1286
  | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1216,7 +1289,7 @@ case $os in
1216
1289
  | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1217
1290
  | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1218
1291
  | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1219
- | -chorusos* | -chorusrdb* \
1292
+ | -chorusos* | -chorusrdb* | -cegcc* \
1220
1293
  | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1221
1294
  | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1222
1295
  | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1226,7 +1299,7 @@ case $os in
1226
1299
  | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1227
1300
  | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1228
1301
  | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1229
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1302
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1230
1303
  # Remember, each alternative MUST END IN *, to match a version number.
1231
1304
  ;;
1232
1305
  -qnx*)
@@ -1356,6 +1429,9 @@ case $os in
1356
1429
  -zvmoe)
1357
1430
  os=-zvmoe
1358
1431
  ;;
1432
+ -dicos*)
1433
+ os=-dicos
1434
+ ;;
1359
1435
  -none)
1360
1436
  ;;
1361
1437
  *)
@@ -1553,7 +1629,7 @@ case $basic_machine in
1553
1629
  -sunos*)
1554
1630
  vendor=sun
1555
1631
  ;;
1556
- -aix*)
1632
+ -cnk*|-aix*)
1557
1633
  vendor=ibm
1558
1634
  ;;
1559
1635
  -beos*)