Merge pull request #13765 from carlocab/gcc-doctor-fix

This commit is contained in:
Carlo Cabrera 2022-08-26 23:03:46 +08:00 committed by GitHub
commit e9da52aca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -144,6 +144,7 @@ module Homebrew
gcc_dependents = Formula.installed.select do |formula|
next false unless formula.tap&.core_tap?
# FIXME: This includes formulae that have no runtime dependency on GCC.
formula.recursive_dependencies.map(&:name).include? "gcc"
rescue TapFormulaUnavailableError
false
@ -153,7 +154,7 @@ module Homebrew
badly_linked = gcc_dependents.select do |dependent|
keg = Keg.new(dependent.prefix)
keg.binary_executable_or_library_files.any? do |binary|
paths = binary.rpath.split(":")
paths = binary.rpaths
versioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/\d+$}) }
unversioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/current$}) }

View File

@ -97,7 +97,7 @@ module ELFShim
# An array of runtime search path entries, such as:
# ["/lib", "/usr/lib", "/usr/local/lib"]
def rpaths
rpath.split(":")
Array(rpath&.split(":"))
end
def interpreter