ffi 1.11.3 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -0
  3. data/CHANGELOG.md +14 -0
  4. data/Gemfile +2 -2
  5. data/README.md +10 -1
  6. data/ext/ffi_c/libffi/.travis.yml +28 -12
  7. data/ext/ffi_c/libffi/.travis/bfin-sim.exp +58 -0
  8. data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +14 -0
  9. data/ext/ffi_c/libffi/.travis/build-in-container.sh +2 -12
  10. data/ext/ffi_c/libffi/.travis/build.sh +58 -30
  11. data/ext/ffi_c/libffi/.travis/install.sh +65 -37
  12. data/ext/ffi_c/libffi/.travis/m32r-sim.exp +58 -0
  13. data/ext/ffi_c/libffi/.travis/or1k-sim.exp +58 -0
  14. data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +58 -0
  15. data/ext/ffi_c/libffi/.travis/site.exp +10 -1
  16. data/ext/ffi_c/libffi/.travis/wine-sim.exp +55 -0
  17. data/ext/ffi_c/libffi/{ChangeLog.libffi-3.1 → ChangeLog.old} +1407 -0
  18. data/ext/ffi_c/libffi/LICENSE +1 -1
  19. data/ext/ffi_c/libffi/Makefile.am +4 -3
  20. data/ext/ffi_c/libffi/README.md +12 -6
  21. data/ext/ffi_c/libffi/configure.ac +1 -1
  22. data/ext/ffi_c/libffi/configure.host +5 -2
  23. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +1 -3
  24. data/ext/ffi_c/libffi/include/ffi.h.in +7 -7
  25. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +2 -48
  26. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +5 -26
  27. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +5 -26
  28. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +2 -1
  29. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +5 -26
  30. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +7 -3
  31. data/ext/ffi_c/libffi/src/closures.c +10 -2
  32. data/ext/ffi_c/libffi/src/mips/o32.S +2 -0
  33. data/ext/ffi_c/libffi/src/powerpc/ffi.c +3 -2
  34. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +154 -8
  35. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +18 -7
  36. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +10 -4
  37. data/ext/ffi_c/libffi/src/powerpc/linux64.S +83 -28
  38. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +67 -3
  39. data/ext/ffi_c/libffi/testsuite/Makefile.am +78 -75
  40. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +1 -18
  41. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +7 -2
  42. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1 -1
  43. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +1 -1
  44. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +12 -1
  45. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
  46. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn0.c +0 -0
  47. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn1.c +0 -0
  48. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn2.c +0 -0
  49. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn3.c +0 -0
  50. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn4.c +0 -0
  51. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn5.c +0 -0
  52. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn6.c +0 -0
  53. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_loc_fn0.c +0 -0
  54. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_simple.c +0 -0
  55. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_12byte.c +0 -0
  56. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_16byte.c +0 -0
  57. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_18byte.c +0 -0
  58. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_19byte.c +0 -0
  59. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_1_1byte.c +0 -0
  60. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte.c +0 -0
  61. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte1.c +0 -0
  62. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_24byte.c +0 -0
  63. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_2byte.c +0 -0
  64. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3_1byte.c +0 -0
  65. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte1.c +0 -0
  66. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte2.c +0 -0
  67. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3float.c +0 -0
  68. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4_1byte.c +0 -0
  69. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4byte.c +0 -0
  70. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5_1_byte.c +0 -0
  71. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5byte.c +0 -0
  72. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_64byte.c +0 -0
  73. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6_1_byte.c +0 -0
  74. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6byte.c +0 -0
  75. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7_1_byte.c +0 -0
  76. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7byte.c +0 -0
  77. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_8byte.c +0 -0
  78. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte1.c +0 -0
  79. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte2.c +0 -0
  80. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_double.c +0 -0
  81. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_float.c +0 -0
  82. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble.c +0 -0
  83. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split.c +0 -0
  84. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split2.c +0 -0
  85. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_pointer.c +0 -0
  86. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint16.c +0 -0
  87. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint32.c +0 -0
  88. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint64.c +0 -0
  89. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint16.c +0 -0
  90. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint32.c +0 -0
  91. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint64.c +0 -0
  92. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_dbls_struct.c +0 -0
  93. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double.c +0 -0
  94. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double_va.c +0 -0
  95. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_float.c +0 -0
  96. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble.c +0 -0
  97. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble_va.c +0 -0
  98. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_args.c +0 -0
  99. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_float_double.c +0 -0
  100. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_schar.c +0 -0
  101. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshort.c +0 -0
  102. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshortchar.c +0 -0
  103. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_uchar.c +0 -0
  104. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushort.c +0 -0
  105. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushortchar.c +0 -0
  106. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer.c +0 -0
  107. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer_stack.c +0 -0
  108. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_schar.c +0 -0
  109. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sint.c +0 -0
  110. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sshort.c +0 -0
  111. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_struct_va1.c +0 -0
  112. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar.c +0 -0
  113. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar_va.c +0 -0
  114. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint.c +0 -0
  115. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint_va.c +0 -0
  116. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulong_va.c +0 -0
  117. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulonglong.c +0 -0
  118. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort.c +0 -0
  119. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort_va.c +0 -0
  120. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/err_bad_abi.c +0 -0
  121. data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +138 -0
  122. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/huge_struct.c +1 -1
  123. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct.c +0 -0
  124. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct1.c +0 -0
  125. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct10.c +0 -0
  126. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct11.c +0 -0
  127. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct2.c +0 -0
  128. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct3.c +0 -0
  129. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct4.c +0 -0
  130. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct5.c +0 -0
  131. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct6.c +0 -0
  132. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct7.c +0 -0
  133. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct8.c +0 -0
  134. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct9.c +0 -0
  135. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/problem1.c +0 -0
  136. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large.c +0 -0
  137. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large2.c +0 -0
  138. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium.c +0 -0
  139. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium2.c +0 -0
  140. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/testclosure.c +0 -0
  141. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest.cc +0 -0
  142. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest_ffi_call.cc +0 -0
  143. data/ffi.gemspec +2 -2
  144. data/lib/ffi/ffi.rb +1 -0
  145. data/lib/ffi/struct.rb +1 -1
  146. data/lib/ffi/version.rb +1 -1
  147. metadata +112 -108
  148. data/ext/ffi_c/libffi/ChangeLog.libffi +0 -584
  149. data/ext/ffi_c/libffi/ChangeLog.libgcj +0 -40
  150. data/ext/ffi_c/libffi/ChangeLog.v1 +0 -764
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 644662e700692019ada112b10a164622c08978bbe2aecfeb38205a43df099e28
4
- data.tar.gz: 8699b821c2200c62c49c4265d5ce8b67862f53d71e1a2862b41ed5f44eedad87
3
+ metadata.gz: db7a0bfedbb2f28debcc2cbeb36e5dc12dffb11871a0d7007f5f54c28451be27
4
+ data.tar.gz: b0b1eb568b60a18ccad29aee26855ba03ad3926b7b9d5aa4cc0711087f880bc8
5
5
  SHA512:
6
- metadata.gz: 6aee46baf520f91e112a1fdcd40218f51f100b50f56d126a94982d341f38919f3f550831db1c9da569d8457c2b50707654681b06ae6cae48ac4597d927b0569d
7
- data.tar.gz: c728916db8dad5ec04403ab9cead139b870f56d3e0a34f0b08ec467f9a153c1f29d2f9ad2e30bb3056476a4dd3d42edebfdfbd9f88477f9e08862601cb3277a0
6
+ metadata.gz: 4db3e8840ad055fe18a40edc4bd957ab3039836785e7e23b6e996743c0fdde654aa4c660a955ce5b181082cda073fafefc4fa63a9356160ef9dcaf3bf82096f1
7
+ data.tar.gz: 3ef93d16905de1ffc06986e0fb39261b2d305b8e3ad08a7fc247d338b3d57bff499314e4b2e77adadaefcc1ddc67c16a6e0576e86e189f3136a6407255ca4da9
@@ -23,6 +23,8 @@ matrix:
23
23
  allow_failures:
24
24
  - os: osx
25
25
  rvm: ruby-head
26
+ - os: osx
27
+ rvm: 2.3.8
26
28
  include:
27
29
  - name: powerpc
28
30
  language: generic
@@ -1,3 +1,17 @@
1
+ 1.12.0 / 2020-01-14
2
+ -------------------
3
+
4
+ Added:
5
+ * FFI::VERSION is defined as part of `require 'ffi'` now.
6
+ It is no longer necessary to `require 'ffi/version'` .
7
+
8
+ Changed:
9
+ * Update libffi to latest master.
10
+
11
+ Deprecated:
12
+ * Overwriting struct layouts is now warned and will be disallowed in ffi-2.0. #734, #735
13
+
14
+
1
15
  1.11.3 / 2019-11-25
2
16
  -------------------
3
17
 
data/Gemfile CHANGED
@@ -1,9 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development do
4
- gem 'rake', '~> 12.1'
4
+ gem 'rake', '~> 13.0'
5
5
  gem 'rake-compiler', '~> 1.0.3'
6
- gem 'rake-compiler-dock', '~> 0.7.0'
6
+ gem 'rake-compiler-dock', '~> 1.0'
7
7
  gem 'rspec', '~> 3.0'
8
8
  gem 'rubygems-tasks', '~> 0.2.4', :require => 'rubygems/tasks'
9
9
  gem "rubysl", "~> 2.0", :platforms => 'rbx'
data/README.md CHANGED
@@ -38,10 +38,19 @@ For less minimalistic and more examples you may look at:
38
38
 
39
39
  ## Requirements
40
40
 
41
- When installing the gem on CRuby (MRI) or Rubinius, you will need:
41
+ When installing the gem on CRuby (MRI), you will need:
42
42
  * A C compiler (e.g., Xcode on macOS, `gcc` or `clang` on everything else)
43
+ Optionally (speeds up installation):
43
44
  * The `libffi` library and development headers - this is commonly in the `libffi-dev` or `libffi-devel` packages
44
45
 
46
+ The ffi gem comes with a builtin libffi version, which is used, when the system libffi library is not available or too old.
47
+ Use of the system libffi can be enforced by:
48
+ ```
49
+ gem install ffi -- --enable-system-libffi # to install the gem manually
50
+ bundle config build.ffi --enable-system-libffi # for bundle install
51
+ ```
52
+ or prevented by `--disable-system-libffi`.
53
+
45
54
  On Linux systems running with [PaX](https://en.wikipedia.org/wiki/PaX) (Gentoo, Alpine, etc.), FFI may trigger `mprotect` errors. You may need to disable [mprotect](https://en.wikibooks.org/wiki/Grsecurity/Appendix/Grsecurity_and_PaX_Configuration_Options#Restrict_mprotect.28.29) for ruby (`paxctl -m [/path/to/ruby]`) for the time being until a solution is found.
46
55
 
47
56
  On FreeBSD systems pkgconf must be installed for the gem to be able to compile using clang. Install either via packages `pkg install pkgconf` or from ports via `devel/pkgconf`.
@@ -9,10 +9,21 @@ language: cpp
9
9
 
10
10
  matrix:
11
11
  include:
12
- - os: osx
13
- env: HOST=aarch64-apple-darwin13
12
+ - os: linux
13
+ env: HOST=powerpc-eabisim RUNTESTFLAGS="--target_board powerpc-eabisim" DEJAGNU="/opt/.travis/site.exp"
14
+ - os: linux
15
+ env: HOST=or1k-elf RUNTESTFLAGS="--target_board or1k-sim" DEJAGNU="/opt/.travis/site.exp"
16
+ - os: linux
17
+ env: HOST=m32r-elf RUNTESTFLAGS="--target_board m32r-sim" DEJAGNU="/opt/.travis/site.exp"
18
+ - os: linux
19
+ env: HOST=bfin-elf RUNTESTFLAGS="--target_board bfin-sim" DEJAGNU="/opt/.travis/site.exp"
20
+ # This configuration is still using the native x86 toolchain?
21
+ # - os: osx
22
+ # env: HOST=aarch64-apple-darwin13
14
23
  - os: osx
15
24
  env: HOST=x86_64-apple-darwin10
25
+ - os: linux
26
+ env: HOST=x86_64-w64-mingw32 MEVAL='export CC="x86_64-w64-mingw32-gcc" && CXX="x86_64-w64-mingw32-g++" RUNTESTFLAGS="--target_board wine-sim" DEJAGNU="$TRAVIS_BUILD_DIR/.travis/site.exp" CONFIGURE_OPTIONS=--disable-shared LIBFFI_TEST_OPTIMIZATION="-O2"
16
27
  - os: linux
17
28
  env: HOST=sh4-linux-gnu CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/sh4-linux-gnu
18
29
  - os: linux
@@ -20,21 +31,26 @@ matrix:
20
31
  - os: linux
21
32
  env: HOST=m68k-linux-gnu MEVAL='export CC="m68k-linux-gnu-gcc-8 -mcpu=547x" && CXX="m68k-linux-gnu-g++-8 -mcpu=547x"' CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/m68k-linux-gnu QEMU_CPU=cfv4e
22
33
  - os: linux
23
- env: HOST=s390x-linux-gnu MEVAL='export CC="s390x-linux-gnu-gcc-8" && CXX="s390x-linux-gnu-g++-8"' CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/s390x-linux-gnu QEMU_CPU=max
34
+ arch: s390x
35
+ env: HOST=s390x-linux-gnu
36
+ - os: linux
37
+ arch: ppc64le
38
+ env: HOST=ppc64le-linux-gnu
39
+ - os: linux
40
+ arch: arm64
41
+ env: HOST=aarch64-linux-gnu
24
42
  - os: linux
25
43
  env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O0"
26
44
  - os: linux
27
45
  env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2"
28
46
  - os: linux
29
47
  env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2 -fomit-frame-pointer"
30
- - os: linux
31
- env: HOST=sparc64-linux-gnu
32
- - os: linux
33
- env: HOST=aarch64-linux-gnu
34
- - os: linux
35
- env: HOST=powerpc64le-unknown-linux-gnu
36
- - os: linux
37
- env: HOST=mips64el-linux-gnu
48
+ # The sparc64 linux system in the GCC compile farm is non-responsive.
49
+ # - os: linux
50
+ # env: HOST=sparc64-linux-gnu
51
+ # The mips64 linux system in the GCC compile farm is not allowing logins
52
+ # - os: linux
53
+ # env: HOST=mips64el-linux-gnu
38
54
  - os: linux
39
55
  compiler: gcc
40
56
  env: HOST=i386-pc-linux-gnu MEVAL='export CC="$CC -m32" && CXX="$CXX -m32"'
@@ -59,5 +75,5 @@ install:
59
75
 
60
76
  script:
61
77
  - if ! test x"$MEVAL" = x; then eval ${MEVAL}; fi
62
- - travis_wait 45 sleep infinity &
78
+ - travis_wait 115 sleep infinity &
63
79
  - ./.travis/build.sh
@@ -0,0 +1,58 @@
1
+ # Copyright (C) 2010, 2019 Free Software Foundation, Inc.
2
+ #
3
+ # This file is part of DejaGnu.
4
+ #
5
+ # DejaGnu is free software; you can redistribute it and/or modify it
6
+ # under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation; either version 2 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # DejaGnu is distributed in the hope that it will be useful, but
11
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with DejaGnu; if not, write to the Free Software Foundation,
17
+ # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
+
19
+ # This is a list of toolchains that are supported on this board.
20
+ set_board_info target_install {bfin-elf}
21
+
22
+ # Load the generic configuration for this board. This will define a basic set
23
+ # of routines needed by the tool to communicate with the board.
24
+ load_generic_config "sim"
25
+
26
+ # basic-sim.exp is a basic description for the standard Cygnus simulator.
27
+ load_base_board_description "basic-sim"
28
+
29
+ # "bfin" is the name of the sim subdir in devo/sim.
30
+ setup_sim bfin
31
+
32
+ # No multilib options needed by default.
33
+ process_multilib_options ""
34
+
35
+ # We only support newlib on this target. We assume that all multilib
36
+ # options have been specified before we get here.
37
+
38
+ set_board_info compiler "[find_gcc]"
39
+ set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
40
+ set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
41
+
42
+ # Configuration settings for testsuites
43
+ set_board_info noargs 1
44
+ set_board_info gdb,nosignals 1
45
+ set_board_info gdb,noresults 1
46
+ set_board_info gdb,cannot_call_functions 1
47
+ set_board_info gdb,skip_float_tests 1
48
+ set_board_info gdb,can_reverse 1
49
+ set_board_info gdb,use_precord 1
50
+
51
+ # More time is needed
52
+ set_board_info gcc,timeout 800
53
+ set_board_info gdb,timeout 60
54
+
55
+ # Used by a few gcc.c-torture testcases to delimit how large the stack can
56
+ # be.
57
+ set_board_info gcc,stack_size 5000
58
+
@@ -0,0 +1,14 @@
1
+ #!/bin/bash
2
+
3
+ cd /opt
4
+
5
+ echo $PATH
6
+ export PATH=/usr/local/bin:$PATH
7
+ echo $PATH
8
+
9
+ ./configure --host=${HOST} || cat */config.log
10
+ make
11
+ make dist
12
+ make check RUNTESTFLAGS="-a $RUNTESTFLAGS" || true
13
+
14
+
@@ -7,16 +7,6 @@ export QEMU_LD_PREFIX=/usr/${HOST}
7
7
  ./configure ${HOST+--host=$HOST --disable-shared}
8
8
  make
9
9
  make dist
10
- make check RUNTESTFLAGS="-a $RUNTESTFLAGS"
11
- EXITCODE=$?
12
- gzip -c -9 */testsuite/libffi.log > libffi.log.gz
13
- echo ================================================================
14
- echo The logs are too long for travis to handle, so we compress and
15
- echo uuencode them. Download, decode and uncompress if you need to
16
- echo read them.
17
- echo ================================================================
18
- uuencode libffi.log.gz -
19
- echo ================================================================
20
- echo ================================================================
21
- exit $EXITCODE
10
+ make check RUNTESTFLAGS="-a $RUNTESTFLAGS" || true
11
+
22
12
 
@@ -8,54 +8,65 @@ else
8
8
  export SET_QEMU_CPU="-e QEMU_CPU=${QEMU_CPU}"
9
9
  fi
10
10
 
11
- # Default to podman where available, docker otherwise.
12
- # Override by setting the DOCKER environment variable.
13
- if test -z "$DOCKER"; then
14
- which podman > /dev/null 2>&1
15
- if [ $? != 0 ]; then
16
- export DOCKER=docker
17
- else
18
- export DOCKER=podman
19
- fi
20
- fi
11
+ export DOCKER=docker
21
12
 
22
13
  function build_cfarm()
23
14
  {
24
- curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT}
15
+ curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT} | tee build.log
16
+ echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
17
+ echo $(tail build.log | grep '^==LOGFILE==')
18
+ echo $(tail build.log | grep '^==LOGFILE==' | cut -b13-)
19
+ echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
20
+ curl -u ${CFARM_AUTH} "$(tail build.log | grep '^==LOGFILE==' | cut -b13-)" > libffi.log
21
+
22
+ ./rlgl l --key=${RLGL_KEY} https://rl.gl
23
+ ID=$(./rlgl start)
24
+ ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git libffi.log
25
+ exit $?
25
26
  }
26
27
 
27
28
  function build_linux()
28
29
  {
29
30
  ./autogen.sh
30
- ./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS}
31
+ ./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS} || cat */config.log
31
32
  make
32
33
  make dist
33
34
  make check RUNTESTFLAGS="-a $RUNTESTFLAGS"
34
- EXITCODE=$?
35
-
36
- gzip -c -9 */testsuite/libffi.log > libffi.log.gz
37
- echo ================================================================
38
- echo The logs are too long for travis to handle, so we compress and
39
- echo uuencode them. Download, decode and uncompress if you need to
40
- echo read them. For example, if you select and save this text
41
- echo as libffi.uu, run: 'cat libffi.uu | uudecode | gzip -d | less'.
42
- echo ================================================================
43
- uuencode libffi.log.gz -
44
- echo ================================================================
45
- echo ================================================================
46
-
47
- exit $EXITCODE
35
+
36
+ ./rlgl l --key=${RLGL_KEY} https://rl.gl
37
+ ID=$(./rlgl start)
38
+ ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
39
+ exit $?
48
40
  }
49
41
 
50
42
  function build_foreign_linux()
51
43
  {
52
- ${DOCKER} run --rm -t -i -v `pwd`:/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh
44
+ ${DOCKER} run --rm -t -i -v $(pwd):/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh
45
+
46
+ ./rlgl l --key=${RLGL_KEY} https://rl.gl
47
+ ID=$(./rlgl start)
48
+ ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
53
49
  exit $?
54
50
  }
55
51
 
56
52
  function build_cross_linux()
57
53
  {
58
- ${DOCKER} run --rm -t -i -v `pwd`:/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -e CXX="${HOST}-g++-8 ${GCC_OPTIONS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" moxielogic/cross-ci-build-container:latest bash -c /opt/.travis/build-in-container.sh
54
+ ${DOCKER} run --rm -t -i -v $(pwd):/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -e CXX="${HOST}-g++-8 ${GCC_OPTIONS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" moxielogic/cross-ci-build-container:latest bash -c /opt/.travis/build-in-container.sh
55
+
56
+ ./rlgl l --key=${RLGL_KEY} https://rl.gl
57
+ ID=$(./rlgl start)
58
+ ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
59
+ exit $?
60
+ }
61
+
62
+ function build_cross()
63
+ {
64
+ ${DOCKER} pull quay.io/moxielogic/libffi-ci-${HOST}
65
+ ${DOCKER} run --rm -t -i -v $(pwd):/opt -e HOST="${HOST}" -e CC="${HOST}-gcc ${GCC_OPTIONS}" -e CXX="${HOST}-g++ ${GCC_OPTIONS}" -e TRAVIS_BUILD_DIR=/opt -e DEJAGNU="${DEJAGNU}" -e RUNTESTFLAGS="${RUNTESTFLAGS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/libffi-ci-${HOST} bash -c /opt/.travis/build-cross-in-container.sh
66
+
67
+ ./rlgl l --key=${RLGL_KEY} https://rl.gl
68
+ ID=$(./rlgl start)
69
+ ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
59
70
  exit $?
60
71
  }
61
72
 
@@ -76,6 +87,7 @@ function build_macosx()
76
87
  ./generate-darwin-source-and-headers.py --only-osx
77
88
  xcodebuild -showsdks
78
89
  xcodebuild -project libffi.xcodeproj -target "libffi-Mac" -configuration Release -sdk macosx10.13
90
+ echo "Finished build"
79
91
  exit $?
80
92
  }
81
93
 
@@ -92,14 +104,30 @@ case "$HOST" in
92
104
  ./autogen.sh
93
105
  build_foreign_linux arm moxielogic/arm32v7-ci-build-container:latest
94
106
  ;;
95
- aarch64-linux-gnu| powerpc64le-unknown-linux-gnu | mips64el-linux-gnu | sparc64-linux-gnu)
107
+ mips64el-linux-gnu | sparc64-linux-gnu)
96
108
  build_cfarm
97
109
  ;;
110
+ bfin-elf )
111
+ ./autogen.sh
112
+ GCC_OPTIONS=-msim build_cross
113
+ ;;
114
+ m32r-elf )
115
+ ./autogen.sh
116
+ build_cross
117
+ ;;
118
+ or1k-elf )
119
+ ./autogen.sh
120
+ build_cross
121
+ ;;
122
+ powerpc-eabisim )
123
+ ./autogen.sh
124
+ build_cross
125
+ ;;
98
126
  m68k-linux-gnu )
99
127
  ./autogen.sh
100
128
  GCC_OPTIONS=-mcpu=547x build_cross_linux
101
129
  ;;
102
- alpha-linux-gnu | sh4-linux-gnu | s390x-linux-gnu )
130
+ alpha-linux-gnu | sh4-linux-gnu )
103
131
  ./autogen.sh
104
132
  build_cross_linux
105
133
  ;;
@@ -2,42 +2,70 @@
2
2
  set -x
3
3
 
4
4
  if [[ $TRAVIS_OS_NAME != 'linux' ]]; then
5
- brew update > brew-update.log 2>&1
6
- # fix an issue with libtool on travis by reinstalling it
7
- brew uninstall libtool;
8
- brew install libtool dejagnu;
5
+ brew update > brew-update.log 2>&1
6
+ # fix an issue with libtool on travis by reinstalling it
7
+ brew uninstall libtool;
8
+ brew install libtool dejagnu;
9
+
10
+ # Download and extract the rlgl client
11
+ wget -qO - https://rl.gl/cli/rlgl-darwin-amd64.tgz | \
12
+ tar --strip-components=2 -xvzf - ./rlgl/rlgl;
13
+
9
14
  else
10
- sudo apt-get clean # clear the cache
11
- sudo apt-get update
12
- case $HOST in
13
- aarch64-linux-gnu | powerpc64le-unknown-linux-gnu | mips64el-linux-gnu | sparc64-linux-gnu)
14
- ;;
15
- alpha-linux-gnu | arm32v7-linux-gnu | m68k-linux-gnu | sh4-linux-gnu | s390x-linux-gnu )
16
- sudo apt-get install qemu-user-static
17
- ;;
18
- hppa-linux-gnu )
19
- sudo apt-get install -y qemu-user-static g++-5-hppa-linux-gnu
20
- ;;
21
- i386-pc-linux-gnu)
22
- sudo apt-get install gcc-multilib g++-multilib;
23
- ;;
24
- moxie-elf)
25
- echo 'deb https://repos.moxielogic.org:7114/MoxieLogic moxiedev main' | sudo tee -a /etc/apt/sources.list
26
- sudo apt-get clean # clear the cache
27
- sudo apt-get update ## -qq
28
- sudo apt-get update
29
- sudo apt-get install -y --allow-unauthenticated moxielogic-moxie-elf-gcc moxielogic-moxie-elf-gcc-c++ moxielogic-moxie-elf-gcc-libstdc++ moxielogic-moxie-elf-gdb-sim
30
- ;;
31
- i686-w64-mingw32)
32
- sudo apt-get install gcc-mingw-w64-i686 binutils-mingw-w64-i686 wine;
33
- ;;
34
- esac
35
- case $HOST in
36
- arm32v7-linux-gnu | aarch64-linux-gnu | ppc64le-linux-gnu | s390x-linux-gnu)
37
- # don't install host tools
38
- ;;
39
- *)
40
- sudo apt-get install dejagnu texinfo sharutils
41
- ;;
42
- esac
15
+ # Download and extract the rlgl client
16
+ case $HOST in
17
+ aarch64-linux-gnu)
18
+ wget -qO - https://rl.gl/cli/rlgl-linux-arm.tgz | \
19
+ tar --strip-components=2 -xvzf - ./rlgl/rlgl;
20
+ ;;
21
+ ppc64le-linux-gnu)
22
+ wget -qO - https://rl.gl/cli/rlgl-linux-ppc64le.tgz | \
23
+ tar --strip-components=2 -xvzf - ./rlgl/rlgl;
24
+ ;;
25
+ s390x-linux-gnu)
26
+ wget -qO - https://rl.gl/cli/rlgl-linux-s390x.tgz | \
27
+ tar --strip-components=2 -xvzf - ./rlgl/rlgl;
28
+ ;;
29
+ *)
30
+ wget -qO - https://rl.gl/cli/rlgl-linux-amd64.tgz | \
31
+ tar --strip-components=2 -xvzf - ./rlgl/rlgl;
32
+ ;;
33
+ esac
34
+
35
+ sudo apt-get clean # clear the cache
36
+ sudo apt-get update
37
+ case $HOST in
38
+ mips64el-linux-gnu | sparc64-linux-gnu)
39
+ ;;
40
+ alpha-linux-gnu | arm32v7-linux-gnu | m68k-linux-gnu | sh4-linux-gnu)
41
+ sudo apt-get install qemu-user-static
42
+ ;;
43
+ hppa-linux-gnu )
44
+ sudo apt-get install -y qemu-user-static g++-5-hppa-linux-gnu
45
+ ;;
46
+ i386-pc-linux-gnu)
47
+ sudo apt-get install gcc-multilib g++-multilib;
48
+ ;;
49
+ moxie-elf)
50
+ echo 'deb https://repos.moxielogic.org:7114/MoxieLogic moxiedev main' | sudo tee -a /etc/apt/sources.list
51
+ sudo apt-get clean # clear the cache
52
+ sudo apt-get update ## -qq
53
+ sudo apt-get update
54
+ sudo apt-get install -y --allow-unauthenticated moxielogic-moxie-elf-gcc moxielogic-moxie-elf-gcc-c++ moxielogic-moxie-elf-gcc-libstdc++ moxielogic-moxie-elf-gdb-sim
55
+ ;;
56
+ x86_64-w64-mingw32)
57
+ sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wine;
58
+ ;;
59
+ i686-w32-mingw32)
60
+ sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 wine;
61
+ ;;
62
+ esac
63
+ case $HOST in
64
+ arm32v7-linux-gnu)
65
+ # don't install host tools
66
+ ;;
67
+ *)
68
+ sudo apt-get install dejagnu texinfo sharutils
69
+ ;;
70
+ esac
43
71
  fi