ffi 1.9.18-x64-mingw32 → 1.9.21-x64-mingw32

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 (384) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +3 -2
  3. data/Rakefile +14 -4
  4. data/ext/ffi_c/AbstractMemory.c +6 -1
  5. data/ext/ffi_c/Platform.c +10 -2
  6. data/ext/ffi_c/extconf.rb +7 -2
  7. data/ext/ffi_c/libffi.bsd.mk +9 -3
  8. data/ext/ffi_c/libffi.darwin.mk +14 -4
  9. data/ext/ffi_c/libffi.gnu.mk +2 -1
  10. data/ext/ffi_c/libffi.mk +9 -4
  11. data/ext/ffi_c/libffi/ChangeLog.libffi +2 -2
  12. data/ext/ffi_c/libffi/{ChangeLog → ChangeLog.libffi-3.1} +1402 -2
  13. data/ext/ffi_c/libffi/ChangeLog.v1 +1 -1
  14. data/ext/ffi_c/libffi/LICENSE +1 -1
  15. data/ext/ffi_c/libffi/Makefile.am +166 -157
  16. data/ext/ffi_c/libffi/Makefile.in +923 -938
  17. data/ext/ffi_c/libffi/README +164 -52
  18. data/ext/ffi_c/libffi/acinclude.m4 +381 -0
  19. data/ext/ffi_c/libffi/aclocal.m4 +645 -384
  20. data/ext/ffi_c/libffi/autogen.sh +2 -0
  21. data/ext/ffi_c/libffi/autom4te.cache/output.0 +21972 -0
  22. data/ext/ffi_c/libffi/autom4te.cache/output.1 +21972 -0
  23. data/ext/ffi_c/libffi/autom4te.cache/output.2 +21972 -0
  24. data/ext/ffi_c/libffi/autom4te.cache/output.3 +21972 -0
  25. data/ext/ffi_c/libffi/autom4te.cache/requests +331 -0
  26. data/ext/ffi_c/libffi/autom4te.cache/traces.0 +4010 -0
  27. data/ext/ffi_c/libffi/autom4te.cache/traces.1 +1005 -0
  28. data/ext/ffi_c/libffi/autom4te.cache/traces.2 +4010 -0
  29. data/ext/ffi_c/libffi/autom4te.cache/traces.3 +4010 -0
  30. data/ext/ffi_c/libffi/compile +218 -14
  31. data/ext/ffi_c/libffi/config.guess +329 -368
  32. data/ext/ffi_c/libffi/config.sub +232 -112
  33. data/ext/ffi_c/libffi/configure +6970 -2189
  34. data/ext/ffi_c/libffi/configure.ac +148 -256
  35. data/ext/ffi_c/libffi/configure.host +265 -4
  36. data/ext/ffi_c/libffi/depcomp +346 -185
  37. data/ext/ffi_c/libffi/doc/Makefile.am +3 -0
  38. data/ext/ffi_c/libffi/doc/Makefile.in +811 -0
  39. data/ext/ffi_c/libffi/doc/libffi.texi +430 -45
  40. data/ext/ffi_c/libffi/{mdate-sh → doc/mdate-sh} +40 -13
  41. data/ext/ffi_c/libffi/{texinfo.tex → doc/texinfo.tex} +3990 -1121
  42. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  43. data/ext/ffi_c/libffi/fficonfig.h.in +24 -13
  44. data/ext/ffi_c/libffi/fficonfig.h.in~ +210 -0
  45. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +207 -0
  46. data/ext/ffi_c/libffi/include/Makefile.am +3 -3
  47. data/ext/ffi_c/libffi/include/Makefile.in +188 -71
  48. data/ext/ffi_c/libffi/include/ffi.h.in +107 -50
  49. data/ext/ffi_c/libffi/include/ffi_cfi.h +55 -0
  50. data/ext/ffi_c/libffi/include/ffi_common.h +32 -11
  51. data/ext/ffi_c/libffi/install-sh +190 -202
  52. data/ext/ffi_c/libffi/libffi.map.in +80 -0
  53. data/ext/ffi_c/libffi/libffi.pc.in +3 -2
  54. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +637 -0
  55. data/ext/ffi_c/libffi/libtool-ldflags +106 -0
  56. data/ext/ffi_c/libffi/libtool-version +1 -1
  57. data/ext/ffi_c/libffi/ltmain.sh +3553 -2033
  58. data/ext/ffi_c/libffi/m4/asmcfi.m4 +13 -0
  59. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +69 -0
  60. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +13 -8
  61. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +31 -104
  62. data/ext/ffi_c/libffi/m4/{ax_check_compiler_flags.m4 → ax_check_compile_flag.m4} +30 -34
  63. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +32 -11
  64. data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +6 -5
  65. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +31 -21
  66. data/ext/ffi_c/libffi/m4/libtool.m4 +1691 -1135
  67. data/ext/ffi_c/libffi/m4/ltoptions.m4 +104 -36
  68. data/ext/ffi_c/libffi/m4/ltsugar.m4 +4 -3
  69. data/ext/ffi_c/libffi/m4/ltversion.m4 +6 -6
  70. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +4 -3
  71. data/ext/ffi_c/libffi/man/Makefile.am +2 -2
  72. data/ext/ffi_c/libffi/man/Makefile.in +141 -49
  73. data/ext/ffi_c/libffi/man/ffi.3 +10 -0
  74. data/ext/ffi_c/libffi/man/ffi_prep_cif.3 +6 -4
  75. data/ext/ffi_c/libffi/man/ffi_prep_cif_var.3 +73 -0
  76. data/ext/ffi_c/libffi/missing +150 -311
  77. data/ext/ffi_c/libffi/msvcc.sh +72 -9
  78. data/ext/ffi_c/libffi/src/aarch64/ffi.c +941 -0
  79. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +81 -0
  80. data/ext/ffi_c/libffi/src/aarch64/internal.h +67 -0
  81. data/ext/ffi_c/libffi/src/aarch64/sysv.S +438 -0
  82. data/ext/ffi_c/libffi/src/alpha/ffi.c +335 -98
  83. data/ext/ffi_c/libffi/src/alpha/ffitarget.h +10 -1
  84. data/ext/ffi_c/libffi/src/alpha/internal.h +23 -0
  85. data/ext/ffi_c/libffi/src/alpha/osf.S +161 -266
  86. data/ext/ffi_c/libffi/src/arc/arcompact.S +135 -0
  87. data/ext/ffi_c/libffi/src/arc/ffi.c +266 -0
  88. data/ext/ffi_c/libffi/src/arc/ffitarget.h +53 -0
  89. data/ext/ffi_c/libffi/src/arm/ffi.c +597 -517
  90. data/ext/ffi_c/libffi/src/arm/ffitarget.h +24 -7
  91. data/ext/ffi_c/libffi/src/arm/internal.h +7 -0
  92. data/ext/ffi_c/libffi/src/arm/sysv.S +303 -417
  93. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +6 -1
  94. data/ext/ffi_c/libffi/src/bfin/ffi.c +196 -0
  95. data/ext/ffi_c/libffi/src/bfin/ffitarget.h +43 -0
  96. data/ext/ffi_c/libffi/src/bfin/sysv.S +179 -0
  97. data/ext/ffi_c/libffi/src/closures.c +319 -44
  98. data/ext/ffi_c/libffi/src/cris/ffi.c +10 -7
  99. data/ext/ffi_c/libffi/src/cris/ffitarget.h +6 -1
  100. data/ext/ffi_c/libffi/src/debug.c +6 -1
  101. data/ext/ffi_c/libffi/src/dlmalloc.c +16 -11
  102. data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
  103. data/ext/ffi_c/libffi/src/frv/ffitarget.h +6 -1
  104. data/ext/ffi_c/libffi/src/ia64/ffi.c +11 -7
  105. data/ext/ffi_c/libffi/src/ia64/ffitarget.h +6 -1
  106. data/ext/ffi_c/libffi/src/java_raw_api.c +23 -5
  107. data/ext/ffi_c/libffi/src/m32r/ffi.c +1 -1
  108. data/ext/ffi_c/libffi/src/m32r/ffitarget.h +6 -1
  109. data/ext/ffi_c/libffi/src/m68k/ffi.c +87 -13
  110. data/ext/ffi_c/libffi/src/m68k/ffitarget.h +6 -1
  111. data/ext/ffi_c/libffi/src/m68k/sysv.S +119 -32
  112. data/ext/ffi_c/libffi/src/m88k/ffi.c +400 -0
  113. data/ext/ffi_c/libffi/src/m88k/ffitarget.h +49 -0
  114. data/ext/ffi_c/libffi/src/m88k/obsd.S +209 -0
  115. data/ext/ffi_c/libffi/src/metag/ffi.c +330 -0
  116. data/ext/ffi_c/libffi/{fficonfig.hw → src/metag/ffitarget.h} +22 -26
  117. data/ext/ffi_c/libffi/src/metag/sysv.S +311 -0
  118. data/ext/ffi_c/libffi/src/microblaze/ffi.c +321 -0
  119. data/ext/ffi_c/libffi/src/microblaze/ffitarget.h +53 -0
  120. data/ext/ffi_c/libffi/src/microblaze/sysv.S +302 -0
  121. data/ext/ffi_c/libffi/src/mips/ffi.c +95 -28
  122. data/ext/ffi_c/libffi/src/mips/ffitarget.h +9 -2
  123. data/ext/ffi_c/libffi/src/mips/n32.S +126 -56
  124. data/ext/ffi_c/libffi/src/mips/o32.S +148 -27
  125. data/ext/ffi_c/libffi/src/moxie/eabi.S +55 -82
  126. data/ext/ffi_c/libffi/src/moxie/ffi.c +40 -44
  127. data/ext/ffi_c/libffi/src/moxie/ffitarget.h +52 -0
  128. data/ext/ffi_c/libffi/src/nios2/ffi.c +304 -0
  129. data/ext/ffi_c/libffi/src/nios2/ffitarget.h +52 -0
  130. data/ext/ffi_c/libffi/src/nios2/sysv.S +136 -0
  131. data/ext/ffi_c/libffi/src/or1k/ffi.c +328 -0
  132. data/ext/ffi_c/libffi/src/or1k/ffitarget.h +58 -0
  133. data/ext/ffi_c/libffi/src/or1k/sysv.S +107 -0
  134. data/ext/ffi_c/libffi/src/pa/ffitarget.h +8 -1
  135. data/ext/ffi_c/libffi/src/powerpc/aix.S +6 -6
  136. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +3 -1
  137. data/ext/ffi_c/libffi/src/powerpc/asm.h +2 -2
  138. data/ext/ffi_c/libffi/src/powerpc/darwin.S +2 -7
  139. data/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +22 -26
  140. data/ext/ffi_c/libffi/src/powerpc/ffi.c +103 -1378
  141. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +25 -25
  142. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +945 -0
  143. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +94 -0
  144. data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +923 -0
  145. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +100 -44
  146. data/ext/ffi_c/libffi/src/powerpc/linux64.S +100 -59
  147. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +360 -108
  148. data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +138 -68
  149. data/ext/ffi_c/libffi/src/powerpc/sysv.S +68 -112
  150. data/ext/ffi_c/libffi/src/prep_cif.c +108 -24
  151. data/ext/ffi_c/libffi/src/raw_api.c +18 -5
  152. data/ext/ffi_c/libffi/src/s390/ffi.c +294 -318
  153. data/ext/ffi_c/libffi/src/s390/ffitarget.h +9 -1
  154. data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
  155. data/ext/ffi_c/libffi/src/s390/sysv.S +257 -366
  156. data/ext/ffi_c/libffi/src/sh/ffi.c +4 -3
  157. data/ext/ffi_c/libffi/src/sh/ffitarget.h +6 -1
  158. data/ext/ffi_c/libffi/src/sh64/ffi.c +3 -2
  159. data/ext/ffi_c/libffi/src/sh64/ffitarget.h +6 -1
  160. data/ext/ffi_c/libffi/src/sparc/ffi.c +326 -527
  161. data/ext/ffi_c/libffi/src/sparc/ffi64.c +608 -0
  162. data/ext/ffi_c/libffi/src/sparc/ffitarget.h +20 -7
  163. data/ext/ffi_c/libffi/src/sparc/internal.h +26 -0
  164. data/ext/ffi_c/libffi/src/sparc/v8.S +364 -234
  165. data/ext/ffi_c/libffi/src/sparc/v9.S +340 -207
  166. data/ext/ffi_c/libffi/src/tile/ffi.c +355 -0
  167. data/ext/ffi_c/libffi/src/tile/ffitarget.h +65 -0
  168. data/ext/ffi_c/libffi/src/tile/tile.S +360 -0
  169. data/ext/ffi_c/libffi/src/types.c +43 -14
  170. data/ext/ffi_c/libffi/src/vax/elfbsd.S +195 -0
  171. data/ext/ffi_c/libffi/src/vax/ffi.c +276 -0
  172. data/ext/ffi_c/libffi/src/vax/ffitarget.h +49 -0
  173. data/ext/ffi_c/libffi/src/x86/asmnames.h +30 -0
  174. data/ext/ffi_c/libffi/src/x86/ffi.c +589 -500
  175. data/ext/ffi_c/libffi/src/x86/ffi64.c +338 -116
  176. data/ext/ffi_c/libffi/src/x86/ffitarget.h +55 -35
  177. data/ext/ffi_c/libffi/src/x86/ffiw64.c +287 -0
  178. data/ext/ffi_c/libffi/src/x86/internal.h +29 -0
  179. data/ext/ffi_c/libffi/src/x86/internal64.h +22 -0
  180. data/ext/ffi_c/libffi/src/x86/sysv.S +975 -400
  181. data/ext/ffi_c/libffi/src/x86/unix64.S +398 -299
  182. data/ext/ffi_c/libffi/src/x86/win64.S +222 -458
  183. data/ext/ffi_c/libffi/src/x86/win64_intel.S +237 -0
  184. data/ext/ffi_c/libffi/src/xtensa/ffi.c +298 -0
  185. data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +53 -0
  186. data/ext/ffi_c/libffi/src/xtensa/sysv.S +253 -0
  187. data/ext/ffi_c/libffi/stamp-h.in +1 -0
  188. data/ext/ffi_c/libffi/testsuite/Makefile.am +78 -73
  189. data/ext/ffi_c/libffi/testsuite/Makefile.in +218 -111
  190. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +120 -25
  191. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +21 -1
  192. data/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +46 -0
  193. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +4 -6
  194. data/ext/ffi_c/libffi/testsuite/libffi.call/{closure_stdcall.c → closure_simple.c} +7 -16
  195. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c +4 -4
  196. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c +4 -4
  197. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c +4 -4
  198. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c +4 -4
  199. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c +4 -4
  200. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c +4 -4
  201. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c +4 -4
  202. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c +5 -5
  203. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c +4 -4
  204. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c +4 -4
  205. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c +4 -4
  206. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c +4 -4
  207. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c +4 -4
  208. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c +4 -4
  209. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c +4 -4
  210. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c +4 -4
  211. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c +5 -5
  212. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c +4 -4
  213. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c +4 -4
  214. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c +4 -4
  215. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c +4 -4
  216. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c +4 -4
  217. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c +4 -4
  218. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c +4 -4
  219. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c +4 -4
  220. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c +4 -4
  221. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c +4 -4
  222. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c +4 -6
  223. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c +4 -6
  224. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c +4 -4
  225. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c +4 -4
  226. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c +4 -4
  227. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +4 -4
  228. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c +4 -4
  229. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c +4 -4
  230. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +4 -4
  231. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_dbls_struct.c +4 -4
  232. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +10 -9
  233. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c +3 -3
  234. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c +10 -9
  235. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_many_mixed_args.c +70 -0
  236. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_many_mixed_float_double.c +55 -0
  237. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c +1 -1
  238. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c +11 -9
  239. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_struct_va1.c +114 -0
  240. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar_va.c +44 -0
  241. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uint_va.c +45 -0
  242. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulong_va.c +45 -0
  243. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +5 -5
  244. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort_va.c +44 -0
  245. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +2 -2
  246. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +23 -40
  247. data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +3 -1
  248. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +6 -4
  249. data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +4 -2
  250. data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +107 -0
  251. data/ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c +18 -19
  252. data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +6 -16
  253. data/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +57 -0
  254. data/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +70 -0
  255. data/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +78 -0
  256. data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +0 -1
  257. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c +6 -6
  258. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c +8 -8
  259. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +6 -6
  260. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct11.c +121 -0
  261. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c +5 -5
  262. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c +5 -5
  263. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c +5 -5
  264. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c +5 -5
  265. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c +6 -6
  266. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c +5 -5
  267. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c +6 -6
  268. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c +6 -6
  269. data/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +46 -0
  270. data/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +127 -0
  271. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +1 -0
  272. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +1 -1
  273. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +1 -1
  274. data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +1 -1
  275. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large.c +7 -7
  276. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large2.c +7 -7
  277. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium.c +5 -5
  278. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c +5 -5
  279. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +2 -2
  280. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +49 -0
  281. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +49 -0
  282. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +55 -0
  283. data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +9 -7
  284. data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +7 -7
  285. data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +7 -6
  286. data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +9 -8
  287. data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +9 -8
  288. data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +9 -9
  289. data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +9 -9
  290. data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +9 -8
  291. data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +9 -8
  292. data/ext/ffi_c/libffi/testsuite/libffi.call/testclosure.c +2 -2
  293. data/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +61 -0
  294. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.call}/unwindtest.cc +3 -10
  295. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.call}/unwindtest_ffi_call.cc +2 -1
  296. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +196 -0
  297. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +121 -0
  298. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +123 -0
  299. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +125 -0
  300. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +91 -0
  301. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +10 -0
  302. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +10 -0
  303. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +10 -0
  304. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +42 -0
  305. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +10 -0
  306. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +10 -0
  307. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +10 -0
  308. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +71 -0
  309. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +10 -0
  310. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +10 -0
  311. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +10 -0
  312. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +80 -0
  313. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +10 -0
  314. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +16 -0
  315. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +10 -0
  316. data/ext/ffi_c/libffi/testsuite/{libffi.special/special.exp → libffi.complex/complex.exp} +9 -8
  317. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +51 -0
  318. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +7 -0
  319. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +7 -0
  320. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +7 -0
  321. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +10 -0
  322. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +10 -0
  323. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +86 -0
  324. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +10 -0
  325. data/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +1 -0
  326. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +78 -0
  327. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +10 -0
  328. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +10 -0
  329. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +10 -0
  330. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +37 -0
  331. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +41 -0
  332. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +10 -0
  333. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +10 -0
  334. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +10 -0
  335. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +44 -0
  336. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +10 -0
  337. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +10 -0
  338. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +10 -0
  339. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +10 -0
  340. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +10 -0
  341. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +10 -0
  342. data/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +34 -0
  343. data/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +28 -0
  344. data/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +1 -0
  345. data/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +36 -0
  346. data/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +19 -0
  347. data/ffi.gemspec +2 -2
  348. data/lib/2.0/ffi_c.so +0 -0
  349. data/lib/2.1/ffi_c.so +0 -0
  350. data/lib/2.2/ffi_c.so +0 -0
  351. data/lib/2.3/ffi_c.so +0 -0
  352. data/lib/2.4/ffi_c.so +0 -0
  353. data/lib/2.5/ffi_c.so +0 -0
  354. data/lib/ffi/enum.rb +124 -0
  355. data/lib/ffi/library.rb +65 -13
  356. data/lib/ffi/platform.rb +7 -2
  357. data/lib/ffi/platform/sparc64-linux/types.conf +102 -0
  358. data/lib/ffi/platform/x86_64-windows/types.conf +113 -20
  359. data/lib/ffi/pointer.rb +1 -0
  360. data/lib/ffi/struct.rb +0 -2
  361. data/lib/ffi/version.rb +1 -1
  362. data/spec/ffi/bitmask_spec.rb +575 -0
  363. data/spec/ffi/embed-test/ext/Makefile +242 -0
  364. data/spec/ffi/fixtures/BitmaskTest.c +51 -0
  365. data/spec/ffi/rbx/memory_pointer_spec.rb +4 -0
  366. data/spec/ffi/struct_spec.rb +0 -4
  367. metadata +158 -32
  368. data/ext/ffi_c/libffi/Makefile.vc +0 -141
  369. data/ext/ffi_c/libffi/Makefile.vc64 +0 -141
  370. data/ext/ffi_c/libffi/build-ios.sh +0 -67
  371. data/ext/ffi_c/libffi/doc/libffi.info +0 -593
  372. data/ext/ffi_c/libffi/doc/stamp-vti +0 -4
  373. data/ext/ffi_c/libffi/include/ffi.h.vc +0 -427
  374. data/ext/ffi_c/libffi/include/ffi.h.vc64 +0 -427
  375. data/ext/ffi_c/libffi/src/arm/gentramp.sh +0 -118
  376. data/ext/ffi_c/libffi/src/arm/trampoline.S +0 -4450
  377. data/ext/ffi_c/libffi/src/x86/darwin.S +0 -444
  378. data/ext/ffi_c/libffi/src/x86/darwin64.S +0 -416
  379. data/ext/ffi_c/libffi/src/x86/freebsd.S +0 -458
  380. data/ext/ffi_c/libffi/src/x86/win32.S +0 -1065
  381. data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +0 -300
  382. data/ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c +0 -63
  383. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c +0 -44
  384. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +0 -96
@@ -1,10 +1,9 @@
1
1
  #! /bin/sh
2
- # Wrapper for compilers which do not understand `-c -o'.
2
+ # Wrapper for compilers which do not understand '-c -o'.
3
3
 
4
- scriptversion=2009-10-06.20; # UTC
4
+ scriptversion=2012-10-14.11; # UTC
5
5
 
6
- # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
7
- # Foundation, Inc.
6
+ # Copyright (C) 1999-2014 Free Software Foundation, Inc.
8
7
  # Written by Tom Tromey <tromey@cygnus.com>.
9
8
  #
10
9
  # This program is free software; you can redistribute it and/or modify
@@ -29,21 +28,224 @@ scriptversion=2009-10-06.20; # UTC
29
28
  # bugs to <bug-automake@gnu.org> or send patches to
30
29
  # <automake-patches@gnu.org>.
31
30
 
31
+ nl='
32
+ '
33
+
34
+ # We need space, tab and new line, in precisely that order. Quoting is
35
+ # there to prevent tools from complaining about whitespace usage.
36
+ IFS=" "" $nl"
37
+
38
+ file_conv=
39
+
40
+ # func_file_conv build_file lazy
41
+ # Convert a $build file to $host form and store it in $file
42
+ # Currently only supports Windows hosts. If the determined conversion
43
+ # type is listed in (the comma separated) LAZY, no conversion will
44
+ # take place.
45
+ func_file_conv ()
46
+ {
47
+ file=$1
48
+ case $file in
49
+ / | /[!/]*) # absolute file, and not a UNC file
50
+ if test -z "$file_conv"; then
51
+ # lazily determine how to convert abs files
52
+ case `uname -s` in
53
+ MINGW*)
54
+ file_conv=mingw
55
+ ;;
56
+ CYGWIN*)
57
+ file_conv=cygwin
58
+ ;;
59
+ *)
60
+ file_conv=wine
61
+ ;;
62
+ esac
63
+ fi
64
+ case $file_conv/,$2, in
65
+ *,$file_conv,*)
66
+ ;;
67
+ mingw/*)
68
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
69
+ ;;
70
+ cygwin/*)
71
+ file=`cygpath -m "$file" || echo "$file"`
72
+ ;;
73
+ wine/*)
74
+ file=`winepath -w "$file" || echo "$file"`
75
+ ;;
76
+ esac
77
+ ;;
78
+ esac
79
+ }
80
+
81
+ # func_cl_dashL linkdir
82
+ # Make cl look for libraries in LINKDIR
83
+ func_cl_dashL ()
84
+ {
85
+ func_file_conv "$1"
86
+ if test -z "$lib_path"; then
87
+ lib_path=$file
88
+ else
89
+ lib_path="$lib_path;$file"
90
+ fi
91
+ linker_opts="$linker_opts -LIBPATH:$file"
92
+ }
93
+
94
+ # func_cl_dashl library
95
+ # Do a library search-path lookup for cl
96
+ func_cl_dashl ()
97
+ {
98
+ lib=$1
99
+ found=no
100
+ save_IFS=$IFS
101
+ IFS=';'
102
+ for dir in $lib_path $LIB
103
+ do
104
+ IFS=$save_IFS
105
+ if $shared && test -f "$dir/$lib.dll.lib"; then
106
+ found=yes
107
+ lib=$dir/$lib.dll.lib
108
+ break
109
+ fi
110
+ if test -f "$dir/$lib.lib"; then
111
+ found=yes
112
+ lib=$dir/$lib.lib
113
+ break
114
+ fi
115
+ if test -f "$dir/lib$lib.a"; then
116
+ found=yes
117
+ lib=$dir/lib$lib.a
118
+ break
119
+ fi
120
+ done
121
+ IFS=$save_IFS
122
+
123
+ if test "$found" != yes; then
124
+ lib=$lib.lib
125
+ fi
126
+ }
127
+
128
+ # func_cl_wrapper cl arg...
129
+ # Adjust compile command to suit cl
130
+ func_cl_wrapper ()
131
+ {
132
+ # Assume a capable shell
133
+ lib_path=
134
+ shared=:
135
+ linker_opts=
136
+ for arg
137
+ do
138
+ if test -n "$eat"; then
139
+ eat=
140
+ else
141
+ case $1 in
142
+ -o)
143
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
144
+ eat=1
145
+ case $2 in
146
+ *.o | *.[oO][bB][jJ])
147
+ func_file_conv "$2"
148
+ set x "$@" -Fo"$file"
149
+ shift
150
+ ;;
151
+ *)
152
+ func_file_conv "$2"
153
+ set x "$@" -Fe"$file"
154
+ shift
155
+ ;;
156
+ esac
157
+ ;;
158
+ -I)
159
+ eat=1
160
+ func_file_conv "$2" mingw
161
+ set x "$@" -I"$file"
162
+ shift
163
+ ;;
164
+ -I*)
165
+ func_file_conv "${1#-I}" mingw
166
+ set x "$@" -I"$file"
167
+ shift
168
+ ;;
169
+ -l)
170
+ eat=1
171
+ func_cl_dashl "$2"
172
+ set x "$@" "$lib"
173
+ shift
174
+ ;;
175
+ -l*)
176
+ func_cl_dashl "${1#-l}"
177
+ set x "$@" "$lib"
178
+ shift
179
+ ;;
180
+ -L)
181
+ eat=1
182
+ func_cl_dashL "$2"
183
+ ;;
184
+ -L*)
185
+ func_cl_dashL "${1#-L}"
186
+ ;;
187
+ -static)
188
+ shared=false
189
+ ;;
190
+ -Wl,*)
191
+ arg=${1#-Wl,}
192
+ save_ifs="$IFS"; IFS=','
193
+ for flag in $arg; do
194
+ IFS="$save_ifs"
195
+ linker_opts="$linker_opts $flag"
196
+ done
197
+ IFS="$save_ifs"
198
+ ;;
199
+ -Xlinker)
200
+ eat=1
201
+ linker_opts="$linker_opts $2"
202
+ ;;
203
+ -*)
204
+ set x "$@" "$1"
205
+ shift
206
+ ;;
207
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
208
+ func_file_conv "$1"
209
+ set x "$@" -Tp"$file"
210
+ shift
211
+ ;;
212
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
213
+ func_file_conv "$1" mingw
214
+ set x "$@" "$file"
215
+ shift
216
+ ;;
217
+ *)
218
+ set x "$@" "$1"
219
+ shift
220
+ ;;
221
+ esac
222
+ fi
223
+ shift
224
+ done
225
+ if test -n "$linker_opts"; then
226
+ linker_opts="-link$linker_opts"
227
+ fi
228
+ exec "$@" $linker_opts
229
+ exit 1
230
+ }
231
+
232
+ eat=
233
+
32
234
  case $1 in
33
235
  '')
34
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
236
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
35
237
  exit 1;
36
238
  ;;
37
239
  -h | --h*)
38
240
  cat <<\EOF
39
241
  Usage: compile [--help] [--version] PROGRAM [ARGS]
40
242
 
41
- Wrapper for compilers which do not understand `-c -o'.
42
- Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
243
+ Wrapper for compilers which do not understand '-c -o'.
244
+ Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
43
245
  arguments, and rename the output as expected.
44
246
 
45
247
  If you are trying to build a whole package this is not the
46
- right script to run: please start by reading the file `INSTALL'.
248
+ right script to run: please start by reading the file 'INSTALL'.
47
249
 
48
250
  Report bugs to <bug-automake@gnu.org>.
49
251
  EOF
@@ -53,11 +255,13 @@ EOF
53
255
  echo "compile $scriptversion"
54
256
  exit $?
55
257
  ;;
258
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
259
+ func_cl_wrapper "$@" # Doesn't return...
260
+ ;;
56
261
  esac
57
262
 
58
263
  ofile=
59
264
  cfile=
60
- eat=
61
265
 
62
266
  for arg
63
267
  do
@@ -66,8 +270,8 @@ do
66
270
  else
67
271
  case $1 in
68
272
  -o)
69
- # configure might choose to run compile as `compile cc -o foo foo.c'.
70
- # So we strip `-o arg' only if arg is an object.
273
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
274
+ # So we strip '-o arg' only if arg is an object.
71
275
  eat=1
72
276
  case $2 in
73
277
  *.o | *.obj)
@@ -94,10 +298,10 @@ do
94
298
  done
95
299
 
96
300
  if test -z "$ofile" || test -z "$cfile"; then
97
- # If no `-o' option was seen then we might have been invoked from a
301
+ # If no '-o' option was seen then we might have been invoked from a
98
302
  # pattern rule where we don't need one. That is ok -- this is a
99
303
  # normal compilation that the losing compiler can handle. If no
100
- # `.c' file was seen then we are probably linking. That is also
304
+ # '.c' file was seen then we are probably linking. That is also
101
305
  # ok.
102
306
  exec "$@"
103
307
  fi
@@ -106,7 +310,7 @@ fi
106
310
  cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
107
311
 
108
312
  # Create the lock directory.
109
- # Note: use `[/\\:.-]' here to ensure that we don't use the same name
313
+ # Note: use '[/\\:.-]' here to ensure that we don't use the same name
110
314
  # that we are using for the .o file. Also, base the name on the expected
111
315
  # object file name, since that is what matters with a parallel build.
112
316
  lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
@@ -1,14 +1,12 @@
1
1
  #! /bin/sh
2
2
  # Attempt to guess a canonical system name.
3
- # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
- # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
- # Free Software Foundation, Inc.
3
+ # Copyright 1992-2016 Free Software Foundation, Inc.
6
4
 
7
- timestamp='2009-11-20'
5
+ timestamp='2016-10-02'
8
6
 
9
7
  # This file is free software; you can redistribute it and/or modify it
10
8
  # under the terms of the GNU General Public License as published by
11
- # the Free Software Foundation; either version 2 of the License, or
9
+ # the Free Software Foundation; either version 3 of the License, or
12
10
  # (at your option) any later version.
13
11
  #
14
12
  # This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2009-11-20'
17
15
  # General Public License for more details.
18
16
  #
19
17
  # You should have received a copy of the GNU General Public License
20
- # along with this program; if not, write to the Free Software
21
- # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22
- # 02110-1301, USA.
18
+ # along with this program; if not, see <http://www.gnu.org/licenses/>.
23
19
  #
24
20
  # As a special exception to the GNU General Public License, if you
25
21
  # distribute this file as part of a program that contains a
26
22
  # configuration script generated by Autoconf, you may include it under
27
- # the same distribution terms that you use for the rest of that program.
28
-
29
-
30
- # Originally written by Per Bothner. Please send patches (context
31
- # diff format) to <config-patches@gnu.org> and include a ChangeLog
32
- # entry.
23
+ # the same distribution terms that you use for the rest of that
24
+ # program. This Exception is an additional permission under section 7
25
+ # of the GNU General Public License, version 3 ("GPLv3").
33
26
  #
34
- # This script attempts to guess a canonical system name similar to
35
- # config.sub. If it succeeds, it prints the system name on stdout, and
36
- # exits with 0. Otherwise, it exits with 1.
27
+ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
37
28
  #
38
29
  # 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
30
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31
+ #
32
+ # Please send patches to <config-patches@gnu.org>.
33
+
40
34
 
41
35
  me=`echo "$0" | sed -e 's,.*/,,'`
42
36
 
@@ -56,8 +50,7 @@ version="\
56
50
  GNU config.guess ($timestamp)
57
51
 
58
52
  Originally written by Per Bothner.
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.
53
+ Copyright 1992-2016 Free Software Foundation, Inc.
61
54
 
62
55
  This is free software; see the source for copying conditions. There is NO
63
56
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139
132
  UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140
133
  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
134
 
135
+ case "${UNAME_SYSTEM}" in
136
+ Linux|GNU|GNU/*)
137
+ # If the system lacks a compiler, then just pick glibc.
138
+ # We could probably try harder.
139
+ LIBC=gnu
140
+
141
+ eval $set_cc_for_build
142
+ cat <<-EOF > $dummy.c
143
+ #include <features.h>
144
+ #if defined(__UCLIBC__)
145
+ LIBC=uclibc
146
+ #elif defined(__dietlibc__)
147
+ LIBC=dietlibc
148
+ #else
149
+ LIBC=gnu
150
+ #endif
151
+ EOF
152
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
153
+ ;;
154
+ esac
155
+
142
156
  # Note: order is significant - the case branches are not exclusive.
143
157
 
144
158
  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145
159
  *:NetBSD:*:*)
146
160
  # NetBSD (nbsd) targets should (where applicable) match one or
147
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
161
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148
162
  # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149
163
  # switched to ELF, *-*-netbsd* would select the old
150
164
  # object file format. This provides both forward
@@ -154,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
154
168
  # Note: NetBSD doesn't particularly care about the vendor
155
169
  # portion of the name. We always set it to "unknown".
156
170
  sysctl="sysctl -n hw.machine_arch"
157
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
158
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
171
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
172
+ /sbin/$sysctl 2>/dev/null || \
173
+ /usr/sbin/$sysctl 2>/dev/null || \
174
+ echo unknown)`
159
175
  case "${UNAME_MACHINE_ARCH}" in
160
176
  armeb) machine=armeb-unknown ;;
161
177
  arm*) machine=arm-unknown ;;
162
178
  sh3el) machine=shl-unknown ;;
163
179
  sh3eb) machine=sh-unknown ;;
164
180
  sh5el) machine=sh5le-unknown ;;
181
+ earmv*)
182
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
183
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
184
+ machine=${arch}${endian}-unknown
185
+ ;;
165
186
  *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166
187
  esac
167
188
  # The Operating System including object format, if it has switched
168
- # to ELF recently, or will in the future.
189
+ # to ELF recently (or will in the future) and ABI.
169
190
  case "${UNAME_MACHINE_ARCH}" in
191
+ earm*)
192
+ os=netbsdelf
193
+ ;;
170
194
  arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171
195
  eval $set_cc_for_build
172
196
  if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -180,7 +204,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
180
204
  fi
181
205
  ;;
182
206
  *)
183
- os=netbsd
207
+ os=netbsd
208
+ ;;
209
+ esac
210
+ # Determine ABI tags.
211
+ case "${UNAME_MACHINE_ARCH}" in
212
+ earm*)
213
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
214
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
184
215
  ;;
185
216
  esac
186
217
  # The OS release
@@ -193,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
193
224
  release='-gnu'
194
225
  ;;
195
226
  *)
196
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
227
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
197
228
  ;;
198
229
  esac
199
230
  # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200
231
  # contains redundant information, the shorter form:
201
232
  # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202
- echo "${machine}-${os}${release}"
233
+ echo "${machine}-${os}${release}${abi}"
234
+ exit ;;
235
+ *:Bitrig:*:*)
236
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
237
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
203
238
  exit ;;
204
239
  *:OpenBSD:*:*)
205
240
  UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206
241
  echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207
242
  exit ;;
243
+ *:LibertyBSD:*:*)
244
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
245
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
246
+ exit ;;
208
247
  *:ekkoBSD:*:*)
209
248
  echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210
249
  exit ;;
@@ -217,13 +256,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
217
256
  *:MirBSD:*:*)
218
257
  echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
219
258
  exit ;;
259
+ *:Sortix:*:*)
260
+ echo ${UNAME_MACHINE}-unknown-sortix
261
+ exit ;;
220
262
  alpha:OSF1:*:*)
221
263
  case $UNAME_RELEASE in
222
264
  *4.0)
223
265
  UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224
266
  ;;
225
267
  *5.*)
226
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
268
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227
269
  ;;
228
270
  esac
229
271
  # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -233,43 +275,46 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
233
275
  ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234
276
  case "$ALPHA_CPU_TYPE" in
235
277
  "EV4 (21064)")
236
- UNAME_MACHINE="alpha" ;;
278
+ UNAME_MACHINE=alpha ;;
237
279
  "EV4.5 (21064)")
238
- UNAME_MACHINE="alpha" ;;
280
+ UNAME_MACHINE=alpha ;;
239
281
  "LCA4 (21066/21068)")
240
- UNAME_MACHINE="alpha" ;;
282
+ UNAME_MACHINE=alpha ;;
241
283
  "EV5 (21164)")
242
- UNAME_MACHINE="alphaev5" ;;
284
+ UNAME_MACHINE=alphaev5 ;;
243
285
  "EV5.6 (21164A)")
244
- UNAME_MACHINE="alphaev56" ;;
286
+ UNAME_MACHINE=alphaev56 ;;
245
287
  "EV5.6 (21164PC)")
246
- UNAME_MACHINE="alphapca56" ;;
288
+ UNAME_MACHINE=alphapca56 ;;
247
289
  "EV5.7 (21164PC)")
248
- UNAME_MACHINE="alphapca57" ;;
290
+ UNAME_MACHINE=alphapca57 ;;
249
291
  "EV6 (21264)")
250
- UNAME_MACHINE="alphaev6" ;;
292
+ UNAME_MACHINE=alphaev6 ;;
251
293
  "EV6.7 (21264A)")
252
- UNAME_MACHINE="alphaev67" ;;
294
+ UNAME_MACHINE=alphaev67 ;;
253
295
  "EV6.8CB (21264C)")
254
- UNAME_MACHINE="alphaev68" ;;
296
+ UNAME_MACHINE=alphaev68 ;;
255
297
  "EV6.8AL (21264B)")
256
- UNAME_MACHINE="alphaev68" ;;
298
+ UNAME_MACHINE=alphaev68 ;;
257
299
  "EV6.8CX (21264D)")
258
- UNAME_MACHINE="alphaev68" ;;
300
+ UNAME_MACHINE=alphaev68 ;;
259
301
  "EV6.9A (21264/EV69A)")
260
- UNAME_MACHINE="alphaev69" ;;
302
+ UNAME_MACHINE=alphaev69 ;;
261
303
  "EV7 (21364)")
262
- UNAME_MACHINE="alphaev7" ;;
304
+ UNAME_MACHINE=alphaev7 ;;
263
305
  "EV7.9 (21364A)")
264
- UNAME_MACHINE="alphaev79" ;;
306
+ UNAME_MACHINE=alphaev79 ;;
265
307
  esac
266
308
  # A Pn.n version is a patched version.
267
309
  # A Vn.n version is a released version.
268
310
  # A Tn.n version is a released field test version.
269
311
  # A Xn.n version is an unreleased experimental baselevel.
270
312
  # 1.2 uses "1.2" for uname -r.
271
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272
- exit ;;
313
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
314
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
315
+ exitcode=$?
316
+ trap '' 0
317
+ exit $exitcode ;;
273
318
  Alpha\ *:Windows_NT*:*)
274
319
  # How do we know it's Interix rather than the generic POSIX subsystem?
275
320
  # Should we change UNAME_MACHINE based on the output of uname instead
@@ -295,12 +340,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
295
340
  echo s390-ibm-zvmoe
296
341
  exit ;;
297
342
  *:OS400:*:*)
298
- echo powerpc-ibm-os400
343
+ echo powerpc-ibm-os400
299
344
  exit ;;
300
345
  arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301
346
  echo arm-acorn-riscix${UNAME_RELEASE}
302
347
  exit ;;
303
- arm:riscos:*:*|arm:RISCOS:*:*)
348
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
304
349
  echo arm-unknown-riscos
305
350
  exit ;;
306
351
  SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -338,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
338
383
  exit ;;
339
384
  i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
340
385
  eval $set_cc_for_build
341
- SUN_ARCH="i386"
386
+ SUN_ARCH=i386
342
387
  # If there is a compiler, see if it is configured for 64-bit objects.
343
388
  # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
344
389
  # This test works for both compilers.
345
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
390
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
346
391
  if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
347
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
392
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
348
393
  grep IS_64BIT_ARCH >/dev/null
349
394
  then
350
- SUN_ARCH="x86_64"
395
+ SUN_ARCH=x86_64
351
396
  fi
352
397
  fi
353
398
  echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -372,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
372
417
  exit ;;
373
418
  sun*:*:4.2BSD:*)
374
419
  UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
375
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
420
+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
376
421
  case "`/bin/arch`" in
377
422
  sun3)
378
423
  echo m68k-sun-sunos${UNAME_RELEASE}
@@ -394,23 +439,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
394
439
  # MiNT. But MiNT is downward compatible to TOS, so this should
395
440
  # be no problem.
396
441
  atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
397
- echo m68k-atari-mint${UNAME_RELEASE}
442
+ echo m68k-atari-mint${UNAME_RELEASE}
398
443
  exit ;;
399
444
  atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
400
445
  echo m68k-atari-mint${UNAME_RELEASE}
401
- exit ;;
446
+ exit ;;
402
447
  *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
403
- echo m68k-atari-mint${UNAME_RELEASE}
448
+ echo m68k-atari-mint${UNAME_RELEASE}
404
449
  exit ;;
405
450
  milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
406
- echo m68k-milan-mint${UNAME_RELEASE}
407
- exit ;;
451
+ echo m68k-milan-mint${UNAME_RELEASE}
452
+ exit ;;
408
453
  hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
409
- echo m68k-hades-mint${UNAME_RELEASE}
410
- exit ;;
454
+ echo m68k-hades-mint${UNAME_RELEASE}
455
+ exit ;;
411
456
  *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
412
- echo m68k-unknown-mint${UNAME_RELEASE}
413
- exit ;;
457
+ echo m68k-unknown-mint${UNAME_RELEASE}
458
+ exit ;;
414
459
  m68k:machten:*:*)
415
460
  echo m68k-apple-machten${UNAME_RELEASE}
416
461
  exit ;;
@@ -480,8 +525,8 @@ EOF
480
525
  echo m88k-motorola-sysv3
481
526
  exit ;;
482
527
  AViiON:dgux:*:*)
483
- # DG/UX returns AViiON for all architectures
484
- UNAME_PROCESSOR=`/usr/bin/uname -p`
528
+ # DG/UX returns AViiON for all architectures
529
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
485
530
  if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
486
531
  then
487
532
  if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -494,7 +539,7 @@ EOF
494
539
  else
495
540
  echo i586-dg-dgux${UNAME_RELEASE}
496
541
  fi
497
- exit ;;
542
+ exit ;;
498
543
  M88*:DolphinOS:*:*) # DolphinOS (SVR3)
499
544
  echo m88k-dolphin-sysv3
500
545
  exit ;;
@@ -551,15 +596,16 @@ EOF
551
596
  echo rs6000-ibm-aix3.2
552
597
  fi
553
598
  exit ;;
554
- *:AIX:*:[456])
599
+ *:AIX:*:[4567])
555
600
  IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
556
601
  if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
557
602
  IBM_ARCH=rs6000
558
603
  else
559
604
  IBM_ARCH=powerpc
560
605
  fi
561
- if [ -x /usr/bin/oslevel ] ; then
562
- IBM_REV=`/usr/bin/oslevel`
606
+ if [ -x /usr/bin/lslpp ] ; then
607
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
608
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
563
609
  else
564
610
  IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
565
611
  fi
@@ -594,58 +640,58 @@ EOF
594
640
  9000/[678][0-9][0-9])
595
641
  if [ -x /usr/bin/getconf ]; then
596
642
  sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
597
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
598
- case "${sc_cpu_version}" in
599
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
600
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
601
- 532) # CPU_PA_RISC2_0
602
- case "${sc_kernel_bits}" in
603
- 32) HP_ARCH="hppa2.0n" ;;
604
- 64) HP_ARCH="hppa2.0w" ;;
605
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
606
- esac ;;
607
- esac
643
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
644
+ case "${sc_cpu_version}" in
645
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
646
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
647
+ 532) # CPU_PA_RISC2_0
648
+ case "${sc_kernel_bits}" in
649
+ 32) HP_ARCH=hppa2.0n ;;
650
+ 64) HP_ARCH=hppa2.0w ;;
651
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
652
+ esac ;;
653
+ esac
608
654
  fi
609
655
  if [ "${HP_ARCH}" = "" ]; then
610
656
  eval $set_cc_for_build
611
- sed 's/^ //' << EOF >$dummy.c
657
+ sed 's/^ //' << EOF >$dummy.c
612
658
 
613
- #define _HPUX_SOURCE
614
- #include <stdlib.h>
615
- #include <unistd.h>
659
+ #define _HPUX_SOURCE
660
+ #include <stdlib.h>
661
+ #include <unistd.h>
616
662
 
617
- int main ()
618
- {
619
- #if defined(_SC_KERNEL_BITS)
620
- long bits = sysconf(_SC_KERNEL_BITS);
621
- #endif
622
- long cpu = sysconf (_SC_CPU_VERSION);
663
+ int main ()
664
+ {
665
+ #if defined(_SC_KERNEL_BITS)
666
+ long bits = sysconf(_SC_KERNEL_BITS);
667
+ #endif
668
+ long cpu = sysconf (_SC_CPU_VERSION);
623
669
 
624
- switch (cpu)
625
- {
626
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
627
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
628
- case CPU_PA_RISC2_0:
629
- #if defined(_SC_KERNEL_BITS)
630
- switch (bits)
631
- {
632
- case 64: puts ("hppa2.0w"); break;
633
- case 32: puts ("hppa2.0n"); break;
634
- default: puts ("hppa2.0"); break;
635
- } break;
636
- #else /* !defined(_SC_KERNEL_BITS) */
637
- puts ("hppa2.0"); break;
638
- #endif
639
- default: puts ("hppa1.0"); break;
640
- }
641
- exit (0);
642
- }
670
+ switch (cpu)
671
+ {
672
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
673
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
674
+ case CPU_PA_RISC2_0:
675
+ #if defined(_SC_KERNEL_BITS)
676
+ switch (bits)
677
+ {
678
+ case 64: puts ("hppa2.0w"); break;
679
+ case 32: puts ("hppa2.0n"); break;
680
+ default: puts ("hppa2.0"); break;
681
+ } break;
682
+ #else /* !defined(_SC_KERNEL_BITS) */
683
+ puts ("hppa2.0"); break;
684
+ #endif
685
+ default: puts ("hppa1.0"); break;
686
+ }
687
+ exit (0);
688
+ }
643
689
  EOF
644
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
690
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
645
691
  test -z "$HP_ARCH" && HP_ARCH=hppa
646
692
  fi ;;
647
693
  esac
648
- if [ ${HP_ARCH} = "hppa2.0w" ]
694
+ if [ ${HP_ARCH} = hppa2.0w ]
649
695
  then
650
696
  eval $set_cc_for_build
651
697
 
@@ -658,12 +704,12 @@ EOF
658
704
  # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
659
705
  # => hppa64-hp-hpux11.23
660
706
 
661
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
707
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
662
708
  grep -q __LP64__
663
709
  then
664
- HP_ARCH="hppa2.0w"
710
+ HP_ARCH=hppa2.0w
665
711
  else
666
- HP_ARCH="hppa64"
712
+ HP_ARCH=hppa64
667
713
  fi
668
714
  fi
669
715
  echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -730,22 +776,22 @@ EOF
730
776
  exit ;;
731
777
  C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
732
778
  echo c1-convex-bsd
733
- exit ;;
779
+ exit ;;
734
780
  C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
735
781
  if getsysinfo -f scalar_acc
736
782
  then echo c32-convex-bsd
737
783
  else echo c2-convex-bsd
738
784
  fi
739
- exit ;;
785
+ exit ;;
740
786
  C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
741
787
  echo c34-convex-bsd
742
- exit ;;
788
+ exit ;;
743
789
  C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
744
790
  echo c38-convex-bsd
745
- exit ;;
791
+ exit ;;
746
792
  C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
747
793
  echo c4-convex-bsd
748
- exit ;;
794
+ exit ;;
749
795
  CRAY*Y-MP:*:*:*)
750
796
  echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
751
797
  exit ;;
@@ -768,15 +814,15 @@ EOF
768
814
  echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
769
815
  exit ;;
770
816
  F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
771
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
772
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
773
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
774
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
775
- exit ;;
817
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
818
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
819
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
820
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
821
+ exit ;;
776
822
  5000:UNIX_System_V:4.*:*)
777
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
778
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
779
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
823
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
824
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
825
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
780
826
  exit ;;
781
827
  i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
782
828
  echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -788,30 +834,35 @@ EOF
788
834
  echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
789
835
  exit ;;
790
836
  *:FreeBSD:*:*)
791
- case ${UNAME_MACHINE} in
792
- pc98)
793
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
837
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
838
+ case ${UNAME_PROCESSOR} in
794
839
  amd64)
795
840
  echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
796
841
  *)
797
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
842
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798
843
  esac
799
844
  exit ;;
800
845
  i*:CYGWIN*:*)
801
846
  echo ${UNAME_MACHINE}-pc-cygwin
802
847
  exit ;;
848
+ *:MINGW64*:*)
849
+ echo ${UNAME_MACHINE}-pc-mingw64
850
+ exit ;;
803
851
  *:MINGW*:*)
804
852
  echo ${UNAME_MACHINE}-pc-mingw32
805
853
  exit ;;
854
+ *:MSYS*:*)
855
+ echo ${UNAME_MACHINE}-pc-msys
856
+ exit ;;
806
857
  i*:windows32*:*)
807
- # uname -m includes "-pc" on this system.
808
- echo ${UNAME_MACHINE}-mingw32
858
+ # uname -m includes "-pc" on this system.
859
+ echo ${UNAME_MACHINE}-mingw32
809
860
  exit ;;
810
861
  i*:PW*:*)
811
862
  echo ${UNAME_MACHINE}-pc-pw32
812
863
  exit ;;
813
864
  *:Interix*:*)
814
- case ${UNAME_MACHINE} in
865
+ case ${UNAME_MACHINE} in
815
866
  x86)
816
867
  echo i586-pc-interix${UNAME_RELEASE}
817
868
  exit ;;
@@ -848,15 +899,22 @@ EOF
848
899
  exit ;;
849
900
  *:GNU:*:*)
850
901
  # the GNU system
851
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
902
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
852
903
  exit ;;
853
904
  *:GNU/*:*:*)
854
905
  # other systems with GNU libc and userland
855
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
906
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
856
907
  exit ;;
857
908
  i*86:Minix:*:*)
858
909
  echo ${UNAME_MACHINE}-pc-minix
859
910
  exit ;;
911
+ aarch64:Linux:*:*)
912
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
913
+ exit ;;
914
+ aarch64_be:Linux:*:*)
915
+ UNAME_MACHINE=aarch64_be
916
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
917
+ exit ;;
860
918
  alpha:Linux:*:*)
861
919
  case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
862
920
  EV5) UNAME_MACHINE=alphaev5 ;;
@@ -866,52 +924,62 @@ EOF
866
924
  EV6) UNAME_MACHINE=alphaev6 ;;
867
925
  EV67) UNAME_MACHINE=alphaev67 ;;
868
926
  EV68*) UNAME_MACHINE=alphaev68 ;;
869
- esac
927
+ esac
870
928
  objdump --private-headers /bin/sh | grep -q ld.so.1
871
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
872
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
929
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
930
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
931
+ exit ;;
932
+ arc:Linux:*:* | arceb:Linux:*:*)
933
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
873
934
  exit ;;
874
935
  arm*:Linux:*:*)
875
936
  eval $set_cc_for_build
876
937
  if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
877
938
  | grep -q __ARM_EABI__
878
939
  then
879
- echo ${UNAME_MACHINE}-unknown-linux-gnu
940
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
880
941
  else
881
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
942
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
943
+ | grep -q __ARM_PCS_VFP
944
+ then
945
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
946
+ else
947
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
948
+ fi
882
949
  fi
883
950
  exit ;;
884
951
  avr32*:Linux:*:*)
885
- echo ${UNAME_MACHINE}-unknown-linux-gnu
952
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
886
953
  exit ;;
887
954
  cris:Linux:*:*)
888
- echo cris-axis-linux-gnu
955
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
889
956
  exit ;;
890
957
  crisv32:Linux:*:*)
891
- echo crisv32-axis-linux-gnu
958
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
959
+ exit ;;
960
+ e2k:Linux:*:*)
961
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
892
962
  exit ;;
893
963
  frv:Linux:*:*)
894
- echo frv-unknown-linux-gnu
964
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
965
+ exit ;;
966
+ hexagon:Linux:*:*)
967
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
895
968
  exit ;;
896
969
  i*86:Linux:*:*)
897
- LIBC=gnu
898
- eval $set_cc_for_build
899
- sed 's/^ //' << EOF >$dummy.c
900
- #ifdef __dietlibc__
901
- LIBC=dietlibc
902
- #endif
903
- EOF
904
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
905
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
970
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
906
971
  exit ;;
907
972
  ia64:Linux:*:*)
908
- echo ${UNAME_MACHINE}-unknown-linux-gnu
973
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
974
+ exit ;;
975
+ k1om:Linux:*:*)
976
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909
977
  exit ;;
910
978
  m32r*:Linux:*:*)
911
- echo ${UNAME_MACHINE}-unknown-linux-gnu
979
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
912
980
  exit ;;
913
981
  m68*:Linux:*:*)
914
- echo ${UNAME_MACHINE}-unknown-linux-gnu
982
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915
983
  exit ;;
916
984
  mips:Linux:*:* | mips64:Linux:*:*)
917
985
  eval $set_cc_for_build
@@ -930,51 +998,69 @@ EOF
930
998
  #endif
931
999
  EOF
932
1000
  eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
933
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
1001
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
934
1002
  ;;
935
- or32:Linux:*:*)
936
- echo or32-unknown-linux-gnu
1003
+ mips64el:Linux:*:*)
1004
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1005
+ exit ;;
1006
+ openrisc*:Linux:*:*)
1007
+ echo or1k-unknown-linux-${LIBC}
1008
+ exit ;;
1009
+ or32:Linux:*:* | or1k*:Linux:*:*)
1010
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937
1011
  exit ;;
938
1012
  padre:Linux:*:*)
939
- echo sparc-unknown-linux-gnu
1013
+ echo sparc-unknown-linux-${LIBC}
940
1014
  exit ;;
941
1015
  parisc64:Linux:*:* | hppa64:Linux:*:*)
942
- echo hppa64-unknown-linux-gnu
1016
+ echo hppa64-unknown-linux-${LIBC}
943
1017
  exit ;;
944
1018
  parisc:Linux:*:* | hppa:Linux:*:*)
945
1019
  # Look for CPU level
946
1020
  case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
947
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
948
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
949
- *) echo hppa-unknown-linux-gnu ;;
1021
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1022
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1023
+ *) echo hppa-unknown-linux-${LIBC} ;;
950
1024
  esac
951
1025
  exit ;;
952
1026
  ppc64:Linux:*:*)
953
- echo powerpc64-unknown-linux-gnu
1027
+ echo powerpc64-unknown-linux-${LIBC}
954
1028
  exit ;;
955
1029
  ppc:Linux:*:*)
956
- echo powerpc-unknown-linux-gnu
1030
+ echo powerpc-unknown-linux-${LIBC}
1031
+ exit ;;
1032
+ ppc64le:Linux:*:*)
1033
+ echo powerpc64le-unknown-linux-${LIBC}
1034
+ exit ;;
1035
+ ppcle:Linux:*:*)
1036
+ echo powerpcle-unknown-linux-${LIBC}
1037
+ exit ;;
1038
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
1039
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
957
1040
  exit ;;
958
1041
  s390:Linux:*:* | s390x:Linux:*:*)
959
- echo ${UNAME_MACHINE}-ibm-linux
1042
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
960
1043
  exit ;;
961
1044
  sh64*:Linux:*:*)
962
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1045
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
963
1046
  exit ;;
964
1047
  sh*:Linux:*:*)
965
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1048
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
966
1049
  exit ;;
967
1050
  sparc:Linux:*:* | sparc64:Linux:*:*)
968
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1051
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1052
+ exit ;;
1053
+ tile*:Linux:*:*)
1054
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
969
1055
  exit ;;
970
1056
  vax:Linux:*:*)
971
- echo ${UNAME_MACHINE}-dec-linux-gnu
1057
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
972
1058
  exit ;;
973
1059
  x86_64:Linux:*:*)
974
- echo x86_64-unknown-linux-gnu
1060
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
975
1061
  exit ;;
976
1062
  xtensa*:Linux:*:*)
977
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1063
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
978
1064
  exit ;;
979
1065
  i*86:DYNIX/ptx:4*:*)
980
1066
  # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -983,11 +1069,11 @@ EOF
983
1069
  echo i386-sequent-sysv4
984
1070
  exit ;;
985
1071
  i*86:UNIX_SV:4.2MP:2.*)
986
- # Unixware is an offshoot of SVR4, but it has its own version
987
- # number series starting with 2...
988
- # I am not positive that other SVR4 systems won't match this,
1072
+ # Unixware is an offshoot of SVR4, but it has its own version
1073
+ # number series starting with 2...
1074
+ # I am not positive that other SVR4 systems won't match this,
989
1075
  # I just have to hope. -- rms.
990
- # Use sysv4.2uw... so that sysv4* matches it.
1076
+ # Use sysv4.2uw... so that sysv4* matches it.
991
1077
  echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
992
1078
  exit ;;
993
1079
  i*86:OS/2:*:*)
@@ -1019,7 +1105,7 @@ EOF
1019
1105
  fi
1020
1106
  exit ;;
1021
1107
  i*86:*:5:[678]*)
1022
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
1108
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
1023
1109
  case `/bin/uname -X | grep "^Machine"` in
1024
1110
  *486*) UNAME_MACHINE=i486 ;;
1025
1111
  *Pentium) UNAME_MACHINE=i586 ;;
@@ -1047,13 +1133,13 @@ EOF
1047
1133
  exit ;;
1048
1134
  pc:*:*:*)
1049
1135
  # Left here for compatibility:
1050
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
1051
- # the processor, so we play safe by assuming i586.
1136
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
1137
+ # the processor, so we play safe by assuming i586.
1052
1138
  # Note: whatever this is, it MUST be the same as what config.sub
1053
- # prints for the "djgpp" host, or else GDB configury will decide that
1139
+ # prints for the "djgpp" host, or else GDB configure will decide that
1054
1140
  # this is a cross-build.
1055
1141
  echo i586-pc-msdosdjgpp
1056
- exit ;;
1142
+ exit ;;
1057
1143
  Intel:Mach:3*:*)
1058
1144
  echo i386-pc-mach3
1059
1145
  exit ;;
@@ -1088,8 +1174,8 @@ EOF
1088
1174
  /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1089
1175
  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1090
1176
  3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1091
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1092
- && { echo i486-ncr-sysv4; exit; } ;;
1177
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1178
+ && { echo i486-ncr-sysv4; exit; } ;;
1093
1179
  NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1094
1180
  OS_REL='.3'
1095
1181
  test -r /etc/.relid \
@@ -1132,10 +1218,10 @@ EOF
1132
1218
  echo ns32k-sni-sysv
1133
1219
  fi
1134
1220
  exit ;;
1135
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1136
- # says <Richard.M.Bartel@ccMail.Census.GOV>
1137
- echo i586-unisys-sysv4
1138
- exit ;;
1221
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1222
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
1223
+ echo i586-unisys-sysv4
1224
+ exit ;;
1139
1225
  *:UNIX_System_V:4*:FTX*)
1140
1226
  # From Gerald Hewes <hewes@openmarket.com>.
1141
1227
  # How about differentiating between stratus architectures? -djm
@@ -1161,11 +1247,11 @@ EOF
1161
1247
  exit ;;
1162
1248
  R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1163
1249
  if [ -d /usr/nec ]; then
1164
- echo mips-nec-sysv${UNAME_RELEASE}
1250
+ echo mips-nec-sysv${UNAME_RELEASE}
1165
1251
  else
1166
- echo mips-unknown-sysv${UNAME_RELEASE}
1252
+ echo mips-unknown-sysv${UNAME_RELEASE}
1167
1253
  fi
1168
- exit ;;
1254
+ exit ;;
1169
1255
  BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1170
1256
  echo powerpc-be-beos
1171
1257
  exit ;;
@@ -1178,6 +1264,9 @@ EOF
1178
1264
  BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1179
1265
  echo i586-pc-haiku
1180
1266
  exit ;;
1267
+ x86_64:Haiku:*:*)
1268
+ echo x86_64-unknown-haiku
1269
+ exit ;;
1181
1270
  SX-4:SUPER-UX:*:*)
1182
1271
  echo sx4-nec-superux${UNAME_RELEASE}
1183
1272
  exit ;;
@@ -1196,6 +1285,9 @@ EOF
1196
1285
  SX-8R:SUPER-UX:*:*)
1197
1286
  echo sx8r-nec-superux${UNAME_RELEASE}
1198
1287
  exit ;;
1288
+ SX-ACE:SUPER-UX:*:*)
1289
+ echo sxace-nec-superux${UNAME_RELEASE}
1290
+ exit ;;
1199
1291
  Power*:Rhapsody:*:*)
1200
1292
  echo powerpc-apple-rhapsody${UNAME_RELEASE}
1201
1293
  exit ;;
@@ -1204,24 +1296,36 @@ EOF
1204
1296
  exit ;;
1205
1297
  *:Darwin:*:*)
1206
1298
  UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1207
- case $UNAME_PROCESSOR in
1208
- i386)
1209
- eval $set_cc_for_build
1210
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1211
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1212
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1213
- grep IS_64BIT_ARCH >/dev/null
1214
- then
1215
- UNAME_PROCESSOR="x86_64"
1216
- fi
1217
- fi ;;
1218
- unknown) UNAME_PROCESSOR=powerpc ;;
1219
- esac
1299
+ eval $set_cc_for_build
1300
+ if test "$UNAME_PROCESSOR" = unknown ; then
1301
+ UNAME_PROCESSOR=powerpc
1302
+ fi
1303
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1304
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1305
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1306
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1307
+ grep IS_64BIT_ARCH >/dev/null
1308
+ then
1309
+ case $UNAME_PROCESSOR in
1310
+ i386) UNAME_PROCESSOR=x86_64 ;;
1311
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
1312
+ esac
1313
+ fi
1314
+ fi
1315
+ elif test "$UNAME_PROCESSOR" = i386 ; then
1316
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
1317
+ # that puts up a graphical alert prompting to install
1318
+ # developer tools. Any system running Mac OS X 10.7 or
1319
+ # later (Darwin 11 and later) is required to have a 64-bit
1320
+ # processor. This is not true of the ARM version of Darwin
1321
+ # that Apple uses in portable devices.
1322
+ UNAME_PROCESSOR=x86_64
1323
+ fi
1220
1324
  echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1221
1325
  exit ;;
1222
1326
  *:procnto*:*:* | *:QNX:[0123456789]*:*)
1223
1327
  UNAME_PROCESSOR=`uname -p`
1224
- if test "$UNAME_PROCESSOR" = "x86"; then
1328
+ if test "$UNAME_PROCESSOR" = x86; then
1225
1329
  UNAME_PROCESSOR=i386
1226
1330
  UNAME_MACHINE=pc
1227
1331
  fi
@@ -1230,7 +1334,10 @@ EOF
1230
1334
  *:QNX:*:4*)
1231
1335
  echo i386-pc-qnx
1232
1336
  exit ;;
1233
- NSE-?:NONSTOP_KERNEL:*:*)
1337
+ NEO-?:NONSTOP_KERNEL:*:*)
1338
+ echo neo-tandem-nsk${UNAME_RELEASE}
1339
+ exit ;;
1340
+ NSE-*:NONSTOP_KERNEL:*:*)
1234
1341
  echo nse-tandem-nsk${UNAME_RELEASE}
1235
1342
  exit ;;
1236
1343
  NSR-?:NONSTOP_KERNEL:*:*)
@@ -1249,7 +1356,7 @@ EOF
1249
1356
  # "uname -m" is not consistent, so use $cputype instead. 386
1250
1357
  # is converted to i386 for consistency with other x86
1251
1358
  # operating systems.
1252
- if test "$cputype" = "386"; then
1359
+ if test "$cputype" = 386; then
1253
1360
  UNAME_MACHINE=i386
1254
1361
  else
1255
1362
  UNAME_MACHINE="$cputype"
@@ -1275,13 +1382,13 @@ EOF
1275
1382
  echo pdp10-unknown-its
1276
1383
  exit ;;
1277
1384
  SEI:*:*:SEIUX)
1278
- echo mips-sei-seiux${UNAME_RELEASE}
1385
+ echo mips-sei-seiux${UNAME_RELEASE}
1279
1386
  exit ;;
1280
1387
  *:DragonFly:*:*)
1281
1388
  echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1282
1389
  exit ;;
1283
1390
  *:*VMS:*:*)
1284
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
1391
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
1285
1392
  case "${UNAME_MACHINE}" in
1286
1393
  A*) echo alpha-dec-vms ; exit ;;
1287
1394
  I*) echo ia64-dec-vms ; exit ;;
@@ -1291,7 +1398,7 @@ EOF
1291
1398
  echo i386-pc-xenix
1292
1399
  exit ;;
1293
1400
  i*86:skyos:*:*)
1294
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1401
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
1295
1402
  exit ;;
1296
1403
  i*86:rdos:*:*)
1297
1404
  echo ${UNAME_MACHINE}-pc-rdos
@@ -1299,174 +1406,28 @@ EOF
1299
1406
  i*86:AROS:*:*)
1300
1407
  echo ${UNAME_MACHINE}-pc-aros
1301
1408
  exit ;;
1302
- esac
1303
-
1304
- #echo '(No uname command or uname output not recognized.)' 1>&2
1305
- #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1306
-
1307
- eval $set_cc_for_build
1308
- cat >$dummy.c <<EOF
1309
- #ifdef _SEQUENT_
1310
- # include <sys/types.h>
1311
- # include <sys/utsname.h>
1312
- #endif
1313
- main ()
1314
- {
1315
- #if defined (sony)
1316
- #if defined (MIPSEB)
1317
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1318
- I don't know.... */
1319
- printf ("mips-sony-bsd\n"); exit (0);
1320
- #else
1321
- #include <sys/param.h>
1322
- printf ("m68k-sony-newsos%s\n",
1323
- #ifdef NEWSOS4
1324
- "4"
1325
- #else
1326
- ""
1327
- #endif
1328
- ); exit (0);
1329
- #endif
1330
- #endif
1331
-
1332
- #if defined (__arm) && defined (__acorn) && defined (__unix)
1333
- printf ("arm-acorn-riscix\n"); exit (0);
1334
- #endif
1335
-
1336
- #if defined (hp300) && !defined (hpux)
1337
- printf ("m68k-hp-bsd\n"); exit (0);
1338
- #endif
1339
-
1340
- #if defined (NeXT)
1341
- #if !defined (__ARCHITECTURE__)
1342
- #define __ARCHITECTURE__ "m68k"
1343
- #endif
1344
- int version;
1345
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1346
- if (version < 4)
1347
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1348
- else
1349
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1350
- exit (0);
1351
- #endif
1352
-
1353
- #if defined (MULTIMAX) || defined (n16)
1354
- #if defined (UMAXV)
1355
- printf ("ns32k-encore-sysv\n"); exit (0);
1356
- #else
1357
- #if defined (CMU)
1358
- printf ("ns32k-encore-mach\n"); exit (0);
1359
- #else
1360
- printf ("ns32k-encore-bsd\n"); exit (0);
1361
- #endif
1362
- #endif
1363
- #endif
1364
-
1365
- #if defined (__386BSD__)
1366
- printf ("i386-pc-bsd\n"); exit (0);
1367
- #endif
1368
-
1369
- #if defined (sequent)
1370
- #if defined (i386)
1371
- printf ("i386-sequent-dynix\n"); exit (0);
1372
- #endif
1373
- #if defined (ns32000)
1374
- printf ("ns32k-sequent-dynix\n"); exit (0);
1375
- #endif
1376
- #endif
1377
-
1378
- #if defined (_SEQUENT_)
1379
- struct utsname un;
1380
-
1381
- uname(&un);
1382
-
1383
- if (strncmp(un.version, "V2", 2) == 0) {
1384
- printf ("i386-sequent-ptx2\n"); exit (0);
1385
- }
1386
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1387
- printf ("i386-sequent-ptx1\n"); exit (0);
1388
- }
1389
- printf ("i386-sequent-ptx\n"); exit (0);
1390
-
1391
- #endif
1392
-
1393
- #if defined (vax)
1394
- # if !defined (ultrix)
1395
- # include <sys/param.h>
1396
- # if defined (BSD)
1397
- # if BSD == 43
1398
- printf ("vax-dec-bsd4.3\n"); exit (0);
1399
- # else
1400
- # if BSD == 199006
1401
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
1402
- # else
1403
- printf ("vax-dec-bsd\n"); exit (0);
1404
- # endif
1405
- # endif
1406
- # else
1407
- printf ("vax-dec-bsd\n"); exit (0);
1408
- # endif
1409
- # else
1410
- printf ("vax-dec-ultrix\n"); exit (0);
1411
- # endif
1412
- #endif
1413
-
1414
- #if defined (alliant) && defined (i860)
1415
- printf ("i860-alliant-bsd\n"); exit (0);
1416
- #endif
1417
-
1418
- exit (1);
1419
- }
1420
- EOF
1421
-
1422
- $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1423
- { echo "$SYSTEM_NAME"; exit; }
1424
-
1425
- # Apollos put the system type in the environment.
1426
-
1427
- test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1428
-
1429
- # Convex versions that predate uname can use getsysinfo(1)
1430
-
1431
- if [ -x /usr/convex/getsysinfo ]
1432
- then
1433
- case `getsysinfo -f cpu_type` in
1434
- c1*)
1435
- echo c1-convex-bsd
1436
- exit ;;
1437
- c2*)
1438
- if getsysinfo -f scalar_acc
1439
- then echo c32-convex-bsd
1440
- else echo c2-convex-bsd
1441
- fi
1442
- exit ;;
1443
- c34*)
1444
- echo c34-convex-bsd
1445
- exit ;;
1446
- c38*)
1447
- echo c38-convex-bsd
1409
+ x86_64:VMkernel:*:*)
1410
+ echo ${UNAME_MACHINE}-unknown-esx
1448
1411
  exit ;;
1449
- c4*)
1450
- echo c4-convex-bsd
1412
+ amd64:Isilon\ OneFS:*:*)
1413
+ echo x86_64-unknown-onefs
1451
1414
  exit ;;
1452
- esac
1453
- fi
1415
+ esac
1454
1416
 
1455
1417
  cat >&2 <<EOF
1456
1418
  $0: unable to guess system type
1457
1419
 
1458
- This script, last modified $timestamp, has failed to recognize
1459
- the operating system you are using. It is advised that you
1460
- download the most up to date version of the config scripts from
1420
+ This script (version $timestamp), has failed to recognize the
1421
+ operating system you are using. If your script is old, overwrite
1422
+ config.guess and config.sub with the latest versions from:
1461
1423
 
1462
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1424
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1463
1425
  and
1464
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1426
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1465
1427
 
1466
- If the version you run ($0) is already up to date, please
1467
- send the following data and any information you think might be
1468
- pertinent to <config-patches@gnu.org> in order to provide the needed
1469
- information to handle your system.
1428
+ If $0 has already been updated, send the following data and any
1429
+ information you think might be pertinent to config-patches@gnu.org to
1430
+ provide the necessary information to handle your system.
1470
1431
 
1471
1432
  config.guess timestamp = $timestamp
1472
1433