gcc: pass headerpad_max_install_names when building a bottle

Closes #27777.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
commitay 2018-05-12 14:49:51 +10:00 committed by ilovezfs
parent bb807fdda3
commit 9bbc716e1e

View file

@ -89,8 +89,9 @@ class Gcc < Formula
make_args = []
# Use -headerpad_max_install_names in the build,
# otherwise lto1 load commands cannot be edited on El Capitan
if MacOS.version == :el_capitan
# otherwise updated load commands won't fit in the Mach-O header.
# This is needed because `gcc` avoids the superenv shim.
if build.bottle?
make_args << "BOOT_LDFLAGS=-Wl,-headerpad_max_install_names"
end