Merge pull request #13659 from carlocab/more-gcc-rpath

linux/super: add unversioned GCC lib directory to RPATH
This commit is contained in:
Carlo Cabrera 2022-08-11 12:04:24 +08:00 committed by GitHub
commit 4a623e0a25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -51,6 +51,7 @@ module Superenv
def determine_rpath_paths(formula)
PATH.new(
*formula&.lib,
"#{HOMEBREW_PREFIX}/opt/gcc/lib/gcc/current",
PATH.new(run_time_deps.map { |dep| dep.opt_lib.to_s }).existing,
"#{HOMEBREW_PREFIX}/lib",
)

View File

@ -72,6 +72,9 @@ class LinkageChecker
@unwanted_system_dylibs = @system_dylibs.reject do |s|
SYSTEM_LIBRARY_ALLOWLIST.include? File.basename(s)
end
@undeclared_deps -= [CompilerSelector.preferred_gcc, "glibc"]
# FIXME: Remove this when these dependencies are injected correctly (e.g. through `DependencyCollector`)
# See discussion at
# https://github.com/Homebrew/brew/pull/13577
@undeclared_deps -= [CompilerSelector.preferred_gcc, "glibc", "gcc"]
end
end