summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2020-10-01 12:15:38 (GMT)
committernagachika <nagachika@ruby-lang.org>2020-10-01 12:15:38 (GMT)
commit5445e0435260b449decf2ac16f9d09bae3cafe72 (patch)
tree0ef6d6cdffce085b3711419d73a269c117508e99
parentb35bfa6abb7760e4323a4341dff840f59ddcfde1 (diff)
merge revision(s) 0168094da28c146062db22e69cbd9316418310f9,cdef17096c03099f17ecf0af51f43faa0944f96d,b7d86e330c76b4f9615511307e1c40f4f2937c83:v2_7_2
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)
-rw-r--r--test/fiddle/helper.rb8
-rw-r--r--version.h2
2 files changed, 7 insertions, 3 deletions
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/
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
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 @@
# 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