ffi 1.11.3 → 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 +3 -0
- data/.github/workflows/ci.yml +64 -0
- data/.travis.yml +21 -5
- data/CHANGELOG.md +68 -0
- data/Gemfile +6 -4
- data/README.md +10 -1
- data/Rakefile +24 -43
- data/ext/ffi_c/Buffer.c +2 -2
- data/ext/ffi_c/Call.c +1 -7
- data/ext/ffi_c/ClosurePool.c +11 -14
- data/ext/ffi_c/Function.c +8 -23
- data/ext/ffi_c/FunctionInfo.c +1 -2
- data/ext/ffi_c/LongDouble.c +5 -3
- 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 -0
- 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 +0 -3
- data/ext/ffi_c/Thread.h +0 -3
- data/ext/ffi_c/compat.h +4 -0
- data/ext/ffi_c/extconf.rb +16 -20
- data/ext/ffi_c/libffi/.travis.yml +32 -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 +62 -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 +6 -4
- data/ext/ffi_c/libffi/README.md +18 -6
- data/ext/ffi_c/libffi/configure.ac +26 -10
- 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 +15 -7
- 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/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/aarch64/ffi.c +6 -0
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +13 -2
- data/ext/ffi_c/libffi/src/closures.c +20 -6
- data/ext/ffi_c/libffi/src/mips/o32.S +2 -0
- 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 +4 -2
- 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/src/powerpc/sysv.S +5 -7
- data/ext/ffi_c/libffi/src/x86/ffi.c +7 -4
- data/ext/ffi_c/libffi/src/x86/ffi64.c +10 -8
- data/ext/ffi_c/libffi/src/x86/ffitarget.h +15 -2
- data/ext/ffi_c/libffi/src/x86/ffiw64.c +10 -8
- data/ext/ffi_c/libffi/src/x86/sysv.S +13 -4
- data/ext/ffi_c/libffi/src/x86/unix64.S +58 -2
- data/ext/ffi_c/libffi/src/x86/win64.S +4 -1
- 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 +3 -3
- data/lib/ffi.rb +10 -2
- data/lib/ffi/ffi.rb +1 -0
- data/lib/ffi/library.rb +5 -1
- data/lib/ffi/platform.rb +6 -2
- data/lib/ffi/platform/arm-linux/types.conf +32 -4
- data/lib/ffi/platform/i386-windows/types.conf +26 -79
- data/lib/ffi/platform/powerpc-linux/types.conf +32 -2
- data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
- data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
- data/lib/ffi/platform/x86_64-darwin/types.conf +4 -0
- data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +4 -22
- data/lib/ffi/platform/x86_64-linux/types.conf +21 -0
- data/lib/ffi/platform/x86_64-windows/types.conf +10 -78
- data/lib/ffi/pointer.rb +19 -12
- data/lib/ffi/struct.rb +10 -5
- data/lib/ffi/tools/types_generator.rb +2 -0
- 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 +116 -110
- 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/Struct.h
CHANGED
@@ -34,11 +34,7 @@
|
|
34
34
|
#include "extconf.h"
|
35
35
|
#include "AbstractMemory.h"
|
36
36
|
#include "Type.h"
|
37
|
-
#ifdef RUBY_1_9
|
38
37
|
#include <ruby/st.h>
|
39
|
-
#else
|
40
|
-
#include <st.h>
|
41
|
-
#endif
|
42
38
|
|
43
39
|
#ifdef __cplusplus
|
44
40
|
extern "C" {
|
@@ -73,11 +69,21 @@ extern "C" {
|
|
73
69
|
int size;
|
74
70
|
int align;
|
75
71
|
ffi_type** ffiTypes;
|
76
|
-
|
72
|
+
|
73
|
+
/*
|
74
|
+
* We use the fieldName's minor 8 Bits as index to a 256 entry cache.
|
75
|
+
* This avoids full ruby hash lookups for repeated lookups.
|
76
|
+
*/
|
77
|
+
#define FIELD_CACHE_LOOKUP(this, sym) ( &(this)->cache_row[((sym) >> 8) & 0xff] )
|
78
|
+
|
79
|
+
struct field_cache_entry {
|
80
|
+
VALUE fieldName;
|
81
|
+
StructField *field;
|
82
|
+
} cache_row[0x100];
|
77
83
|
|
78
84
|
/** The number of reference tracking fields in this struct */
|
79
85
|
int referenceFieldCount;
|
80
|
-
|
86
|
+
|
81
87
|
VALUE rbFieldNames;
|
82
88
|
VALUE rbFieldMap;
|
83
89
|
VALUE rbFields;
|
data/ext/ffi_c/StructLayout.c
CHANGED
@@ -138,7 +138,7 @@ struct_field_initialize(int argc, VALUE* argv, VALUE self)
|
|
138
138
|
&& RTEST(rb_funcall2(rbType, rb_intern("reference_required?"), 0, NULL)));
|
139
139
|
break;
|
140
140
|
}
|
141
|
-
|
141
|
+
|
142
142
|
return self;
|
143
143
|
}
|
144
144
|
|
@@ -239,7 +239,7 @@ static VALUE
|
|
239
239
|
struct_field_put(VALUE self, VALUE pointer, VALUE value)
|
240
240
|
{
|
241
241
|
StructField* f;
|
242
|
-
|
242
|
+
|
243
243
|
Data_Get_Struct(self, StructField, f);
|
244
244
|
if (f->memoryOp == NULL) {
|
245
245
|
rb_raise(rb_eArgError, "put not supported for %s", rb_obj_classname(f->rbType));
|
@@ -261,7 +261,7 @@ static VALUE
|
|
261
261
|
function_field_get(VALUE self, VALUE pointer)
|
262
262
|
{
|
263
263
|
StructField* f;
|
264
|
-
|
264
|
+
|
265
265
|
Data_Get_Struct(self, StructField, f);
|
266
266
|
|
267
267
|
return rbffi_Function_NewInstance(f->rbType, (*rbffi_AbstractMemoryOps.pointer->get)(MEMORY(pointer), f->offset));
|
@@ -272,7 +272,7 @@ function_field_get(VALUE self, VALUE pointer)
|
|
272
272
|
* @param [AbstractMemory] pointer pointer to a {Struct}
|
273
273
|
* @param [Function, Proc] proc
|
274
274
|
* @return [Function]
|
275
|
-
* Set a {Function} to memory pointed by +pointer+ as a function.
|
275
|
+
* Set a {Function} to memory pointed by +pointer+ as a function.
|
276
276
|
*
|
277
277
|
* If a Proc is submitted as +proc+, it is automatically transformed to a {Function}.
|
278
278
|
*/
|
@@ -339,19 +339,24 @@ array_field_put(VALUE self, VALUE pointer, VALUE value)
|
|
339
339
|
{
|
340
340
|
StructField* f;
|
341
341
|
ArrayType* array;
|
342
|
-
|
342
|
+
|
343
343
|
|
344
344
|
Data_Get_Struct(self, StructField, f);
|
345
345
|
Data_Get_Struct(f->rbType, ArrayType, array);
|
346
|
-
|
346
|
+
|
347
347
|
if (isCharArray(array) && rb_obj_is_instance_of(value, rb_cString)) {
|
348
348
|
VALUE argv[2];
|
349
349
|
|
350
350
|
argv[0] = INT2FIX(f->offset);
|
351
351
|
argv[1] = value;
|
352
352
|
|
353
|
-
|
354
|
-
|
353
|
+
if (RSTRING_LEN(value) < array->length) {
|
354
|
+
rb_funcall2(pointer, rb_intern("put_string"), 2, argv);
|
355
|
+
} else if (RSTRING_LEN(value) == array->length) {
|
356
|
+
rb_funcall2(pointer, rb_intern("put_bytes"), 2, argv);
|
357
|
+
} else {
|
358
|
+
rb_raise(rb_eIndexError, "String is longer (%ld bytes) than the char array (%d bytes)", RSTRING_LEN(value), array->length);
|
359
|
+
}
|
355
360
|
} else {
|
356
361
|
#ifdef notyet
|
357
362
|
MemoryOp* op;
|
@@ -419,7 +424,6 @@ struct_layout_allocate(VALUE klass)
|
|
419
424
|
layout->rbFieldMap = Qnil;
|
420
425
|
layout->rbFieldNames = Qnil;
|
421
426
|
layout->rbFields = Qnil;
|
422
|
-
layout->fieldSymbolTable = st_init_numtable();
|
423
427
|
layout->base.ffiType = xcalloc(1, sizeof(*layout->base.ffiType));
|
424
428
|
layout->base.ffiType->size = 0;
|
425
429
|
layout->base.ffiType->alignment = 0;
|
@@ -488,7 +492,6 @@ struct_layout_initialize(VALUE self, VALUE fields, VALUE size, VALUE align)
|
|
488
492
|
|
489
493
|
|
490
494
|
layout->ffiTypes[i] = ftype->size > 0 ? ftype : NULL;
|
491
|
-
st_insert(layout->fieldSymbolTable, rbName, rbField);
|
492
495
|
rb_hash_aset(layout->rbFieldMap, rbName, rbField);
|
493
496
|
rb_ary_push(layout->rbFields, rbField);
|
494
497
|
rb_ary_push(layout->rbFieldNames, rbName);
|
@@ -501,14 +504,14 @@ struct_layout_initialize(VALUE self, VALUE fields, VALUE size, VALUE align)
|
|
501
504
|
return self;
|
502
505
|
}
|
503
506
|
|
504
|
-
/*
|
507
|
+
/*
|
505
508
|
* call-seq: [](field)
|
506
509
|
* @param [Symbol] field
|
507
510
|
* @return [StructLayout::Field]
|
508
511
|
* Get a field from the layout.
|
509
512
|
*/
|
510
513
|
static VALUE
|
511
|
-
struct_layout_union_bang(VALUE self)
|
514
|
+
struct_layout_union_bang(VALUE self)
|
512
515
|
{
|
513
516
|
const ffi_type *alignment_types[] = { &ffi_type_sint8, &ffi_type_sint16, &ffi_type_sint32, &ffi_type_sint64,
|
514
517
|
&ffi_type_float, &ffi_type_double, &ffi_type_longdouble, NULL };
|
@@ -602,6 +605,10 @@ struct_layout_mark(StructLayout *layout)
|
|
602
605
|
rb_gc_mark(layout->rbFieldMap);
|
603
606
|
rb_gc_mark(layout->rbFieldNames);
|
604
607
|
rb_gc_mark(layout->rbFields);
|
608
|
+
/* Clear the cache, to be safe from changes of fieldName VALUE by GC.compact.
|
609
|
+
* TODO: Move cache clearing to compactation callback provided by Ruby-2.7+.
|
610
|
+
*/
|
611
|
+
memset(&layout->cache_row, 0, sizeof(layout->cache_row));
|
605
612
|
}
|
606
613
|
|
607
614
|
static void
|
@@ -610,7 +617,6 @@ struct_layout_free(StructLayout *layout)
|
|
610
617
|
xfree(layout->ffiTypes);
|
611
618
|
xfree(layout->base.ffiType);
|
612
619
|
xfree(layout->fields);
|
613
|
-
st_free_table(layout->fieldSymbolTable);
|
614
620
|
xfree(layout);
|
615
621
|
}
|
616
622
|
|
@@ -627,7 +633,7 @@ rbffi_StructLayout_Init(VALUE moduleFFI)
|
|
627
633
|
*/
|
628
634
|
rbffi_StructLayoutClass = rb_define_class_under(moduleFFI, "StructLayout", ffi_Type);
|
629
635
|
rb_global_variable(&rbffi_StructLayoutClass);
|
630
|
-
|
636
|
+
|
631
637
|
/*
|
632
638
|
* Document-class: FFI::StructLayout::Field
|
633
639
|
* A field in a {StructLayout}.
|
data/ext/ffi_c/Thread.c
CHANGED
data/ext/ffi_c/Thread.h
CHANGED
data/ext/ffi_c/compat.h
CHANGED
data/ext/ffi_c/extconf.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
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
6
|
|
@@ -8,14 +8,22 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
8
8
|
# We need pkg_config or ffi.h
|
9
9
|
libffi_ok = pkg_config("libffi") ||
|
10
10
|
have_header("ffi.h") ||
|
11
|
-
find_header("ffi.h", "/usr/local/include", "/usr/include/ffi"
|
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)
|
12
15
|
|
13
|
-
# Ensure we can link to
|
14
|
-
libffi_ok &&= have_library("ffi", "
|
15
|
-
have_library("libffi", "
|
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" ])
|
16
20
|
|
17
|
-
|
18
|
-
|
21
|
+
if RbConfig::CONFIG['host_os'] =~ /mswin/
|
22
|
+
have_library('libffi_convenience')
|
23
|
+
have_library('shlwapi')
|
24
|
+
end
|
25
|
+
|
26
|
+
libffi_ok
|
19
27
|
end
|
20
28
|
|
21
29
|
dir_config("ffi_c")
|
@@ -36,14 +44,6 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
36
44
|
abort "system libffi is not usable" unless system_libffi_usable?
|
37
45
|
end
|
38
46
|
|
39
|
-
have_header('shlwapi.h')
|
40
|
-
have_func('rb_thread_call_without_gvl') || abort("Ruby C-API function `rb_thread_call_without_gvl` is missing")
|
41
|
-
have_func('ruby_native_thread_p')
|
42
|
-
if RUBY_VERSION >= "2.3.0"
|
43
|
-
# On OSX and Linux ruby_thread_has_gvl_p() is detected but fails at runtime for ruby < 2.3.0
|
44
|
-
have_func('ruby_thread_has_gvl_p')
|
45
|
-
end
|
46
|
-
|
47
47
|
if system_libffi
|
48
48
|
have_func('ffi_prep_cif_var')
|
49
49
|
$defs << "-DHAVE_RAW_API" if have_func("ffi_raw_call") && have_func("ffi_prep_raw_closure")
|
@@ -53,14 +53,10 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
53
53
|
end
|
54
54
|
|
55
55
|
$defs << "-DHAVE_EXTCONF_H" if $defs.empty? # needed so create_header works
|
56
|
-
$defs << "-DRUBY_1_9" if RUBY_VERSION >= "1.9.0"
|
57
|
-
$defs << "-DFFI_BUILDING" if RbConfig::CONFIG['host_os'] =~ /mswin/ # for compatibility with newer libffi
|
58
56
|
|
59
57
|
create_header
|
60
|
-
|
61
|
-
$LOCAL_LIBS << " ./libffi/.libs/libffi_convenience.lib" if !system_libffi && RbConfig::CONFIG['host_os'] =~ /mswin/
|
62
|
-
|
63
58
|
create_makefile("ffi_c")
|
59
|
+
|
64
60
|
unless system_libffi
|
65
61
|
File.open("Makefile", "a") do |mf|
|
66
62
|
mf.puts "LIBFFI_HOST=--host=#{RbConfig::CONFIG['host_alias']}" if RbConfig::CONFIG.has_key?("host_alias")
|
@@ -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,30 @@ 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
|
-
|
24
|
-
|
25
|
-
env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O0"
|
34
|
+
arch: s390x
|
35
|
+
env: HOST=s390x-linux-gnu
|
26
36
|
- os: linux
|
27
|
-
|
37
|
+
arch: ppc64le
|
38
|
+
env: HOST=ppc64le-linux-gnu
|
28
39
|
- os: linux
|
29
|
-
|
30
|
-
|
31
|
-
env: HOST=sparc64-linux-gnu
|
40
|
+
arch: arm64
|
41
|
+
env: HOST=aarch64-linux-gnu
|
32
42
|
- os: linux
|
43
|
+
arch: arm64
|
33
44
|
env: HOST=aarch64-linux-gnu
|
45
|
+
compiler: clang
|
34
46
|
- os: linux
|
35
|
-
env: HOST=
|
47
|
+
env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O0"
|
48
|
+
- os: linux
|
49
|
+
env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2"
|
36
50
|
- os: linux
|
37
|
-
env: HOST=
|
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
|
38
58
|
- os: linux
|
39
59
|
compiler: gcc
|
40
60
|
env: HOST=i386-pc-linux-gnu MEVAL='export CC="$CC -m32" && CXX="$CXX -m32"'
|
@@ -59,5 +79,5 @@ install:
|
|
59
79
|
|
60
80
|
script:
|
61
81
|
- if ! test x"$MEVAL" = x; then eval ${MEVAL}; fi
|
62
|
-
- travis_wait
|
82
|
+
- travis_wait 115 sleep infinity &
|
63
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
|
+
|
@@ -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
|
|
@@ -2,60 +2,75 @@
|
|
2
2
|
|
3
3
|
set -x
|
4
4
|
|
5
|
+
# This is a policy bound API key. It can only be used with
|
6
|
+
# https://github.com/libffi/rlgl-policy.git.
|
7
|
+
RLGL_KEY=0LIBFFI-0LIBFFI-0LIBFFI-0LIBFFI
|
8
|
+
|
5
9
|
if [ -z ${QEMU_CPU+x} ]; then
|
6
10
|
export SET_QEMU_CPU=
|
7
11
|
else
|
8
12
|
export SET_QEMU_CPU="-e QEMU_CPU=${QEMU_CPU}"
|
9
13
|
fi
|
10
14
|
|
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
|
15
|
+
export DOCKER=docker
|
21
16
|
|
22
17
|
function build_cfarm()
|
23
18
|
{
|
24
|
-
curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT}
|
19
|
+
curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT} | tee build.log
|
20
|
+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
21
|
+
echo $(tail build.log | grep '^==LOGFILE==')
|
22
|
+
echo $(tail build.log | grep '^==LOGFILE==' | cut -b13-)
|
23
|
+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
24
|
+
curl -u ${CFARM_AUTH} "$(tail build.log | grep '^==LOGFILE==' | cut -b13-)" > libffi.log
|
25
|
+
|
26
|
+
./rlgl l --key=${RLGL_KEY} https://rl.gl
|
27
|
+
ID=$(./rlgl start)
|
28
|
+
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git libffi.log
|
29
|
+
exit $?
|
25
30
|
}
|
26
31
|
|
27
32
|
function build_linux()
|
28
33
|
{
|
29
34
|
./autogen.sh
|
30
|
-
./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS}
|
35
|
+
./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS} || cat */config.log
|
31
36
|
make
|
32
37
|
make dist
|
33
38
|
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
|
39
|
+
|
40
|
+
./rlgl l --key=${RLGL_KEY} https://rl.gl
|
41
|
+
ID=$(./rlgl start)
|
42
|
+
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
|
43
|
+
exit $?
|
48
44
|
}
|
49
45
|
|
50
46
|
function build_foreign_linux()
|
51
47
|
{
|
52
|
-
${DOCKER} run --rm -t -i -v
|
48
|
+
${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
|
49
|
+
|
50
|
+
./rlgl l --key=${RLGL_KEY} https://rl.gl
|
51
|
+
ID=$(./rlgl start)
|
52
|
+
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
|
53
53
|
exit $?
|
54
54
|
}
|
55
55
|
|
56
56
|
function build_cross_linux()
|
57
57
|
{
|
58
|
-
${DOCKER} run --rm -t -i -v
|
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
|
59
|
+
|
60
|
+
./rlgl l --key=${RLGL_KEY} https://rl.gl
|
61
|
+
ID=$(./rlgl start)
|
62
|
+
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
|
63
|
+
exit $?
|
64
|
+
}
|
65
|
+
|
66
|
+
function build_cross()
|
67
|
+
{
|
68
|
+
${DOCKER} pull quay.io/moxielogic/libffi-ci-${HOST}
|
69
|
+
${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
|
70
|
+
|
71
|
+
./rlgl l --key=${RLGL_KEY} https://rl.gl
|
72
|
+
ID=$(./rlgl start)
|
73
|
+
./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
|
59
74
|
exit $?
|
60
75
|
}
|
61
76
|
|
@@ -76,6 +91,7 @@ function build_macosx()
|
|
76
91
|
./generate-darwin-source-and-headers.py --only-osx
|
77
92
|
xcodebuild -showsdks
|
78
93
|
xcodebuild -project libffi.xcodeproj -target "libffi-Mac" -configuration Release -sdk macosx10.13
|
94
|
+
echo "Finished build"
|
79
95
|
exit $?
|
80
96
|
}
|
81
97
|
|
@@ -92,14 +108,30 @@ case "$HOST" in
|
|
92
108
|
./autogen.sh
|
93
109
|
build_foreign_linux arm moxielogic/arm32v7-ci-build-container:latest
|
94
110
|
;;
|
95
|
-
|
111
|
+
mips64el-linux-gnu | sparc64-linux-gnu)
|
96
112
|
build_cfarm
|
97
113
|
;;
|
114
|
+
bfin-elf )
|
115
|
+
./autogen.sh
|
116
|
+
GCC_OPTIONS=-msim build_cross
|
117
|
+
;;
|
118
|
+
m32r-elf )
|
119
|
+
./autogen.sh
|
120
|
+
build_cross
|
121
|
+
;;
|
122
|
+
or1k-elf )
|
123
|
+
./autogen.sh
|
124
|
+
build_cross
|
125
|
+
;;
|
126
|
+
powerpc-eabisim )
|
127
|
+
./autogen.sh
|
128
|
+
build_cross
|
129
|
+
;;
|
98
130
|
m68k-linux-gnu )
|
99
131
|
./autogen.sh
|
100
132
|
GCC_OPTIONS=-mcpu=547x build_cross_linux
|
101
133
|
;;
|
102
|
-
alpha-linux-gnu | sh4-linux-gnu
|
134
|
+
alpha-linux-gnu | sh4-linux-gnu )
|
103
135
|
./autogen.sh
|
104
136
|
build_cross_linux
|
105
137
|
;;
|