summaryrefslogtreecommitdiff
path: root/test/fiddle/helper.rb
diff options
context:
space:
mode:
authorZoltán Mizsei <zmizsei@extrowerk.com>2020-10-29 22:47:24 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-15 23:13:24 +0900
commit8f6cb5b70b5ca107260960a107e257ef202c9dc0 (patch)
tree544d321dcdc4886aff0bc5108ad94970714d5a84 /test/fiddle/helper.rb
parent95423215849ad26e1b928b3d36af021472bb185b (diff)
TEST: multiarch support for Haiku
Diffstat (limited to 'test/fiddle/helper.rb')
-rw-r--r--test/fiddle/helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb
index 13bd3ed4ea..f38f9036a3 100644
--- a/test/fiddle/helper.rb
+++ b/test/fiddle/helper.rb
@@ -111,6 +111,18 @@ when /aix/
end
end
end
+when /haiku/
+ libdir = '/system/lib'
+ case [0].pack('L!').size
+ when 4
+ # 32-bit ruby
+ libdir = '/system/lib/x86' if File.directory? '/system/lib/x86'
+ when 8
+ # 64-bit ruby
+ libdir = '/system/lib/' if File.directory? '/system/lib/'
+ end
+ libc_so = File.join(libdir, "libroot.so")
+ libm_so = File.join(libdir, "libroot.so")
else
libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/
libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/