[前][次][番号順一覧][スレッド一覧]

ruby-changes:63246

From: nagachika <ko1@a...>
Date: Thu, 1 Oct 2020 21:15:55 +0900 (JST)
Subject: [ruby-changes:63246] 5445e04352 (ruby_2_7): merge revision(s) 0168094da28c146062db22e69cbd9316418310f9,cdef17096c03099f17ecf0af51f43faa0944f96d,b7d86e330c76b4f9615511307e1c40f4f2937c83:

https://git.ruby-lang.org/ruby.git/commit/?id=5445e04352

From 5445e0435260b449decf2ac16f9d09bae3cafe72 Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@r...>
Date: Thu, 1 Oct 2020 21:15:38 +0900
Subject: merge revision(s)
 0168094da28c146062db22e69cbd9316418310f9,cdef17096c03099f17ecf0af51f43faa0944f96d,b7d86e330c76b4f9615511307e1c40f4f2937c83:

	Use libSystem.dylib instead of libm.dylib and libc.dylib

	  Because macOS 11.0(Big Sur) was removed libc and libm from `/usr/lib`.

	libSystem.dylib is also symlink. Use libSystem.B.dylib

	Workaroud for macOS Big Sur(11.0)

diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb
index 57ded49..73f6f78 100644
--- a/test/fiddle/helper.rb
+++ b/test/fiddle/helper.rb
@@ -43,8 +43,7 @@ when /mingw/, /mswin/ https://github.com/ruby/ruby/blob/trunk/test/fiddle/helper.rb#L43
   crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase'
   libc_so = libm_so = "#{crtname}.dll"
 when /darwin/
-  libc_so = "/usr/lib/libc.dylib"
-  libm_so = "/usr/lib/libm.dylib"
+  libc_so = libm_so = "/usr/lib/libSystem.B.dylib"
 when /kfreebsd/
   libc_so = "/lib/libc.so.0.1"
   libm_so = "/lib/libm.so.1"
@@ -111,6 +110,11 @@ end https://github.com/ruby/ruby/blob/trunk/test/fiddle/helper.rb#L110
 libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so))
 libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so))
 
+# macOS 11.0+ removed libSystem.B.dylib from /usr/lib. But It works with dlopen.
+if RUBY_PLATFORM =~ /darwin/
+  libc_so = libm_so = "/usr/lib/libSystem.B.dylib"
+end
+
 if !libc_so || !libm_so
   ruby = EnvUtil.rubybin
   # When the ruby binary is 32-bit and the host is 64-bit,
diff --git a/version.h b/version.h
index 5d0a5e0..aa70f9b 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L2
 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
 #define RUBY_VERSION_TEENY 2
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 136
+#define RUBY_PATCHLEVEL 137
 
 #define RUBY_RELEASE_YEAR 2020
 #define RUBY_RELEASE_MONTH 10
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]