Exclude GCC formulae from RPATH modification for GCC
This commit is contained in:
parent
532460c098
commit
1c0eac7874
@ -35,10 +35,15 @@ class Keg
|
|||||||
|
|
||||||
# Add GCC's lib directory (as of GCC 12+) to RPATH when there is existing linkage.
|
# Add GCC's lib directory (as of GCC 12+) to RPATH when there is existing linkage.
|
||||||
# This fixes linkage for newly-poured bottles.
|
# This fixes linkage for newly-poured bottles.
|
||||||
# TODO: Replace with
|
if !name.match?(Version.formula_optionally_versioned_regex(:gcc)) &&
|
||||||
# rpath.map! { |path| path = path.sub(%r{lib/gcc/\d+$}, "lib/gcc/current") }
|
rpath.any? { |rp| rp.match?(%r{lib/gcc/\d+$}) }
|
||||||
# when Homebrew/homebrew-core#106755 is merged.
|
# TODO: Replace with
|
||||||
rpath.prepend HOMEBREW_PREFIX/"opt/gcc/lib/gcc/current" if rpath.any? { |rp| rp.match?(%r{lib/gcc/\d+$}) }
|
# rpath.map! { |path| path = path.sub(%r{lib/gcc/\d+$}, "lib/gcc/current") }
|
||||||
|
# when
|
||||||
|
# 1. Homebrew/homebrew-core#106755 is merged
|
||||||
|
# 2. No formula has a runtime dependency on a versioned GCC (see `envoy.rb`)
|
||||||
|
rpath.prepend HOMEBREW_PREFIX/"opt/gcc/lib/gcc/current"
|
||||||
|
end
|
||||||
|
|
||||||
rpath.join(":")
|
rpath.join(":")
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user