From 1cb628c2e718d1dd84fd498039cd52015c363b4b Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 27 Jan 2014 12:50:21 -0500 Subject: [PATCH] clang: the --sysroot purity trick doesn't take care of the -dynamic-linker setting Signed-off-by: Shea Levy --- .../compilers/llvm/3.4/clang-purity.patch | 19 +++++++++++++++++++ pkgs/development/compilers/llvm/3.4/clang.nix | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/compilers/llvm/3.4/clang-purity.patch diff --git a/pkgs/development/compilers/llvm/3.4/clang-purity.patch b/pkgs/development/compilers/llvm/3.4/clang-purity.patch new file mode 100644 index 00000000000..c7021a58f9b --- /dev/null +++ b/pkgs/development/compilers/llvm/3.4/clang-purity.patch @@ -0,0 +1,19 @@ +diff -Naur clang-3.4-orig/lib/Driver/Tools.cpp clang-3.4/lib/Driver/Tools.cpp +--- clang-3.4-orig/lib/Driver/Tools.cpp 2013-12-08 21:59:27.000000000 -0500 ++++ clang-3.4/lib/Driver/Tools.cpp 2014-01-27 12:48:29.421872597 -0500 +@@ -6477,15 +6477,6 @@ + } + } + +- if (ToolChain.getArch() == llvm::Triple::arm || +- ToolChain.getArch() == llvm::Triple::thumb || +- (!Args.hasArg(options::OPT_static) && +- !Args.hasArg(options::OPT_shared))) { +- CmdArgs.push_back("-dynamic-linker"); +- CmdArgs.push_back(Args.MakeArgString( +- D.DyldPrefix + getLinuxDynamicLinker(Args, ToolChain))); +- } +- + CmdArgs.push_back("-o"); + CmdArgs.push_back(Output.getFilename()); + diff --git a/pkgs/development/compilers/llvm/3.4/clang.nix b/pkgs/development/compilers/llvm/3.4/clang.nix index 6f174a411cb..eafbc28661f 100644 --- a/pkgs/development/compilers/llvm/3.4/clang.nix +++ b/pkgs/development/compilers/llvm/3.4/clang.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { (cd llvm-${version} && patch -Np1 -i ${./llvm-separate-build.patch}) ''; - patches = [ ./clang-separate-build.patch ]; + patches = [ ./clang-separate-build.patch ./clang-purity.patch ]; buildInputs = [ cmake libedit libxml2 ];