diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-05-13 11:31:24 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-05-14 23:30:37 -0400 |
commit | 330ca731e88ec015181c43d92ae8f7c77cf0226a (patch) | |
tree | 1e840031c407cd50702ff78d05daca2f28c45c46 /pkgs/build-support | |
parent | d7160f39bd46e8ee86e95cbaf7a8f3d5685ab30c (diff) | |
download | nixlib-330ca731e88ec015181c43d92ae8f7c77cf0226a.tar nixlib-330ca731e88ec015181c43d92ae8f7c77cf0226a.tar.gz nixlib-330ca731e88ec015181c43d92ae8f7c77cf0226a.tar.bz2 nixlib-330ca731e88ec015181c43d92ae8f7c77cf0226a.tar.lz nixlib-330ca731e88ec015181c43d92ae8f7c77cf0226a.tar.xz nixlib-330ca731e88ec015181c43d92ae8f7c77cf0226a.tar.zst nixlib-330ca731e88ec015181c43d92ae8f7c77cf0226a.zip |
treewide: Get rid of all uses of crossConfig
The hack of using `crossConfig` to enforce stricter handling of dependencies is replaced with a dedicated `strictDeps` for that purpose. (Experience has shown that my punning was a terrible idea that made more difficult and embarrising to teach teach.) Now that is is clear, a few packages now use `strictDeps`, to fix various bugs: - bintools-wrapper and cc-wrapper
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 1 | ||||
-rw-r--r-- | pkgs/build-support/bintools-wrapper/setup-hook.sh | 2 | ||||
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 1 | ||||
-rw-r--r-- | pkgs/build-support/cc-wrapper/setup-hook.sh | 2 |
4 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index a5084808c3bc..17ec2ec7ad75 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -186,6 +186,7 @@ stdenv.mkDerivation { else throw "unknown emulation for platform: " + targetPlatform.config; in targetPlatform.platform.bfdEmulation or (fmt + sep + arch); + strictDeps = true; depsTargetTargetPropagated = extraPackages; setupHook = ./setup-hook.sh; diff --git a/pkgs/build-support/bintools-wrapper/setup-hook.sh b/pkgs/build-support/bintools-wrapper/setup-hook.sh index 48a00b0b9b07..a093ef8f3b45 100644 --- a/pkgs/build-support/bintools-wrapper/setup-hook.sh +++ b/pkgs/build-support/bintools-wrapper/setup-hook.sh @@ -8,7 +8,7 @@ set -u # native compile. # # TODO(@Ericson2314): No native exception -[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0 +[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0 bintoolsWrapper_addLDVars () { case $depHostOffset in diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 8de2366ff5f5..7cd02c4b24c6 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -201,6 +201,7 @@ stdenv.mkDerivation { ln -s $ccPath/${targetPrefix}ghdl $out/bin/${targetPrefix}ghdl ''; + strictDeps = true; propagatedBuildInputs = [ bintools ]; depsTargetTargetPropagated = extraPackages; diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh index 29a7306b9b7e..6e6354860780 100644 --- a/pkgs/build-support/cc-wrapper/setup-hook.sh +++ b/pkgs/build-support/cc-wrapper/setup-hook.sh @@ -60,7 +60,7 @@ set -u # native compile. # # TODO(@Ericson2314): No native exception -[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0 +[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0 # It's fine that any other cc-wrapper will redefine this. Bash functions close # over no state, and there's no @-substitutions within, so any redefined |