mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
binutils: try to move headers around only when --host/--target differ (#215989)
Without the change `pkgsMusl.pkgsStatic.buildPackages.binutils.bintools` build fails as: $ ln: failed to create symbolic link './include': File exists This happens because both host and target are `x86_64-unknown-linux-musl`. But `hostPlatform` differs from `targetPlatform` by `isStatic` value. By `./configure`'s standard it's not yet a cross-compilation. The change tries to move things around only when tuples change.
This commit is contained in:
parent
b5ace1ffc0
commit
d381e51fb5
@ -234,7 +234,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# $out/$host/$target/include/* to $dev/include/*
|
||||
# TODO(trofi): fix installation paths upstream so we could remove this
|
||||
# code and have "lib" output unconditionally.
|
||||
postInstall = lib.optionalString (hostPlatform != targetPlatform) ''
|
||||
postInstall = lib.optionalString (hostPlatform.config != targetPlatform.config) ''
|
||||
ln -s $out/${hostPlatform.config}/${targetPlatform.config}/lib/* $out/lib/
|
||||
ln -s $out/${hostPlatform.config}/${targetPlatform.config}/include/* $dev/include/
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user