summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-09 02:17:23 +0100
committerSam James <sam@gentoo.org>2023-04-12 04:59:17 +0100
commit645a4ae28cb96401002e4c9277bf728b951d8aa1 (patch)
tree91938c640bb89b247e3e4353ad5dc25dc3156bf5
parent0b4d1a2c5fb4fa3aa8cc4c5c0dc7a59ca2406a87 (diff)
downloadffi-645a4ae28cb96401002e4c9277bf728b951d8aa1.tar.gz
Use libffi closure allocations on hppa
We currently do this for Apple arm64, but we need to do it for hppa too. The test suite passes for both ffi and dependent gems with this. Previously they would segfault.
-rwxr-xr-xext/ffi_c/extconf.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/ffi_c/extconf.rb b/ext/ffi_c/extconf.rb
index 2484543..b5bdc05 100755
--- a/ext/ffi_c/extconf.rb
+++ b/ext/ffi_c/extconf.rb
@@ -61,6 +61,7 @@ if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
append_ldflags "-pthread"
ffi_alloc_default = RbConfig::CONFIG['host_os'] =~ /darwin/i && RbConfig::CONFIG['host'] =~ /arm|aarch64/i
+ ffi_alloc_default = ffi_alloc_default || RbConfig::CONFIG['host'] =~ /hppa/i
if enable_config('libffi-alloc', ffi_alloc_default)
$defs << "-DUSE_FFI_ALLOC"
end