summaryrefslogtreecommitdiff
path: root/dev-ruby/ffi/files/use-libffi-closure-allocations-on-hppa.patch
blob: 6a76a91c08420417295684375bb3053afbc80b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
https://github.com/ffi/ffi/pull/1017

From 587822fa8d21292d39400d2276ca49d37a752135 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 9 Apr 2023 02:17:23 +0100
Subject: [PATCH 1/2] Use libffi closure allocations on hppa

We currently do this for Apple arm64, but we need to do it for hppa too.
--- 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
-- 
2.40.0