mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
This reverts commit bd47a8d660
.
`libc_so` and `libm_so` are `nil` at line 124 because Big Sur doesn't have `/usr/lib/libSystem.B.dylib`.
The reassignment at line 127 is necessary in this case.
This commit is contained in:
parent
30d4a7ad9a
commit
2427393b4d
Notes:
git
2020-12-08 21:58:38 +09:00
Merged-By: mrkn <mrkn@ruby-lang.org>
1 changed files with 5 additions and 1 deletions
|
@ -55,7 +55,6 @@ when /mingw/, /mswin/
|
|||
crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase'
|
||||
libc_so = libm_so = "#{crtname}.dll"
|
||||
when /darwin/
|
||||
# macOS 11.0+ removed libSystem.B.dylib from /usr/lib. But It works with dlopen.
|
||||
libc_so = libm_so = "/usr/lib/libSystem.B.dylib"
|
||||
when /kfreebsd/
|
||||
libc_so = "/lib/libc.so.0.1"
|
||||
|
@ -123,6 +122,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,
|
||||
|
|
Loading…
Reference in a new issue