From bc054004ac04b2500247c2efe504e6b3da444e61 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 18 Mar 2020 11:28:52 -0400 Subject: [PATCH] cc-wrapper, clang: `libstdcxxHook` should a propagated build input Lumping it in with the target platform libraries was incorrect, and caused eval failures when gcc couldn't be built for the target platform. --- pkgs/build-support/cc-wrapper/default.nix | 4 ++-- pkgs/development/compilers/llvm/5/default.nix | 4 +++- pkgs/development/compilers/llvm/6/default.nix | 4 +++- pkgs/development/compilers/llvm/7/default.nix | 4 +++- pkgs/development/compilers/llvm/8/default.nix | 4 +++- pkgs/development/compilers/llvm/9/default.nix | 4 +++- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index b078bf2fbbd3..b7c5ea6e20f2 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -10,7 +10,7 @@ , cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell , nativeTools, noLibc ? false, nativeLibc, nativePrefix ? "" , propagateDoc ? cc != null && cc ? man -, extraPackages ? [], extraBuildCommands ? "" +, extraTools ? [], extraPackages ? [], extraBuildCommands ? "" , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null , buildPackages ? {} , libcxx ? null @@ -212,7 +212,7 @@ stdenv.mkDerivation { ''; strictDeps = true; - propagatedBuildInputs = [ bintools ]; + propagatedBuildInputs = [ bintools ] ++ extraTools; depsTargetTargetPropagated = extraPackages; wrapperName = "CC_WRAPPER"; diff --git a/pkgs/development/compilers/llvm/5/default.nix b/pkgs/development/compilers/llvm/5/default.nix index fd4aaa363bf4..3c1b07e7ca70 100644 --- a/pkgs/development/compilers/llvm/5/default.nix +++ b/pkgs/development/compilers/llvm/5/default.nix @@ -50,8 +50,10 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - extraPackages = [ + extraTools = [ libstdcxxHook + ]; + extraPackages = [ targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc; diff --git a/pkgs/development/compilers/llvm/6/default.nix b/pkgs/development/compilers/llvm/6/default.nix index 85bb00d80c76..ba704f972c31 100644 --- a/pkgs/development/compilers/llvm/6/default.nix +++ b/pkgs/development/compilers/llvm/6/default.nix @@ -50,8 +50,10 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - extraPackages = [ + extraTools = [ libstdcxxHook + ]; + extraPackages = [ targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc; diff --git a/pkgs/development/compilers/llvm/7/default.nix b/pkgs/development/compilers/llvm/7/default.nix index 816649e62ad3..5124a5df00b3 100644 --- a/pkgs/development/compilers/llvm/7/default.nix +++ b/pkgs/development/compilers/llvm/7/default.nix @@ -57,8 +57,10 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - extraPackages = [ + extraTools = [ libstdcxxHook + ]; + extraPackages = [ targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc; diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix index d604dda5fe5e..105011595c8b 100644 --- a/pkgs/development/compilers/llvm/8/default.nix +++ b/pkgs/development/compilers/llvm/8/default.nix @@ -57,8 +57,10 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - extraPackages = [ + extraTools = [ libstdcxxHook + ]; + extraPackages = [ targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc; diff --git a/pkgs/development/compilers/llvm/9/default.nix b/pkgs/development/compilers/llvm/9/default.nix index 11e44b8bdfaa..d42e5187c3c7 100644 --- a/pkgs/development/compilers/llvm/9/default.nix +++ b/pkgs/development/compilers/llvm/9/default.nix @@ -57,8 +57,10 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - extraPackages = [ + extraTools = [ libstdcxxHook + ]; + extraPackages = [ targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc;