ffi 1.15.0 → 1.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +1 -1
- data/README.md +4 -0
- data/ext/ffi_c/extconf.rb +5 -2
- data/lib/ffi.rb +1 -2
- data/lib/ffi/tools/const_generator.rb +2 -1
- data/lib/ffi/tools/struct_generator.rb +2 -1
- data/lib/ffi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b935d4af8929617d392e006c859332b37f754114850da947258561823bfb81b6
|
4
|
+
data.tar.gz: 7a56d828fed5ab247416d1425c70ac330704b16713922132e7ad6220df94195b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9afe880918848377b8ce402b0504833e5b3f0328ef8c878869f0ff0aa4c6f18d82c57cbe1617528416dc261e2fafa966dea08331b84c08beb49b75aa164f884d
|
7
|
+
data.tar.gz: e8632420a47345812ccc66bb72460705cd9bdbd034ae1bfed62920cb2851d6c8291cbad4540997c597a70dc4f8aa21111818e87b473d75dced69b7357be3e952
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
1.15.1 / 2021-05-22
|
2
|
+
-------------------
|
3
|
+
|
4
|
+
Fixed:
|
5
|
+
* Append -pthread to linker options. #893
|
6
|
+
* Use arm or aarch64 to identify Apple ARM CPU arch. #899
|
7
|
+
* Allow overriding `gcc` with the `CC` env var in `const_generator.rb` and `struct_generator.rb`. #897
|
8
|
+
|
9
|
+
|
1
10
|
1.15.0 / 2021-03-05
|
2
11
|
-------------------
|
3
12
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -62,6 +62,10 @@ On JRuby and TruffleRuby, there are no requirements to install the FFI gem, and
|
|
62
62
|
From rubygems:
|
63
63
|
|
64
64
|
[sudo] gem install ffi
|
65
|
+
|
66
|
+
From a Gemfile using git or GitHub
|
67
|
+
|
68
|
+
gem 'ffi', github: 'ffi/ffi', submodules: true
|
65
69
|
|
66
70
|
or from the git repository on github:
|
67
71
|
|
data/ext/ffi_c/extconf.rb
CHANGED
@@ -57,7 +57,10 @@ if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
57
57
|
append_ldflags "-Wl,--exclude-libs,ALL"
|
58
58
|
end
|
59
59
|
|
60
|
-
|
60
|
+
# Some linux archs need explicit linking to pthread, see https://github.com/ffi/ffi/issues/893
|
61
|
+
append_ldflags "-pthread"
|
62
|
+
|
63
|
+
ffi_alloc_default = RbConfig::CONFIG['host_os'] =~ /darwin/i && RbConfig::CONFIG['host'] =~ /arm|aarch64/i
|
61
64
|
if enable_config('libffi-alloc', ffi_alloc_default)
|
62
65
|
$defs << "-DUSE_FFI_ALLOC"
|
63
66
|
end
|
@@ -71,7 +74,7 @@ if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
71
74
|
File.open("Makefile", "a") do |mf|
|
72
75
|
mf.puts "LIBFFI_HOST=--host=#{RbConfig::CONFIG['host_alias']}" if RbConfig::CONFIG.has_key?("host_alias")
|
73
76
|
if RbConfig::CONFIG['host_os'] =~ /darwin/i
|
74
|
-
if RbConfig::CONFIG['host'] =~ /arm/i
|
77
|
+
if RbConfig::CONFIG['host'] =~ /arm|aarch64/i
|
75
78
|
mf.puts "LIBFFI_HOST=--host=aarch64-apple-#{RbConfig::CONFIG['host_os']}"
|
76
79
|
end
|
77
80
|
mf.puts "include ${srcdir}/libffi.darwin.mk"
|
data/lib/ffi.rb
CHANGED
@@ -124,7 +124,8 @@ module FFI
|
|
124
124
|
f.puts "\n\treturn 0;\n}"
|
125
125
|
f.flush
|
126
126
|
|
127
|
-
|
127
|
+
cc = ENV['CC'] || 'gcc'
|
128
|
+
output = `#{cc} #{options[:cppflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -x c -Wall -Werror #{f.path} -o #{binary} 2>&1`
|
128
129
|
|
129
130
|
unless $?.success? then
|
130
131
|
output = output.split("\n").map { |l| "\t#{l}" }.join "\n"
|
@@ -82,7 +82,8 @@ module FFI
|
|
82
82
|
f.puts "\n return 0;\n}"
|
83
83
|
f.flush
|
84
84
|
|
85
|
-
|
85
|
+
cc = ENV['CC'] || 'gcc'
|
86
|
+
output = `#{cc} #{options[:cppflags]} #{options[:cflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -x c -Wall -Werror #{f.path} -o #{binary} 2>&1`
|
86
87
|
|
87
88
|
unless $?.success? then
|
88
89
|
@found = false
|
data/lib/ffi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.15.
|
4
|
+
version: 1.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne Meissner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|