From 645a4ae28cb96401002e4c9277bf728b951d8aa1 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 9 Apr 2023 02:17:23 +0100 Subject: 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. --- ext/ffi_c/extconf.rb | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.1