Merge pull request #13765 from carlocab/gcc-doctor-fix
This commit is contained in:
commit
e9da52aca1
@ -144,6 +144,7 @@ module Homebrew
|
|||||||
gcc_dependents = Formula.installed.select do |formula|
|
gcc_dependents = Formula.installed.select do |formula|
|
||||||
next false unless formula.tap&.core_tap?
|
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"
|
formula.recursive_dependencies.map(&:name).include? "gcc"
|
||||||
rescue TapFormulaUnavailableError
|
rescue TapFormulaUnavailableError
|
||||||
false
|
false
|
||||||
@ -153,7 +154,7 @@ module Homebrew
|
|||||||
badly_linked = gcc_dependents.select do |dependent|
|
badly_linked = gcc_dependents.select do |dependent|
|
||||||
keg = Keg.new(dependent.prefix)
|
keg = Keg.new(dependent.prefix)
|
||||||
keg.binary_executable_or_library_files.any? do |binary|
|
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+$}) }
|
versioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/\d+$}) }
|
||||||
unversioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/current$}) }
|
unversioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/current$}) }
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ module ELFShim
|
|||||||
# An array of runtime search path entries, such as:
|
# An array of runtime search path entries, such as:
|
||||||
# ["/lib", "/usr/lib", "/usr/local/lib"]
|
# ["/lib", "/usr/lib", "/usr/local/lib"]
|
||||||
def rpaths
|
def rpaths
|
||||||
rpath.split(":")
|
Array(rpath&.split(":"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def interpreter
|
def interpreter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user