From 8bc805a21177f40b00ddbff703bee1849f8ed888 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Thu, 2 May 2013 20:14:24 +0200 Subject: [PATCH] llvm: Build the LLVMgold.so plugin for ld.gold &c. Conflicts (simple): pkgs/development/compilers/llvm/default.nix --- pkgs/development/compilers/llvm/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/llvm/default.nix b/pkgs/development/compilers/llvm/default.nix index 3e95a41be6f8..abd3277d919e 100644 --- a/pkgs/development/compilers/llvm/default.nix +++ b/pkgs/development/compilers/llvm/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, perl, groff, cmake, python, libffi }: +{ stdenv, fetchurl, perl, groff, cmake, python, libffi, binutils_gold }: let version = "3.3"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "llvm-${version}"; src = fetchurl { @@ -21,8 +21,11 @@ stdenv.mkDerivation { preBuild = let LD = if stdenv.isDarwin then "DYLD" else "LD"; in "export ${LD}_LIBRARY_PATH='$$${LD}_LIBRARY_PATH:'`pwd`/lib"; - cmakeFlags = with stdenv; [ "-DCMAKE_BUILD_TYPE=Release" "-DLLVM_ENABLE_FFI=ON" ] - ++ lib.optional (!isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ]; + cmakeFlags = with stdenv; [ + "-DCMAKE_BUILD_TYPE=Release" + "-DLLVM_ENABLE_FFI=ON" + "-DLLVM_BINUTILS_INCDIR=${binutils_gold}/include" + ] ++ lib.optional (!isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ]; enableParallelBuilding = true;