ffi 1.16.3 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +42 -0
- data/Gemfile +9 -2
- data/README.md +1 -1
- data/Rakefile +17 -5
- data/ext/ffi_c/AbstractMemory.c +39 -38
- data/ext/ffi_c/ArrayType.c +2 -2
- data/ext/ffi_c/Buffer.c +4 -4
- data/ext/ffi_c/Call.c +12 -6
- data/ext/ffi_c/Call.h +3 -2
- data/ext/ffi_c/DynamicLibrary.c +2 -2
- data/ext/ffi_c/FunctionInfo.c +1 -1
- data/ext/ffi_c/LastError.c +4 -4
- data/ext/ffi_c/MemoryPointer.c +2 -2
- data/ext/ffi_c/Pointer.c +14 -11
- data/ext/ffi_c/Struct.c +11 -4
- data/ext/ffi_c/StructLayout.c +13 -13
- data/ext/ffi_c/Type.c +17 -16
- data/ext/ffi_c/Types.c +7 -1
- data/ext/ffi_c/Types.h +0 -1
- data/ext/ffi_c/Variadic.c +6 -3
- data/ext/ffi_c/libffi/.allow-ai-service +0 -0
- data/ext/ffi_c/libffi/.github/workflows/build.yml +34 -15
- data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +2 -1
- data/ext/ffi_c/libffi/LICENSE +1 -1
- data/ext/ffi_c/libffi/README.md +10 -5
- data/ext/ffi_c/libffi/configure +15 -15
- data/ext/ffi_c/libffi/configure.ac +2 -2
- data/ext/ffi_c/libffi/configure.host +1 -1
- data/ext/ffi_c/libffi/doc/libffi.texi +1 -1
- data/ext/ffi_c/libffi/doc/version.texi +4 -4
- data/ext/ffi_c/libffi/include/ffi.h.in +2 -11
- data/ext/ffi_c/libffi/include/ffi_common.h +4 -2
- data/ext/ffi_c/libffi/libffi.map.in +5 -0
- data/ext/ffi_c/libffi/libtool-version +1 -1
- data/ext/ffi_c/libffi/ltmain.sh +8 -20
- data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +1 -1
- data/ext/ffi_c/libffi/src/aarch64/ffi.c +26 -13
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +198 -46
- data/ext/ffi_c/libffi/src/closures.c +3 -3
- data/ext/ffi_c/libffi/src/debug.c +2 -2
- data/ext/ffi_c/libffi/src/dlmalloc.c +1 -1
- data/ext/ffi_c/libffi/src/loongarch64/ffi.c +3 -0
- data/ext/ffi_c/libffi/src/mips/ffi.c +12 -4
- data/ext/ffi_c/libffi/src/mips/n32.S +65 -14
- data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +36 -24
- data/ext/ffi_c/libffi/src/sparc/ffi64.c +7 -1
- data/ext/ffi_c/libffi/src/tramp.c +1 -1
- data/ext/ffi_c/libffi/src/types.c +4 -6
- data/ext/ffi_c/libffi/src/wasm32/ffi.c +13 -0
- data/ext/ffi_c/libffi/src/x86/ffiw64.c +1 -1
- data/ext/ffi_c/libffi/testsuite/Makefile.am +79 -127
- data/ext/ffi_c/libffi/testsuite/Makefile.in +79 -127
- data/ext/ffi_c/libffi/testsuite/emscripten/conftest.py +6 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback.c +99 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback2.c +108 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback3.c +114 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback4.c +119 -0
- data/ext/ffi_c/libffi.darwin.mk +2 -2
- data/lib/ffi/autopointer.rb +1 -9
- data/lib/ffi/dynamic_library.rb +34 -5
- data/lib/ffi/enum.rb +0 -1
- data/lib/ffi/function.rb +1 -1
- data/lib/ffi/io.rb +2 -2
- data/lib/ffi/library.rb +23 -23
- data/lib/ffi/platform/aarch64-linux/types.conf +74 -3
- data/lib/ffi/pointer.rb +6 -6
- data/lib/ffi/struct.rb +4 -4
- data/lib/ffi/struct_layout.rb +2 -2
- data/lib/ffi/struct_layout_builder.rb +8 -8
- data/lib/ffi/types.rb +51 -49
- data/lib/ffi/version.rb +1 -1
- data/sig/ffi/abstract_memory.rbs +165 -0
- data/sig/ffi/auto_pointer.rbs +27 -0
- data/sig/ffi/buffer.rbs +18 -0
- data/sig/ffi/data_converter.rbs +10 -0
- data/sig/ffi/dynamic_library.rbs +9 -0
- data/sig/ffi/enum.rbs +38 -0
- data/sig/ffi/function.rbs +39 -0
- data/sig/ffi/library.rbs +42 -0
- data/sig/ffi/native_type.rbs +86 -0
- data/sig/ffi/pointer.rbs +42 -0
- data/sig/ffi/struct.rbs +76 -0
- data/sig/ffi/struct_by_reference.rbs +11 -0
- data/sig/ffi/struct_by_value.rbs +7 -0
- data/sig/ffi/struct_layout.rbs +9 -0
- data/sig/ffi/struct_layout_builder.rbs +5 -0
- data/sig/ffi/type.rbs +39 -0
- data/sig/ffi.rbs +26 -0
- data.tar.gz.sig +0 -0
- metadata +37 -18
- metadata.gz.sig +0 -0
data/ext/ffi_c/Struct.c
CHANGED
@@ -91,6 +91,7 @@ VALUE rbffi_StructLayoutCharArrayClass = Qnil;
|
|
91
91
|
|
92
92
|
static ID id_pointer_ivar = 0, id_layout_ivar = 0;
|
93
93
|
static ID id_get = 0, id_put = 0, id_to_ptr = 0, id_to_s = 0, id_layout = 0;
|
94
|
+
static ID id_initialize = 0;
|
94
95
|
|
95
96
|
static inline char*
|
96
97
|
memory_address(VALUE self)
|
@@ -114,6 +115,7 @@ struct_allocate(VALUE klass)
|
|
114
115
|
|
115
116
|
/*
|
116
117
|
* call-seq: initialize
|
118
|
+
* @overload initialize
|
117
119
|
* @overload initialize(pointer, *args)
|
118
120
|
* @param [AbstractMemory] pointer
|
119
121
|
* @param [Array] args
|
@@ -616,7 +618,7 @@ inline_array_initialize(VALUE self, VALUE rbMemory, VALUE rbField)
|
|
616
618
|
|
617
619
|
/*
|
618
620
|
* call-seq: size
|
619
|
-
* @return [
|
621
|
+
* @return [Integer]
|
620
622
|
* Get size
|
621
623
|
*/
|
622
624
|
static VALUE
|
@@ -641,7 +643,7 @@ inline_array_offset(InlineArray* array, int index)
|
|
641
643
|
|
642
644
|
/*
|
643
645
|
* call-seq: [](index)
|
644
|
-
* @param [
|
646
|
+
* @param [Integer] index
|
645
647
|
* @return [Type, Struct]
|
646
648
|
*/
|
647
649
|
static VALUE
|
@@ -665,8 +667,12 @@ inline_array_aref(VALUE self, VALUE rbIndex)
|
|
665
667
|
VALUE rbOffset = INT2NUM(inline_array_offset(array, NUM2INT(rbIndex)));
|
666
668
|
VALUE rbLength = INT2NUM(array->componentType->ffiType->size);
|
667
669
|
VALUE rbPointer = rb_funcall(array->rbMemory, rb_intern("slice"), 2, rbOffset, rbLength);
|
670
|
+
VALUE obj;
|
668
671
|
|
669
|
-
|
672
|
+
/* We avoid rb_class_new_instance here, to avoid passing the method block */
|
673
|
+
obj = rb_obj_alloc(((StructByValue *) array->componentType)->rbStructClass);
|
674
|
+
rb_funcallv(obj, id_initialize, 1, &rbPointer);
|
675
|
+
return obj;
|
670
676
|
} else {
|
671
677
|
|
672
678
|
rb_raise(rb_eArgError, "get not supported for %s", rb_obj_classname(array->arrayType->rbComponentType));
|
@@ -676,7 +682,7 @@ inline_array_aref(VALUE self, VALUE rbIndex)
|
|
676
682
|
|
677
683
|
/*
|
678
684
|
* call-seq: []=(index, value)
|
679
|
-
* @param [
|
685
|
+
* @param [Integer] index
|
680
686
|
* @param [Type, Struct]
|
681
687
|
* @return [value]
|
682
688
|
*/
|
@@ -893,5 +899,6 @@ rbffi_Struct_Init(VALUE moduleFFI)
|
|
893
899
|
id_put = rb_intern("put");
|
894
900
|
id_to_ptr = rb_intern("to_ptr");
|
895
901
|
id_to_s = rb_intern("to_s");
|
902
|
+
id_initialize = rb_intern("initialize");
|
896
903
|
}
|
897
904
|
|
data/ext/ffi_c/StructLayout.c
CHANGED
@@ -132,7 +132,7 @@ struct_field_memsize(const void *data)
|
|
132
132
|
/*
|
133
133
|
* call-seq: initialize(name, offset, type)
|
134
134
|
* @param [String,Symbol] name
|
135
|
-
* @param [
|
135
|
+
* @param [Integer] offset
|
136
136
|
* @param [FFI::Type] type
|
137
137
|
* @return [self]
|
138
138
|
* A new FFI::StructLayout::Field instance.
|
@@ -188,7 +188,7 @@ struct_field_initialize(int argc, VALUE* argv, VALUE self)
|
|
188
188
|
|
189
189
|
/*
|
190
190
|
* call-seq: offset
|
191
|
-
* @return [
|
191
|
+
* @return [Integer]
|
192
192
|
* Get the field offset.
|
193
193
|
*/
|
194
194
|
static VALUE
|
@@ -201,7 +201,7 @@ struct_field_offset(VALUE self)
|
|
201
201
|
|
202
202
|
/*
|
203
203
|
* call-seq: size
|
204
|
-
* @return [
|
204
|
+
* @return [Integer]
|
205
205
|
* Get the field size.
|
206
206
|
*/
|
207
207
|
static VALUE
|
@@ -214,7 +214,7 @@ struct_field_size(VALUE self)
|
|
214
214
|
|
215
215
|
/*
|
216
216
|
* call-seq: alignment
|
217
|
-
* @return [
|
217
|
+
* @return [Integer]
|
218
218
|
* Get the field alignment.
|
219
219
|
*/
|
220
220
|
static VALUE
|
@@ -460,9 +460,9 @@ struct_layout_allocate(VALUE klass)
|
|
460
460
|
VALUE obj;
|
461
461
|
|
462
462
|
obj = TypedData_Make_Struct(klass, StructLayout, &rbffi_struct_layout_data_type, layout);
|
463
|
-
layout->rbFieldMap
|
464
|
-
layout->rbFieldNames
|
465
|
-
layout->rbFields
|
463
|
+
RB_OBJ_WRITE(obj, &layout->rbFieldMap, Qnil);
|
464
|
+
RB_OBJ_WRITE(obj, &layout->rbFieldNames, Qnil);
|
465
|
+
RB_OBJ_WRITE(obj, &layout->rbFields, Qnil);
|
466
466
|
layout->base.ffiType = xcalloc(1, sizeof(*layout->base.ffiType));
|
467
467
|
layout->base.ffiType->size = 0;
|
468
468
|
layout->base.ffiType->alignment = 0;
|
@@ -474,8 +474,8 @@ struct_layout_allocate(VALUE klass)
|
|
474
474
|
/*
|
475
475
|
* call-seq: initialize(fields, size, align)
|
476
476
|
* @param [Array<StructLayout::Field>] fields
|
477
|
-
* @param [
|
478
|
-
* @param [
|
477
|
+
* @param [Integer] size
|
478
|
+
* @param [Integer] align
|
479
479
|
* @return [self]
|
480
480
|
* A new StructLayout instance.
|
481
481
|
*/
|
@@ -487,14 +487,14 @@ struct_layout_initialize(VALUE self, VALUE fields, VALUE size, VALUE align)
|
|
487
487
|
int i;
|
488
488
|
|
489
489
|
TypedData_Get_Struct(self, StructLayout, &rbffi_struct_layout_data_type, layout);
|
490
|
-
layout->fieldCount = (
|
491
|
-
layout->rbFieldMap
|
492
|
-
layout->rbFieldNames
|
490
|
+
layout->fieldCount = RARRAY_LENINT(fields);
|
491
|
+
RB_OBJ_WRITE(self, &layout->rbFieldMap, rb_hash_new());
|
492
|
+
RB_OBJ_WRITE(self, &layout->rbFieldNames, rb_ary_new2(layout->fieldCount));
|
493
493
|
layout->size = (int) FFI_ALIGN(NUM2INT(size), NUM2INT(align));
|
494
494
|
layout->align = NUM2INT(align);
|
495
495
|
layout->fields = xcalloc(layout->fieldCount, sizeof(StructField *));
|
496
496
|
layout->ffiTypes = xcalloc(layout->fieldCount + 1, sizeof(ffi_type *));
|
497
|
-
layout->rbFields
|
497
|
+
RB_OBJ_WRITE(self, &layout->rbFields, rb_ary_new2(layout->fieldCount));
|
498
498
|
layout->referenceFieldCount = 0;
|
499
499
|
layout->base.ffiType->elements = layout->ffiTypes;
|
500
500
|
layout->base.ffiType->size = layout->size;
|
data/ext/ffi_c/Type.c
CHANGED
@@ -107,7 +107,7 @@ type_allocate(VALUE klass)
|
|
107
107
|
/*
|
108
108
|
* Document-method: initialize
|
109
109
|
* call-seq: initialize(value)
|
110
|
-
* @param [
|
110
|
+
* @param [Integer,Type] value
|
111
111
|
* @return [self]
|
112
112
|
*/
|
113
113
|
static VALUE
|
@@ -135,7 +135,7 @@ type_initialize(VALUE self, VALUE value)
|
|
135
135
|
|
136
136
|
/*
|
137
137
|
* call-seq: type.size
|
138
|
-
* @return [
|
138
|
+
* @return [Integer]
|
139
139
|
* Return type's size, in bytes.
|
140
140
|
*/
|
141
141
|
static VALUE
|
@@ -150,7 +150,7 @@ type_size(VALUE self)
|
|
150
150
|
|
151
151
|
/*
|
152
152
|
* call-seq: type.alignment
|
153
|
-
* @return [
|
153
|
+
* @return [Integer]
|
154
154
|
* Get Type alignment.
|
155
155
|
*/
|
156
156
|
static VALUE
|
@@ -333,10 +333,10 @@ rbffi_Type_Init(VALUE moduleFFI)
|
|
333
333
|
classBuiltinType = rb_define_class_under(rbffi_TypeClass, "Builtin", rbffi_TypeClass);
|
334
334
|
/*
|
335
335
|
* Document-module: FFI::NativeType
|
336
|
-
* This module defines constants for native
|
336
|
+
* This module defines constants for C native types.
|
337
337
|
*
|
338
338
|
* ==Native type constants
|
339
|
-
* Native types are defined by constants :
|
339
|
+
* Native types are defined by constants and aliases:
|
340
340
|
* * INT8, SCHAR, CHAR
|
341
341
|
* * UINT8, UCHAR
|
342
342
|
* * INT16, SHORT, SSHORT
|
@@ -349,24 +349,25 @@ rbffi_Type_Init(VALUE moduleFFI)
|
|
349
349
|
* * ULONG
|
350
350
|
* * FLOAT32, FLOAT
|
351
351
|
* * FLOAT64, DOUBLE
|
352
|
+
* * LONGDOUBLE (if the native platform has `long double`)
|
352
353
|
* * POINTER
|
353
|
-
* * CALLBACK
|
354
|
-
* * FUNCTION
|
355
|
-
* * CHAR_ARRAY
|
356
354
|
* * BOOL
|
357
|
-
* * STRING (immutable string,
|
358
|
-
*
|
359
|
-
* * ARRAY (array type definition)
|
360
|
-
* * MAPPED (custom native type)
|
361
|
-
* For function return type only :
|
355
|
+
* * STRING (immutable string, null terminated)
|
356
|
+
* For function return type only:
|
362
357
|
* * VOID
|
363
|
-
* For function argument type only
|
358
|
+
* For function argument type only:
|
364
359
|
* * BUFFER_IN
|
365
360
|
* * BUFFER_OUT
|
361
|
+
* * BUFFER_INOUT
|
366
362
|
* * VARARGS (function takes a variable number of arguments)
|
367
363
|
*
|
368
|
-
*
|
369
|
-
*
|
364
|
+
* They are objects of the class {FFI::Type::Builtin}.
|
365
|
+
*
|
366
|
+
* Non-alias (the first name in each bullet point) constants are also exported to modules +FFI::NativeType+ and (prefixed with +TYPE_+) {FFI}.
|
367
|
+
* All constants and aliases above are exported to the {FFI::Type} class, as well as the following aliases:
|
368
|
+
* * Array ({FFI::ArrayType})
|
369
|
+
* * Function ({FFI::FunctionType})
|
370
|
+
* * Struct ({FFI::StructByValue})
|
370
371
|
*/
|
371
372
|
moduleNativeType = rb_define_module_under(moduleFFI, "NativeType");
|
372
373
|
|
data/ext/ffi_c/Types.c
CHANGED
@@ -41,6 +41,7 @@
|
|
41
41
|
#include "LongDouble.h"
|
42
42
|
|
43
43
|
static ID id_from_native = 0;
|
44
|
+
static ID id_initialize = 0;
|
44
45
|
|
45
46
|
|
46
47
|
VALUE
|
@@ -95,6 +96,7 @@ rbffi_NativeValue_ToRuby(Type* type, VALUE rbType, const void* ptr)
|
|
95
96
|
case NATIVE_STRUCT: {
|
96
97
|
StructByValue* sbv = (StructByValue *)type;
|
97
98
|
AbstractMemory* mem;
|
99
|
+
VALUE obj;
|
98
100
|
VALUE rbMemory = rbffi_MemoryPointer_NewInstance(1, sbv->base.ffiType->size, false);
|
99
101
|
|
100
102
|
TypedData_Get_Struct(rbMemory, AbstractMemory, &rbffi_abstract_memory_data_type, mem);
|
@@ -102,7 +104,10 @@ rbffi_NativeValue_ToRuby(Type* type, VALUE rbType, const void* ptr)
|
|
102
104
|
RB_GC_GUARD(rbMemory);
|
103
105
|
RB_GC_GUARD(rbType);
|
104
106
|
|
105
|
-
|
107
|
+
/* We avoid rb_class_new_instance here, to avoid passing the method block */
|
108
|
+
obj = rb_obj_alloc(sbv->rbStructClass);
|
109
|
+
rb_funcallv(obj, id_initialize, 1, &rbMemory);
|
110
|
+
return obj;
|
106
111
|
}
|
107
112
|
|
108
113
|
case NATIVE_MAPPED: {
|
@@ -134,5 +139,6 @@ void
|
|
134
139
|
rbffi_Types_Init(VALUE moduleFFI)
|
135
140
|
{
|
136
141
|
id_from_native = rb_intern("from_native");
|
142
|
+
id_initialize = rb_intern("initialize");
|
137
143
|
}
|
138
144
|
|
data/ext/ffi_c/Types.h
CHANGED
data/ext/ffi_c/Variadic.c
CHANGED
@@ -202,6 +202,7 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
202
202
|
Type** paramTypes;
|
203
203
|
VALUE* argv;
|
204
204
|
VALUE* callbackParameters;
|
205
|
+
VALUE callbackProc;
|
205
206
|
int paramCount = 0, fixedCount = 0, callbackCount = 0, i;
|
206
207
|
ffi_status ffiStatus;
|
207
208
|
rbffi_frame_t frame = { 0 };
|
@@ -210,7 +211,7 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
210
211
|
Check_Type(parameterValues, T_ARRAY);
|
211
212
|
|
212
213
|
TypedData_Get_Struct(self, VariadicInvoker, &variadic_data_type, invoker);
|
213
|
-
paramCount = (
|
214
|
+
paramCount = RARRAY_LENINT(parameterTypes);
|
214
215
|
paramTypes = ALLOCA_N(Type *, paramCount);
|
215
216
|
ffiParamTypes = ALLOCA_N(ffi_type *, paramCount);
|
216
217
|
params = ALLOCA_N(FFIStorage, paramCount);
|
@@ -290,8 +291,9 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
290
291
|
rb_raise(rb_eArgError, "Unknown FFI error");
|
291
292
|
}
|
292
293
|
|
293
|
-
rbffi_SetupCallParams(paramCount, argv, -1, paramTypes, params,
|
294
|
-
ffiValues, callbackParameters, callbackCount,
|
294
|
+
callbackProc = rbffi_SetupCallParams(paramCount, argv, -1, paramTypes, params,
|
295
|
+
ffiValues, callbackParameters, callbackCount,
|
296
|
+
invoker->rbEnums);
|
295
297
|
|
296
298
|
rbffi_frame_push(&frame);
|
297
299
|
|
@@ -309,6 +311,7 @@ variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
|
|
309
311
|
} else {
|
310
312
|
ffi_call(&cif, FFI_FN(invoker->function), retval, ffiValues);
|
311
313
|
}
|
314
|
+
RB_GC_GUARD(callbackProc);
|
312
315
|
|
313
316
|
rbffi_frame_pop(&frame);
|
314
317
|
|
File without changes
|
@@ -14,6 +14,30 @@ on:
|
|
14
14
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
15
15
|
jobs:
|
16
16
|
|
17
|
+
build-warp:
|
18
|
+
name: ${{ matrix.HOST }} ${{ matrix.CONFIGURE_OPTIONS }} ${{ matrix.MEVAL }} ${{ matrix.LIBFFI_TEST_OPTIMIZATION }}
|
19
|
+
runs-on: warp-ubuntu-latest-arm64-2x
|
20
|
+
|
21
|
+
strategy:
|
22
|
+
fail-fast: false
|
23
|
+
matrix:
|
24
|
+
include:
|
25
|
+
- HOST: "aarch64-linux-gnu"
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v3
|
29
|
+
|
30
|
+
- env:
|
31
|
+
MEVAL: ${{ matrix.MEVAL }}
|
32
|
+
HOST: ${{ matrix.HOST }}
|
33
|
+
LDFLAGS: ${{ matrix.LDFLAGS }}
|
34
|
+
RUNTESTFLAGS: ${{ matrix.RUNTESTFLAGS }}
|
35
|
+
CONFIGURE_OPTIONS: ${{ matrix.CONFIGURE_OPTIONS }}
|
36
|
+
run: |
|
37
|
+
if test x"$MEVAL" != x; then eval ${MEVAL}; fi
|
38
|
+
./.ci/install.sh
|
39
|
+
./.ci/build.sh
|
40
|
+
|
17
41
|
build-sim:
|
18
42
|
name: ${{ matrix.HOST }} ${{ matrix.CONFIGURE_OPTIONS }} ${{ matrix.MEVAL }} ${{ matrix.LIBFFI_TEST_OPTIMIZATION }}
|
19
43
|
runs-on: ubuntu-latest
|
@@ -89,57 +113,52 @@ jobs:
|
|
89
113
|
fail-fast: false
|
90
114
|
matrix:
|
91
115
|
include:
|
92
|
-
- CFARM_HOST:
|
116
|
+
- CFARM_HOST: cfarm185.cfarm.net
|
93
117
|
CFARM_PORT: 22
|
94
118
|
CFARM_TRIPLE: aarch64-linux-gnu
|
95
119
|
CFARM_CC: "gcc"
|
96
120
|
CFARM_CXX: "g++"
|
97
|
-
- CFARM_HOST:
|
98
|
-
CFARM_PORT: 22
|
99
|
-
CFARM_TRIPLE: aarch64-linux-gnu
|
100
|
-
CFARM_CC: "/home/green/gcc12/bin/gcc"
|
101
|
-
CFARM_CXX: "/home/green/gcc12/bin/g++"
|
102
|
-
- CFARM_HOST: gcc117.fsffrance.org
|
121
|
+
- CFARM_HOST: cfarm185.fsffrance.org
|
103
122
|
CFARM_PORT: 22
|
104
123
|
CFARM_TRIPLE: aarch64-lto-linux-gnu
|
105
124
|
CFARM_CC: "gcc -flto"
|
106
125
|
CFARM_CXX: "g++ -flto"
|
107
|
-
- CFARM_HOST:
|
126
|
+
- CFARM_HOST: cfarm400.cfarm.net
|
108
127
|
CFARM_PORT: 25465
|
109
128
|
CFARM_TRIPLE: loongarch64-linux-gnu
|
110
129
|
CFARM_CC: "gcc"
|
111
130
|
CFARM_CXX: "g++"
|
112
|
-
- CFARM_HOST:
|
131
|
+
- CFARM_HOST: cfarm230.cfarm.net
|
113
132
|
CFARM_PORT: 22
|
114
133
|
CFARM_TRIPLE: mips-linux-gnu
|
115
134
|
CFARM_CC: "gcc"
|
116
135
|
CFARM_CXX: "g++"
|
117
|
-
- CFARM_HOST:
|
136
|
+
- CFARM_HOST: cfarm211.cfarm.net
|
118
137
|
CFARM_PORT: 22
|
119
138
|
CFARM_TRIPLE: sparc64-linux-gnu
|
120
139
|
CFARM_CC: "gcc"
|
121
140
|
CFARM_CXX: "g++"
|
122
|
-
- CFARM_HOST:
|
141
|
+
- CFARM_HOST: cfarm211.cfarm.net
|
123
142
|
CFARM_PORT: 22
|
124
143
|
CFARM_TRIPLE: sparc64-linux-gnu
|
125
144
|
CFARM_CC: "gcc -m32"
|
126
145
|
CFARM_CXX: "g++ -m32"
|
127
|
-
- CFARM_HOST:
|
146
|
+
- CFARM_HOST: cfarm91.cfarm.net
|
128
147
|
CFARM_PORT: 22
|
129
148
|
CFARM_TRIPLE: riscv64-linux-gnu
|
130
149
|
CFARM_CC: "gcc"
|
131
150
|
CFARM_CXX: "g++"
|
132
|
-
- CFARM_HOST:
|
151
|
+
- CFARM_HOST: cfarm103.cfarm.net
|
133
152
|
CFARM_PORT: 22
|
134
153
|
CFARM_TRIPLE: aarch64-m1-linux-gnu
|
135
154
|
CFARM_CC: "gcc"
|
136
155
|
CFARM_CXX: "g++"
|
137
|
-
- CFARM_HOST:
|
156
|
+
- CFARM_HOST: cfarm112.cfarm.net
|
138
157
|
CFARM_PORT: 22
|
139
158
|
CFARM_TRIPLE: powerpc64le-linux-gnu
|
140
159
|
CFARM_CC: "gcc"
|
141
160
|
CFARM_CXX: "g++"
|
142
|
-
- CFARM_HOST:
|
161
|
+
- CFARM_HOST: cfarm111.cfarm.net
|
143
162
|
CFARM_PORT: 22
|
144
163
|
CFARM_TRIPLE: powerpc-ibm-aix7.1.5.0
|
145
164
|
CFARM_CC: "gcc"
|
data/ext/ffi_c/libffi/LICENSE
CHANGED
data/ext/ffi_c/libffi/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Status
|
2
2
|
======
|
3
3
|
|
4
|
-
libffi-3.4.
|
4
|
+
libffi-3.4.6 was released on February 18, 2024. Check the libffi web
|
5
5
|
page for updates: <URL:http://sourceware.org/libffi/>.
|
6
6
|
|
7
7
|
|
@@ -158,7 +158,7 @@ It's also possible to build libffi on Windows platforms with
|
|
158
158
|
Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
|
159
159
|
wrapper script during configuration like so:
|
160
160
|
|
161
|
-
path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP" CPPFLAGS="-DFFI_BUILDING_DLL"
|
161
|
+
path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP" CXXCPP="cl -nologo -EP" CPPFLAGS="-DFFI_BUILDING_DLL"
|
162
162
|
|
163
163
|
For 64-bit Windows builds, use ``CC="path/to/msvcc.sh -m64"`` and
|
164
164
|
``CXX="path/to/msvcc.sh -m64"``. You may also need to specify
|
@@ -201,11 +201,16 @@ History
|
|
201
201
|
|
202
202
|
See the git log for details at http://github.com/libffi/libffi.
|
203
203
|
|
204
|
-
|
204
|
+
3.4.6 Feb-18-2024
|
205
|
+
Fix long double regression on mips64 and alpha.
|
206
|
+
|
207
|
+
3.4.5 Feb-15-2024
|
205
208
|
Add support for wasm32.
|
206
|
-
Add support for
|
209
|
+
Add support for aarch64 branch target identification (bti).
|
207
210
|
Add support for ARCv3: ARC32 & ARC64.
|
208
|
-
|
211
|
+
Add support for HPPA64, and many HPPA fixes.
|
212
|
+
Add support for Haikuos on PowerPC.
|
213
|
+
Fixes for AIX, loongson, MIPS, power, sparc64, and x86 Darwin.
|
209
214
|
|
210
215
|
3.4.4 Oct-23-2022
|
211
216
|
Important aarch64 fixes, including support for linux builds
|
data/ext/ffi_c/libffi/configure
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#! /bin/sh
|
2
2
|
# Guess values for system-dependent variables and create Makefiles.
|
3
|
-
# Generated by GNU Autoconf 2.71 for libffi 3.4.
|
3
|
+
# Generated by GNU Autoconf 2.71 for libffi 3.4.6.
|
4
4
|
#
|
5
5
|
# Report bugs to <http://github.com/libffi/libffi/issues>.
|
6
6
|
#
|
@@ -621,8 +621,8 @@ MAKEFLAGS=
|
|
621
621
|
# Identity of this package.
|
622
622
|
PACKAGE_NAME='libffi'
|
623
623
|
PACKAGE_TARNAME='libffi'
|
624
|
-
PACKAGE_VERSION='3.4.
|
625
|
-
PACKAGE_STRING='libffi 3.4.
|
624
|
+
PACKAGE_VERSION='3.4.6'
|
625
|
+
PACKAGE_STRING='libffi 3.4.6'
|
626
626
|
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
|
627
627
|
PACKAGE_URL=''
|
628
628
|
|
@@ -1412,7 +1412,7 @@ if test "$ac_init_help" = "long"; then
|
|
1412
1412
|
# Omit some internal or obsolete options to make the list less imposing.
|
1413
1413
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
1414
1414
|
cat <<_ACEOF
|
1415
|
-
\`configure' configures libffi 3.4.
|
1415
|
+
\`configure' configures libffi 3.4.6 to adapt to many kinds of systems.
|
1416
1416
|
|
1417
1417
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
1418
1418
|
|
@@ -1484,7 +1484,7 @@ fi
|
|
1484
1484
|
|
1485
1485
|
if test -n "$ac_init_help"; then
|
1486
1486
|
case $ac_init_help in
|
1487
|
-
short | recursive ) echo "Configuration of libffi 3.4.
|
1487
|
+
short | recursive ) echo "Configuration of libffi 3.4.6:";;
|
1488
1488
|
esac
|
1489
1489
|
cat <<\_ACEOF
|
1490
1490
|
|
@@ -1620,7 +1620,7 @@ fi
|
|
1620
1620
|
test -n "$ac_init_help" && exit $ac_status
|
1621
1621
|
if $ac_init_version; then
|
1622
1622
|
cat <<\_ACEOF
|
1623
|
-
libffi configure 3.4.
|
1623
|
+
libffi configure 3.4.6
|
1624
1624
|
generated by GNU Autoconf 2.71
|
1625
1625
|
|
1626
1626
|
Copyright (C) 2021 Free Software Foundation, Inc.
|
@@ -2194,7 +2194,7 @@ cat >config.log <<_ACEOF
|
|
2194
2194
|
This file contains any messages produced by compilers while
|
2195
2195
|
running configure, to aid debugging if configure makes a mistake.
|
2196
2196
|
|
2197
|
-
It was created by libffi $as_me 3.4.
|
2197
|
+
It was created by libffi $as_me 3.4.6, which was
|
2198
2198
|
generated by GNU Autoconf 2.71. Invocation command line was
|
2199
2199
|
|
2200
2200
|
$ $0$ac_configure_args_raw
|
@@ -3913,7 +3913,7 @@ fi
|
|
3913
3913
|
|
3914
3914
|
# Define the identity of the package.
|
3915
3915
|
PACKAGE='libffi'
|
3916
|
-
VERSION='3.4.
|
3916
|
+
VERSION='3.4.6'
|
3917
3917
|
|
3918
3918
|
|
3919
3919
|
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
@@ -5556,11 +5556,11 @@ if test x$ac_prog_cxx_stdcxx = xno
|
|
5556
5556
|
then :
|
5557
5557
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
|
5558
5558
|
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
|
5559
|
-
if test ${
|
5559
|
+
if test ${ac_cv_prog_cxx_cxx11+y}
|
5560
5560
|
then :
|
5561
5561
|
printf %s "(cached) " >&6
|
5562
5562
|
else $as_nop
|
5563
|
-
|
5563
|
+
ac_cv_prog_cxx_cxx11=no
|
5564
5564
|
ac_save_CXX=$CXX
|
5565
5565
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
5566
5566
|
/* end confdefs.h. */
|
@@ -5602,11 +5602,11 @@ if test x$ac_prog_cxx_stdcxx = xno
|
|
5602
5602
|
then :
|
5603
5603
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
|
5604
5604
|
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
|
5605
|
-
if test ${
|
5605
|
+
if test ${ac_cv_prog_cxx_cxx98+y}
|
5606
5606
|
then :
|
5607
5607
|
printf %s "(cached) " >&6
|
5608
5608
|
else $as_nop
|
5609
|
-
|
5609
|
+
ac_cv_prog_cxx_cxx98=no
|
5610
5610
|
ac_save_CXX=$CXX
|
5611
5611
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
5612
5612
|
/* end confdefs.h. */
|
@@ -19523,7 +19523,7 @@ else $as_nop
|
|
19523
19523
|
ac_status=$?
|
19524
19524
|
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
19525
19525
|
test $ac_status = 0; }; }; then
|
19526
|
-
if $EGREP '(\.hidden|\.private_extern).*foo' conftest.s >/dev/null; then
|
19526
|
+
if $EGREP '(\.hidden|\.private_extern).*foo|foo.*,hidden' conftest.s >/dev/null; then
|
19527
19527
|
libffi_cv_hidden_visibility_attribute=yes
|
19528
19528
|
fi
|
19529
19529
|
fi
|
@@ -20588,7 +20588,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|
20588
20588
|
# report actual input values of CONFIG_FILES etc. instead of their
|
20589
20589
|
# values after options handling.
|
20590
20590
|
ac_log="
|
20591
|
-
This file was extended by libffi $as_me 3.4.
|
20591
|
+
This file was extended by libffi $as_me 3.4.6, which was
|
20592
20592
|
generated by GNU Autoconf 2.71. Invocation command line was
|
20593
20593
|
|
20594
20594
|
CONFIG_FILES = $CONFIG_FILES
|
@@ -20656,7 +20656,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
|
20656
20656
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
20657
20657
|
ac_cs_config='$ac_cs_config_escaped'
|
20658
20658
|
ac_cs_version="\\
|
20659
|
-
libffi config.status 3.4.
|
20659
|
+
libffi config.status 3.4.6
|
20660
20660
|
configured by $0, generated by GNU Autoconf 2.71,
|
20661
20661
|
with options \\"\$ac_cs_config\\"
|
20662
20662
|
|
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
|
|
2
2
|
|
3
3
|
AC_PREREQ([2.71])
|
4
4
|
|
5
|
-
AC_INIT([libffi],[3.4.
|
5
|
+
AC_INIT([libffi],[3.4.6],[http://github.com/libffi/libffi/issues])
|
6
6
|
AC_CONFIG_HEADERS([fficonfig.h])
|
7
7
|
|
8
8
|
AC_CANONICAL_TARGET
|
@@ -298,7 +298,7 @@ if test "x$GCC" = "xyes"; then
|
|
298
298
|
echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1 ; }' > conftest.c
|
299
299
|
libffi_cv_hidden_visibility_attribute=no
|
300
300
|
if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
301
|
-
if $EGREP '(\.hidden|\.private_extern).*foo' conftest.s >/dev/null; then
|
301
|
+
if $EGREP '(\.hidden|\.private_extern).*foo|foo.*,hidden' conftest.s >/dev/null; then
|
302
302
|
libffi_cv_hidden_visibility_attribute=yes
|
303
303
|
fi
|
304
304
|
fi
|
@@ -18,7 +18,7 @@
|
|
18
18
|
This manual is for libffi, a portable foreign function interface
|
19
19
|
library.
|
20
20
|
|
21
|
-
Copyright @copyright{} 2008--
|
21
|
+
Copyright @copyright{} 2008--2024 Anthony Green and Red Hat, Inc.
|
22
22
|
|
23
23
|
Permission is hereby granted, free of charge, to any person obtaining
|
24
24
|
a copy of this software and associated documentation files (the
|
@@ -1,4 +1,4 @@
|
|
1
|
-
@set UPDATED
|
2
|
-
@set UPDATED-MONTH
|
3
|
-
@set EDITION 3.4.
|
4
|
-
@set VERSION 3.4.
|
1
|
+
@set UPDATED 15 February 2024
|
2
|
+
@set UPDATED-MONTH February 2024
|
3
|
+
@set EDITION 3.4.6
|
4
|
+
@set VERSION 3.4.6
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -----------------------------------------------------------------*-C-*-
|
2
2
|
libffi @VERSION@
|
3
|
-
- Copyright (c) 2011, 2014, 2019, 2021, 2022 Anthony Green
|
3
|
+
- Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green
|
4
4
|
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
|
5
5
|
|
6
6
|
Permission is hereby granted, free of charge, to any person
|
@@ -220,21 +220,12 @@ FFI_EXTERN ffi_type ffi_type_sint64;
|
|
220
220
|
FFI_EXTERN ffi_type ffi_type_float;
|
221
221
|
FFI_EXTERN ffi_type ffi_type_double;
|
222
222
|
FFI_EXTERN ffi_type ffi_type_pointer;
|
223
|
-
|
224
|
-
#if @HAVE_LONG_DOUBLE@
|
225
223
|
FFI_EXTERN ffi_type ffi_type_longdouble;
|
226
|
-
#else
|
227
|
-
#define ffi_type_longdouble ffi_type_double
|
228
|
-
#endif
|
229
224
|
|
230
225
|
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
231
226
|
FFI_EXTERN ffi_type ffi_type_complex_float;
|
232
227
|
FFI_EXTERN ffi_type ffi_type_complex_double;
|
233
|
-
#if @HAVE_LONG_DOUBLE@
|
234
228
|
FFI_EXTERN ffi_type ffi_type_complex_longdouble;
|
235
|
-
#else
|
236
|
-
#define ffi_type_complex_longdouble ffi_type_complex_double
|
237
|
-
#endif
|
238
229
|
#endif
|
239
230
|
#endif /* LIBFFI_HIDE_BASIC_TYPES */
|
240
231
|
|
@@ -464,7 +455,7 @@ ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
|
|
464
455
|
|
465
456
|
#endif /* FFI_CLOSURES */
|
466
457
|
|
467
|
-
#
|
458
|
+
#ifdef FFI_GO_CLOSURES
|
468
459
|
|
469
460
|
typedef struct {
|
470
461
|
void *tramp;
|