ffi 1.11.3 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile +2 -2
- data/README.md +10 -1
- data/ext/ffi_c/libffi/.travis.yml +28 -12
- data/ext/ffi_c/libffi/.travis/bfin-sim.exp +58 -0
- data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +14 -0
- data/ext/ffi_c/libffi/.travis/build-in-container.sh +2 -12
- data/ext/ffi_c/libffi/.travis/build.sh +58 -30
- data/ext/ffi_c/libffi/.travis/install.sh +65 -37
- data/ext/ffi_c/libffi/.travis/m32r-sim.exp +58 -0
- data/ext/ffi_c/libffi/.travis/or1k-sim.exp +58 -0
- data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +58 -0
- data/ext/ffi_c/libffi/.travis/site.exp +10 -1
- data/ext/ffi_c/libffi/.travis/wine-sim.exp +55 -0
- data/ext/ffi_c/libffi/{ChangeLog.libffi-3.1 → ChangeLog.old} +1407 -0
- data/ext/ffi_c/libffi/LICENSE +1 -1
- data/ext/ffi_c/libffi/Makefile.am +4 -3
- data/ext/ffi_c/libffi/README.md +12 -6
- data/ext/ffi_c/libffi/configure.ac +1 -1
- data/ext/ffi_c/libffi/configure.host +5 -2
- data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +1 -3
- data/ext/ffi_c/libffi/include/ffi.h.in +7 -7
- data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +2 -48
- data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +5 -26
- data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +5 -26
- data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +2 -1
- data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +5 -26
- data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +7 -3
- data/ext/ffi_c/libffi/src/closures.c +10 -2
- data/ext/ffi_c/libffi/src/mips/o32.S +2 -0
- data/ext/ffi_c/libffi/src/powerpc/ffi.c +3 -2
- data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +154 -8
- data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +18 -7
- data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +10 -4
- data/ext/ffi_c/libffi/src/powerpc/linux64.S +83 -28
- data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +67 -3
- data/ext/ffi_c/libffi/testsuite/Makefile.am +78 -75
- data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +1 -18
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +7 -2
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +12 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn0.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn1.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn2.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn3.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn4.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn5.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn6.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_loc_fn0.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_simple.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_12byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_16byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_18byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_19byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_1_1byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte1.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_24byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_2byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3_1byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte1.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte2.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3float.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4_1byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5_1_byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_64byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6_1_byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7_1_byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_8byte.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte1.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte2.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_double.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_float.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split2.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_pointer.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint16.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint32.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint64.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint16.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint32.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint64.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_dbls_struct.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double_va.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_float.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble_va.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_args.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_float_double.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_schar.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshort.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshortchar.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_uchar.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushort.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushortchar.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer_stack.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_schar.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sint.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sshort.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_struct_va1.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar_va.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint_va.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulong_va.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulonglong.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort_va.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/err_bad_abi.c +0 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +138 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/huge_struct.c +1 -1
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct1.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct10.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct11.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct2.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct3.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct4.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct5.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct6.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct7.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct8.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct9.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/problem1.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large2.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium2.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/testclosure.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest.cc +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest_ffi_call.cc +0 -0
- data/ffi.gemspec +2 -2
- data/lib/ffi/ffi.rb +1 -0
- data/lib/ffi/struct.rb +1 -1
- data/lib/ffi/version.rb +1 -1
- metadata +112 -108
- data/ext/ffi_c/libffi/ChangeLog.libffi +0 -584
- data/ext/ffi_c/libffi/ChangeLog.libgcj +0 -40
- data/ext/ffi_c/libffi/ChangeLog.v1 +0 -764
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db7a0bfedbb2f28debcc2cbeb36e5dc12dffb11871a0d7007f5f54c28451be27
|
4
|
+
data.tar.gz: b0b1eb568b60a18ccad29aee26855ba03ad3926b7b9d5aa4cc0711087f880bc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4db3e8840ad055fe18a40edc4bd957ab3039836785e7e23b6e996743c0fdde654aa4c660a955ce5b181082cda073fafefc4fa63a9356160ef9dcaf3bf82096f1
|
7
|
+
data.tar.gz: 3ef93d16905de1ffc06986e0fb39261b2d305b8e3ad08a7fc247d338b3d57bff499314e4b2e77adadaefcc1ddc67c16a6e0576e86e189f3136a6407255ca4da9
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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', '~>
|
4
|
+
gem 'rake', '~> 13.0'
|
5
5
|
gem 'rake-compiler', '~> 1.0.3'
|
6
|
-
gem 'rake-compiler-dock', '~>
|
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)
|
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:
|
13
|
-
env: HOST=
|
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
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
- os: linux
|
35
|
-
env: HOST=
|
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
|
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
|
+
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
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
|
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
|
-
|
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
|
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|