diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-12-12 22:23:04 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2023-12-13 17:57:25 +0000 |
commit | fccb48062fb09cb52837d2e7e4ee008c74011798 (patch) | |
tree | f4d0433299cf847f92884811055c3bac7f107e70 | |
parent | 14c5d38b5326311cb5f6e11a2740d27bea6d83bf (diff) |
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)
-rw-r--r-- | pkgs/stdenv/darwin/make-bootstrap-tools.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 1324c78c5fd64..384567739d0e8 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -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; |