ffi 1.10.0 → 1.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{appveyor.yml → .appveyor.yml} +9 -1
- data/.github/workflows/ci.yml +64 -0
- data/.gitignore +3 -0
- data/.gitmodules +1 -0
- data/.travis.yml +35 -20
- data/CHANGELOG.md +124 -0
- data/Gemfile +6 -4
- data/README.md +29 -17
- data/Rakefile +29 -120
- data/ext/ffi_c/AbstractMemory.c +5 -9
- data/ext/ffi_c/Buffer.c +2 -2
- data/ext/ffi_c/Call.c +14 -41
- data/ext/ffi_c/Call.h +4 -7
- data/ext/ffi_c/ClosurePool.c +11 -14
- data/ext/ffi_c/DynamicLibrary.c +1 -1
- data/ext/ffi_c/Function.c +18 -117
- data/ext/ffi_c/FunctionInfo.c +1 -2
- data/ext/ffi_c/LongDouble.c +12 -10
- data/ext/ffi_c/LongDouble.h +0 -4
- data/ext/ffi_c/MemoryPointer.c +1 -1
- data/ext/ffi_c/MethodHandle.c +18 -24
- data/ext/ffi_c/MethodHandle.h +3 -2
- data/ext/ffi_c/Platform.c +1 -47
- data/ext/ffi_c/Pointer.c +1 -1
- data/ext/ffi_c/Struct.c +47 -51
- data/ext/ffi_c/Struct.h +12 -6
- data/ext/ffi_c/StructLayout.c +20 -14
- data/ext/ffi_c/Thread.c +4 -223
- data/ext/ffi_c/Thread.h +0 -14
- data/ext/ffi_c/Type.c +0 -18
- data/ext/ffi_c/Type.h +0 -1
- data/ext/ffi_c/Types.c +1 -1
- data/ext/ffi_c/Variadic.c +9 -15
- data/ext/ffi_c/compat.h +4 -0
- data/ext/ffi_c/extconf.rb +36 -26
- data/ext/ffi_c/ffi.c +3 -8
- data/ext/ffi_c/libffi.darwin.mk +1 -1
- data/ext/ffi_c/libffi/.appveyor.yml +29 -13
- data/ext/ffi_c/libffi/.gitattributes +4 -0
- data/ext/ffi_c/libffi/.travis.yml +51 -2
- 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 +12 -0
- data/ext/ffi_c/libffi/.travis/build.sh +116 -8
- data/ext/ffi_c/libffi/.travis/install.sh +65 -16
- 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/LICENSE-BUILDTOOLS +5 -4
- data/ext/ffi_c/libffi/Makefile.am +35 -41
- data/ext/ffi_c/libffi/README.md +29 -8
- data/ext/ffi_c/libffi/configure.ac +31 -11
- data/ext/ffi_c/libffi/configure.host +26 -9
- data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +1 -3
- data/ext/ffi_c/libffi/include/ffi.h.in +19 -7
- data/ext/ffi_c/libffi/include/ffi_common.h +5 -1
- data/ext/ffi_c/libffi/libffi.map.in +8 -12
- data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +2 -48
- data/ext/ffi_c/libffi/libtool-version +1 -1
- data/ext/ffi_c/libffi/m4/asmcfi.m4 +1 -1
- 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/make_sunver.pl +333 -0
- data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.sln +33 -0
- data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj +130 -0
- data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.filters +57 -0
- data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.user +4 -0
- data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +511 -0
- data/ext/ffi_c/libffi/msvcc.sh +27 -2
- data/ext/ffi_c/libffi/src/aarch64/ffi.c +132 -58
- data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +13 -2
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +21 -8
- data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +506 -0
- data/ext/ffi_c/libffi/src/arm/ffi.c +40 -5
- data/ext/ffi_c/libffi/src/arm/ffitarget.h +8 -1
- data/ext/ffi_c/libffi/src/arm/sysv.S +2 -0
- data/ext/ffi_c/libffi/src/arm/sysv_msvc_arm32.S +311 -0
- data/ext/ffi_c/libffi/src/closures.c +51 -13
- data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
- data/ext/ffi_c/libffi/src/metag/ffi.c +1 -1
- data/ext/ffi_c/libffi/src/mips/o32.S +2 -0
- data/ext/ffi_c/libffi/src/moxie/ffi.c +1 -1
- data/ext/ffi_c/libffi/src/pa/ffi.c +46 -91
- data/ext/ffi_c/libffi/src/pa/ffitarget.h +1 -6
- data/ext/ffi_c/libffi/src/pa/hpux32.S +4 -2
- data/ext/ffi_c/libffi/src/pa/linux.S +27 -4
- data/ext/ffi_c/libffi/src/powerpc/ffi.c +6 -4
- data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +211 -32
- 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 +68 -4
- data/ext/ffi_c/libffi/src/powerpc/sysv.S +5 -7
- data/ext/ffi_c/libffi/src/prep_cif.c +4 -2
- data/ext/ffi_c/libffi/src/riscv/ffi.c +42 -6
- data/ext/ffi_c/libffi/src/riscv/ffitarget.h +1 -0
- data/ext/ffi_c/libffi/src/riscv/sysv.S +86 -7
- data/ext/ffi_c/libffi/src/x86/ffi.c +21 -10
- data/ext/ffi_c/libffi/src/x86/ffi64.c +15 -11
- data/ext/ffi_c/libffi/src/x86/ffitarget.h +15 -2
- data/ext/ffi_c/libffi/src/x86/ffiw64.c +15 -10
- data/ext/ffi_c/libffi/src/x86/sysv.S +103 -8
- data/ext/ffi_c/libffi/src/x86/sysv_intel.S +995 -0
- data/ext/ffi_c/libffi/src/x86/unix64.S +99 -2
- data/ext/ffi_c/libffi/src/x86/win64.S +9 -1
- data/ext/ffi_c/libffi/testsuite/Makefile.am +114 -109
- data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +26 -22
- 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.call/float2.c +9 -8
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +1 -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/ext/ffi_c/rbffi.h +0 -2
- data/ffi.gemspec +12 -5
- data/lib/ffi.rb +10 -2
- data/lib/ffi/data_converter.rb +67 -0
- data/lib/ffi/ffi.rb +2 -0
- data/lib/ffi/library.rb +10 -6
- data/lib/ffi/platform.rb +12 -3
- data/lib/ffi/platform/aarch64-freebsd/types.conf +89 -89
- data/lib/ffi/platform/aarch64-freebsd12/types.conf +89 -89
- data/lib/ffi/platform/aarch64-linux/types.conf +81 -81
- data/lib/ffi/platform/arm-freebsd/types.conf +87 -87
- data/lib/ffi/platform/arm-freebsd12/types.conf +87 -87
- data/lib/ffi/platform/arm-linux/types.conf +110 -82
- data/lib/ffi/platform/i386-cygwin/types.conf +1 -1
- data/lib/ffi/platform/i386-darwin/types.conf +63 -63
- data/lib/ffi/platform/i386-freebsd/types.conf +87 -87
- data/lib/ffi/platform/i386-freebsd12/types.conf +87 -87
- data/lib/ffi/platform/i386-gnu/types.conf +84 -84
- data/lib/ffi/platform/i386-linux/types.conf +77 -77
- data/lib/ffi/platform/i386-netbsd/types.conf +87 -87
- data/lib/ffi/platform/i386-openbsd/types.conf +89 -89
- data/lib/ffi/platform/i386-solaris/types.conf +96 -96
- data/lib/ffi/platform/i386-windows/types.conf +43 -96
- data/lib/ffi/platform/ia64-linux/types.conf +79 -79
- data/lib/ffi/platform/mips-linux/types.conf +79 -79
- data/lib/ffi/platform/mips64-linux/types.conf +81 -81
- data/lib/ffi/platform/mips64el-linux/types.conf +81 -81
- data/lib/ffi/platform/mipsel-linux/types.conf +79 -79
- data/lib/ffi/platform/mipsisa32r6-linux/types.conf +79 -79
- data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +79 -79
- data/lib/ffi/platform/mipsisa64r6-linux/types.conf +81 -81
- data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +81 -81
- data/lib/ffi/platform/powerpc-aix/types.conf +155 -155
- data/lib/ffi/platform/powerpc-darwin/types.conf +63 -63
- data/lib/ffi/platform/powerpc-linux/types.conf +108 -78
- data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
- data/lib/ffi/platform/powerpc64-linux/types.conf +81 -81
- data/lib/ffi/platform/s390-linux/types.conf +79 -79
- data/lib/ffi/platform/s390x-linux/types.conf +79 -79
- data/lib/ffi/platform/sparc-linux/types.conf +79 -79
- data/lib/ffi/platform/sparc-solaris/types.conf +103 -103
- data/lib/ffi/platform/sparc64-linux/types.conf +79 -79
- data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
- data/lib/ffi/platform/sparcv9-solaris/types.conf +103 -103
- data/lib/ffi/platform/x86_64-cygwin/types.conf +1 -1
- data/lib/ffi/platform/x86_64-darwin/types.conf +88 -84
- data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
- data/lib/ffi/platform/x86_64-freebsd/types.conf +89 -89
- data/lib/ffi/platform/x86_64-freebsd12/types.conf +139 -109
- data/lib/ffi/platform/x86_64-linux/types.conf +107 -77
- data/lib/ffi/platform/x86_64-netbsd/types.conf +89 -89
- data/lib/ffi/platform/x86_64-openbsd/types.conf +86 -86
- data/lib/ffi/platform/x86_64-solaris/types.conf +96 -96
- data/lib/ffi/platform/x86_64-windows/types.conf +42 -110
- data/lib/ffi/pointer.rb +20 -13
- data/lib/ffi/struct.rb +13 -68
- data/lib/ffi/struct_by_reference.rb +72 -0
- data/lib/ffi/struct_layout.rb +96 -0
- data/lib/ffi/tools/const_generator.rb +5 -4
- data/lib/ffi/tools/generator.rb +47 -2
- data/lib/ffi/tools/generator_task.rb +13 -17
- data/lib/ffi/tools/struct_generator.rb +4 -4
- data/lib/ffi/tools/types_generator.rb +7 -4
- data/lib/ffi/types.rb +1 -1
- data/lib/ffi/version.rb +1 -1
- data/samples/getlogin.rb +1 -1
- data/samples/getpid.rb +1 -1
- data/samples/gettimeofday.rb +8 -8
- data/samples/hello.rb +2 -1
- data/samples/inotify.rb +1 -1
- data/samples/pty.rb +1 -2
- data/samples/qsort.rb +0 -1
- metadata +141 -116
- data/ext/ffi_c/DataConverter.c +0 -91
- data/ext/ffi_c/StructByReference.c +0 -190
- data/ext/ffi_c/StructByReference.h +0 -50
- 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
- data/samples/sample_helper.rb +0 -6
data/ext/ffi_c/Type.h
CHANGED
data/ext/ffi_c/Types.c
CHANGED
@@ -80,7 +80,7 @@ rbffi_NativeValue_ToRuby(Type* type, VALUE rbType, const void* ptr)
|
|
80
80
|
return rbffi_longdouble_new(*(long double *) ptr);
|
81
81
|
|
82
82
|
case NATIVE_STRING:
|
83
|
-
return (*(void **) ptr != NULL) ?
|
83
|
+
return (*(void **) ptr != NULL) ? rb_str_new2(*(char **) ptr) : Qnil;
|
84
84
|
case NATIVE_POINTER:
|
85
85
|
return rbffi_Pointer_NewInstance(*(void **) ptr);
|
86
86
|
case NATIVE_BOOL:
|
data/ext/ffi_c/Variadic.c
CHANGED
@@ -191,7 +191,7 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
191
191
|
|
192
192
|
for (i = 0; i < paramCount; ++i) {
|
193
193
|
VALUE rbType = rb_ary_entry(parameterTypes, i);
|
194
|
-
|
194
|
+
|
195
195
|
if (!rb_obj_is_kind_of(rbType, rbffi_TypeClass)) {
|
196
196
|
rb_raise(rb_eTypeError, "wrong type. Expected (FFI::Type)");
|
197
197
|
}
|
@@ -210,7 +210,7 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
210
210
|
rbType = rb_const_get(rbffi_TypeClass, rb_intern("UINT32"));
|
211
211
|
Data_Get_Struct(rbType, Type, paramTypes[i]);
|
212
212
|
break;
|
213
|
-
|
213
|
+
|
214
214
|
case NATIVE_FLOAT32:
|
215
215
|
rbType = rb_const_get(rbffi_TypeClass, rb_intern("DOUBLE"));
|
216
216
|
Data_Get_Struct(rbType, Type, paramTypes[i]);
|
@@ -219,8 +219,8 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
219
219
|
default:
|
220
220
|
break;
|
221
221
|
}
|
222
|
-
|
223
|
-
|
222
|
+
|
223
|
+
|
224
224
|
ffiParamTypes[i] = paramTypes[i]->ffiType;
|
225
225
|
if (ffiParamTypes[i] == NULL) {
|
226
226
|
rb_raise(rb_eArgError, "Invalid parameter type #%x", paramTypes[i]->nativeType);
|
@@ -254,13 +254,9 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
254
254
|
|
255
255
|
rbffi_SetupCallParams(paramCount, argv, -1, paramTypes, params,
|
256
256
|
ffiValues, NULL, 0, invoker->rbEnums);
|
257
|
-
|
257
|
+
|
258
258
|
rbffi_frame_push(&frame);
|
259
|
-
|
260
|
-
/* In Call.c, blocking: true is supported on older ruby variants
|
261
|
-
* without rb_thread_call_without_gvl by allocating on the heap instead
|
262
|
-
* of the stack. Since this functionality is being added later,
|
263
|
-
* we’re skipping support for old rubies here. */
|
259
|
+
|
264
260
|
if(unlikely(invoker->blocking)) {
|
265
261
|
rbffi_blocking_call_t* bc;
|
266
262
|
bc = ALLOCA_N(rbffi_blocking_call_t, 1);
|
@@ -275,13 +271,11 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
275
271
|
} else {
|
276
272
|
ffi_call(&cif, FFI_FN(invoker->function), retval, ffiValues);
|
277
273
|
}
|
278
|
-
|
279
|
-
ffi_call(&cif, FFI_FN(invoker->function), retval, ffiValues);
|
280
|
-
#endif
|
274
|
+
|
281
275
|
rbffi_frame_pop(&frame);
|
282
|
-
|
276
|
+
|
283
277
|
rbffi_save_errno();
|
284
|
-
|
278
|
+
|
285
279
|
if (RTEST(frame.exc) && frame.exc != Qnil) {
|
286
280
|
rb_exc_raise(frame.exc);
|
287
281
|
}
|
data/ext/ffi_c/compat.h
CHANGED
data/ext/ffi_c/extconf.rb
CHANGED
@@ -1,8 +1,31 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
if
|
3
|
+
if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
4
4
|
require 'mkmf'
|
5
5
|
require 'rbconfig'
|
6
|
+
|
7
|
+
def system_libffi_usable?
|
8
|
+
# We need pkg_config or ffi.h
|
9
|
+
libffi_ok = pkg_config("libffi") ||
|
10
|
+
have_header("ffi.h") ||
|
11
|
+
find_header("ffi.h", "/usr/local/include", "/usr/include/ffi",
|
12
|
+
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi",
|
13
|
+
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi") ||
|
14
|
+
(find_header("ffi.h", `xcrun --sdk macosx --show-sdk-path`.strip + "/usr/include/ffi") rescue false)
|
15
|
+
|
16
|
+
# Ensure we can link to ffi_prep_closure_loc
|
17
|
+
libffi_ok &&= have_library("ffi", "ffi_prep_closure_loc", [ "ffi.h" ]) ||
|
18
|
+
have_library("libffi", "ffi_prep_closure_loc", [ "ffi.h" ]) ||
|
19
|
+
have_library("libffi-8", "ffi_prep_closure_loc", [ "ffi.h" ])
|
20
|
+
|
21
|
+
if RbConfig::CONFIG['host_os'] =~ /mswin/
|
22
|
+
have_library('libffi_convenience')
|
23
|
+
have_library('shlwapi')
|
24
|
+
end
|
25
|
+
|
26
|
+
libffi_ok
|
27
|
+
end
|
28
|
+
|
6
29
|
dir_config("ffi_c")
|
7
30
|
|
8
31
|
# recent versions of ruby add restrictive ansi and warning flags on a whim - kill them all
|
@@ -12,42 +35,29 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
12
35
|
# solaris 10 needs -c99 for <stdbool.h>
|
13
36
|
$CFLAGS << " -std=c99" if RbConfig::CONFIG['host_os'] =~ /solaris(!?2\.11)/
|
14
37
|
|
15
|
-
|
16
|
-
|
17
|
-
find_header("ffi.h", "/usr/local/include", "/usr/include/ffi"))
|
38
|
+
# Check whether we use system libffi
|
39
|
+
system_libffi = enable_config('system-libffi', :try)
|
18
40
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
# Check if the raw api is available.
|
25
|
-
$defs << "-DHAVE_RAW_API" if have_func("ffi_raw_call") && have_func("ffi_prep_raw_closure")
|
41
|
+
if system_libffi == :try
|
42
|
+
system_libffi = ENV['RUBY_CC_VERSION'].nil? && system_libffi_usable?
|
43
|
+
elsif system_libffi
|
44
|
+
abort "system libffi is not usable" unless system_libffi_usable?
|
26
45
|
end
|
27
46
|
|
28
|
-
|
29
|
-
have_header('ruby/thread.h') # for compat with ruby < 2.0
|
30
|
-
have_func('rb_thread_blocking_region')
|
31
|
-
have_func('rb_thread_call_with_gvl')
|
32
|
-
have_func('rb_thread_call_without_gvl')
|
33
|
-
|
34
|
-
if libffi_ok
|
47
|
+
if system_libffi
|
35
48
|
have_func('ffi_prep_cif_var')
|
49
|
+
$defs << "-DHAVE_RAW_API" if have_func("ffi_raw_call") && have_func("ffi_prep_raw_closure")
|
36
50
|
else
|
37
51
|
$defs << "-DHAVE_FFI_PREP_CIF_VAR"
|
52
|
+
$defs << "-DUSE_INTERNAL_LIBFFI"
|
38
53
|
end
|
39
54
|
|
40
55
|
$defs << "-DHAVE_EXTCONF_H" if $defs.empty? # needed so create_header works
|
41
|
-
$defs << "-DUSE_INTERNAL_LIBFFI" unless libffi_ok
|
42
|
-
$defs << "-DRUBY_1_9" if RUBY_VERSION >= "1.9.0"
|
43
|
-
$defs << "-DFFI_BUILDING" if RbConfig::CONFIG['host_os'] =~ /mswin/ # for compatibility with newer libffi
|
44
56
|
|
45
57
|
create_header
|
46
|
-
|
47
|
-
$LOCAL_LIBS << " ./libffi/.libs/libffi_convenience.lib" if !libffi_ok && RbConfig::CONFIG['host_os'] =~ /mswin/
|
48
|
-
|
49
58
|
create_makefile("ffi_c")
|
50
|
-
|
59
|
+
|
60
|
+
unless system_libffi
|
51
61
|
File.open("Makefile", "a") do |mf|
|
52
62
|
mf.puts "LIBFFI_HOST=--host=#{RbConfig::CONFIG['host_alias']}" if RbConfig::CONFIG.has_key?("host_alias")
|
53
63
|
if RbConfig::CONFIG['host_os'].downcase =~ /darwin/
|
@@ -63,7 +73,7 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
63
73
|
end
|
64
74
|
end
|
65
75
|
end
|
66
|
-
|
76
|
+
|
67
77
|
else
|
68
78
|
File.open("Makefile", "w") do |mf|
|
69
79
|
mf.puts "# Dummy makefile for non-mri rubies"
|
data/ext/ffi_c/ffi.c
CHANGED
@@ -40,7 +40,6 @@
|
|
40
40
|
#include "MemoryPointer.h"
|
41
41
|
#include "Struct.h"
|
42
42
|
#include "StructByValue.h"
|
43
|
-
#include "StructByReference.h"
|
44
43
|
#include "DynamicLibrary.h"
|
45
44
|
#include "Platform.h"
|
46
45
|
#include "Types.h"
|
@@ -59,9 +58,9 @@ VALUE rbffi_FFIModule = Qnil;
|
|
59
58
|
static VALUE moduleFFI = Qnil;
|
60
59
|
|
61
60
|
void
|
62
|
-
Init_ffi_c(void)
|
61
|
+
Init_ffi_c(void)
|
63
62
|
{
|
64
|
-
/*
|
63
|
+
/*
|
65
64
|
* Document-module: FFI
|
66
65
|
*
|
67
66
|
* This module embbed type constants from {FFI::NativeType}.
|
@@ -70,12 +69,10 @@ Init_ffi_c(void)
|
|
70
69
|
rb_global_variable(&rbffi_FFIModule);
|
71
70
|
|
72
71
|
rbffi_Thread_Init(rbffi_FFIModule);
|
73
|
-
|
72
|
+
|
74
73
|
/* FFI::Type needs to be initialized before most other classes */
|
75
74
|
rbffi_Type_Init(moduleFFI);
|
76
75
|
|
77
|
-
rbffi_DataConverter_Init(moduleFFI);
|
78
|
-
|
79
76
|
rbffi_ArrayType_Init(moduleFFI);
|
80
77
|
rbffi_LastError_Init(moduleFFI);
|
81
78
|
rbffi_Call_Init(moduleFFI);
|
@@ -88,11 +85,9 @@ Init_ffi_c(void)
|
|
88
85
|
rbffi_MemoryPointer_Init(moduleFFI);
|
89
86
|
rbffi_Buffer_Init(moduleFFI);
|
90
87
|
rbffi_StructByValue_Init(moduleFFI);
|
91
|
-
rbffi_StructByReference_Init(moduleFFI);
|
92
88
|
rbffi_Struct_Init(moduleFFI);
|
93
89
|
rbffi_DynamicLibrary_Init(moduleFFI);
|
94
90
|
rbffi_Variadic_Init(moduleFFI);
|
95
91
|
rbffi_Types_Init(moduleFFI);
|
96
92
|
rbffi_MappedType_Init(moduleFFI);
|
97
93
|
}
|
98
|
-
|
data/ext/ffi_c/libffi.darwin.mk
CHANGED
@@ -58,7 +58,7 @@ build_ffi = \
|
|
58
58
|
env CC="$(CCACHE) $(CC)" CFLAGS="-arch $(1) $(LIBFFI_CFLAGS)" LDFLAGS="-arch $(1)" \
|
59
59
|
$(LIBFFI_CONFIGURE) --host=$(1)-apple-darwin > /dev/null; \
|
60
60
|
fi); \
|
61
|
-
|
61
|
+
$(MAKE) -C "$(BUILD_DIR)"/libffi-$(1)
|
62
62
|
|
63
63
|
target_ffi = "$(BUILD_DIR)"/libffi-$(1)/.libs/libffi_convenience.a:; $(call build_ffi,$(1))
|
64
64
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
shallow_clone: true
|
2
2
|
|
3
|
-
# We're currently only testing
|
3
|
+
# We're currently only testing libffi built with Microsoft's
|
4
4
|
# tools.
|
5
5
|
# This matrix should be expanded to include at least:
|
6
6
|
# 32- and 64-bit gcc/cygwin
|
@@ -8,9 +8,12 @@ shallow_clone: true
|
|
8
8
|
# 32- and 64-bit clang/mingw
|
9
9
|
# and perhaps more.
|
10
10
|
|
11
|
-
image: Visual Studio
|
11
|
+
image: Visual Studio 2017
|
12
12
|
platform:
|
13
13
|
- x64
|
14
|
+
- x86
|
15
|
+
- arm
|
16
|
+
- arm64
|
14
17
|
|
15
18
|
environment:
|
16
19
|
global:
|
@@ -18,33 +21,46 @@ environment:
|
|
18
21
|
CYG_CACHE: C:/cygwin/var/cache/setup
|
19
22
|
CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
|
20
23
|
matrix:
|
21
|
-
- VSVER:
|
24
|
+
- VSVER: 15
|
22
25
|
|
23
26
|
install:
|
24
27
|
- ps: >-
|
25
28
|
If ($env:Platform -Match "x86") {
|
26
29
|
$env:VCVARS_PLATFORM="x86"
|
27
|
-
$env:BUILD="
|
28
|
-
$env:HOST="
|
30
|
+
$env:BUILD="i686-pc-cygwin"
|
31
|
+
$env:HOST="i686-pc-cygwin"
|
32
|
+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh"
|
33
|
+
$env:SRC_ARCHITECTURE="x86"
|
34
|
+
} ElseIf ($env:Platform -Match "arm64") {
|
35
|
+
$env:VCVARS_PLATFORM="x86_arm64"
|
36
|
+
$env:BUILD="i686-pc-cygwin"
|
37
|
+
$env:HOST="aarch64-w64-cygwin"
|
38
|
+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm64"
|
39
|
+
$env:SRC_ARCHITECTURE="aarch64"
|
40
|
+
} ElseIf ($env:Platform -Match "arm") {
|
41
|
+
$env:VCVARS_PLATFORM="x86_arm"
|
42
|
+
$env:BUILD="i686-pc-cygwin"
|
43
|
+
$env:HOST="arm-w32-cygwin"
|
44
|
+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm"
|
45
|
+
$env:SRC_ARCHITECTURE="arm"
|
29
46
|
} Else {
|
30
47
|
$env:VCVARS_PLATFORM="amd64"
|
31
48
|
$env:BUILD="x86_64-w64-cygwin"
|
32
49
|
$env:HOST="x86_64-w64-cygwin"
|
50
|
+
$env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -m64"
|
51
|
+
$env:SRC_ARCHITECTURE="x86"
|
33
52
|
}
|
34
53
|
- 'appveyor DownloadFile https://cygwin.com/setup-x86.exe -FileName setup.exe'
|
35
54
|
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu >NUL'
|
36
55
|
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
|
56
|
+
- echo call VsDevCmd to set VS150COMNTOOLS
|
57
|
+
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
|
37
58
|
- ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
|
38
59
|
- echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
|
39
|
-
- call "%VSCOMNTOOLS
|
60
|
+
- call "%VSCOMNTOOLS%..\..\vc\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%
|
40
61
|
|
41
62
|
build_script:
|
42
63
|
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh;)"
|
43
|
-
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='
|
44
|
-
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src
|
64
|
+
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='%MSVCC%' CXX='%MSVCC%' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST;)"
|
65
|
+
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include; make; find .;)"
|
45
66
|
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/; make check; cat `find ./ -name libffi.log`)"
|
46
|
-
|
47
|
-
# FIXME: "make check" currently fails. It just looks like msvcc needs
|
48
|
-
# to learn about -L and -l options. If you add "make check; cat `find
|
49
|
-
# ./ -name libffi.log" to the end of that build command you'll see
|
50
|
-
# what I mean.
|
@@ -3,10 +3,58 @@ sudo: required
|
|
3
3
|
|
4
4
|
language: cpp
|
5
5
|
|
6
|
+
# For qemu-powered targets, get the list of supported processors from
|
7
|
+
# travis by setting QEMU_CPU=help, then set -mcpu= for the compilers
|
8
|
+
# accordingly.
|
9
|
+
|
6
10
|
matrix:
|
7
11
|
include:
|
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
|
8
23
|
- os: osx
|
9
|
-
env: HOST=
|
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"
|
27
|
+
- os: linux
|
28
|
+
env: HOST=sh4-linux-gnu CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/sh4-linux-gnu
|
29
|
+
- os: linux
|
30
|
+
env: HOST=alpha-linux-gnu CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/alpha-linux-gnu
|
31
|
+
- os: linux
|
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
|
33
|
+
- os: linux
|
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
|
42
|
+
- os: linux
|
43
|
+
arch: arm64
|
44
|
+
env: HOST=aarch64-linux-gnu
|
45
|
+
compiler: clang
|
46
|
+
- os: linux
|
47
|
+
env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O0"
|
48
|
+
- os: linux
|
49
|
+
env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2"
|
50
|
+
- os: linux
|
51
|
+
env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2 -fomit-frame-pointer"
|
52
|
+
# The sparc64 linux system in the GCC compile farm is non-responsive.
|
53
|
+
# - os: linux
|
54
|
+
# env: HOST=sparc64-linux-gnu
|
55
|
+
# The mips64 linux system in the GCC compile farm is not allowing logins
|
56
|
+
# - os: linux
|
57
|
+
# env: HOST=mips64el-linux-gnu
|
10
58
|
- os: linux
|
11
59
|
compiler: gcc
|
12
60
|
env: HOST=i386-pc-linux-gnu MEVAL='export CC="$CC -m32" && CXX="$CXX -m32"'
|
@@ -27,8 +75,9 @@ before_install:
|
|
27
75
|
- if test x"$MEVAL" != x; then eval ${MEVAL}; fi
|
28
76
|
|
29
77
|
install:
|
30
|
-
- ./.travis/install.sh
|
78
|
+
- travis_wait 30 ./.travis/install.sh
|
31
79
|
|
32
80
|
script:
|
33
81
|
- if ! test x"$MEVAL" = x; then eval ${MEVAL}; fi
|
82
|
+
- travis_wait 115 sleep infinity &
|
34
83
|
- ./.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
|
+
|