From 8f6cb5b70b5ca107260960a107e257ef202c9dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Thu, 29 Oct 2020 22:47:24 +0100 Subject: [PATCH] TEST: multiarch support for Haiku --- test/fiddle/helper.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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] == ?/