darwin/make-bootstrap-tools.nix: set -headerpad_max_install_names for coreutils

Without the change bootstrapTools build fails as:
https://cache.nixos.org/log/g5wyq9xqshan6m3kl21bjn1z88hx48rh-stdenv-bootstrap-tools.drv

    error: install_name_tool: changing install names or rpaths can't be redone for: /nix/store/0hxg356h7lnl2hck23wrdpbib3cckx41-stdenv-bootstrap-tools/bin/tac (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
This commit is contained in:
Sergei Trofimovich 2023-12-12 22:23:04 +00:00
parent 14c5d38b53
commit fccb48062f

View file

@ -32,11 +32,16 @@ let cross = if crossSystem != null
in with import pkgspath ({ inherit localSystem overlays; } // cross // custom-bootstrap);
rec {
coreutils_ = coreutils.override (args: {
coreutils_ = (coreutils.override (args: {
# We want coreutils without ACL support.
aclSupport = false;
# Cannot use a single binary build, or it gets dynamically linked against gmp.
singleBinary = false;
})).overrideAttrs (oa: {
# Increase header size to be able to inject extra RPATHs. Otherwise
# x86_64-darwin build fails as:
# https://cache.nixos.org/log/g5wyq9xqshan6m3kl21bjn1z88hx48rh-stdenv-bootstrap-tools.drv
NIX_LDFLAGS = (oa.NIX_LDFLAGS or "") + " -headerpad_max_install_names";
});
cctools_ = darwin.cctools;