diff options
author | Vladimir Still <xstill@fi.muni.cz> | 2014-01-26 22:51:58 +0100 |
---|---|---|
committer | Vladimir Still <xstill@fi.muni.cz> | 2014-01-26 22:51:58 +0100 |
commit | 69af3f4a7875087c4659e573488f4a61845cea2f (patch) | |
tree | b371b70e2c9133a708a5b1bc44a9de7a900cc602 /pkgs/development | |
parent | b5a560d76adbde569d83aee17909a50202efc0bd (diff) | |
download | nixpkgs-69af3f4a7875087c4659e573488f4a61845cea2f.tar nixpkgs-69af3f4a7875087c4659e573488f4a61845cea2f.tar.gz nixpkgs-69af3f4a7875087c4659e573488f4a61845cea2f.tar.bz2 nixpkgs-69af3f4a7875087c4659e573488f4a61845cea2f.tar.lz nixpkgs-69af3f4a7875087c4659e573488f4a61845cea2f.tar.xz nixpkgs-69af3f4a7875087c4659e573488f4a61845cea2f.tar.zst nixpkgs-69af3f4a7875087c4659e573488f4a61845cea2f.zip |
clang_31: Allow clang to find system includes in gcc dirs.
Backported fix.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/llvm/3.1/clang.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/compilers/llvm/3.1/clang.nix b/pkgs/development/compilers/llvm/3.1/clang.nix index 48e4c4946f3..8e67583c54a 100644 --- a/pkgs/development/compilers/llvm/3.1/clang.nix +++ b/pkgs/development/compilers/llvm/3.1/clang.nix @@ -1,6 +1,9 @@ { stdenv, fetchurl, perl, groff, llvm, cmake }: -let version = "3.1"; in +let + version = "3.1"; + gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc; +in stdenv.mkDerivation { name = "clang-${version}"; @@ -14,6 +17,7 @@ stdenv.mkDerivation { "-DCLANG_PATH_TO_LLVM_BUILD=${llvm}" "-DCMAKE_BUILD_TYPE=Release" "-DLLVM_TARGETS_TO_BUILD=all" + "-DGCC_INSTALL_PREFIX=${gccReal}" ] ++ stdenv.lib.optionals (stdenv.gcc.libc != null) [ "-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include/" ]; @@ -31,7 +35,7 @@ stdenv.mkDerivation { homepage = http://clang.llvm.org/; description = "A C language family frontend for LLVM"; license = "BSD"; - maintainers = with stdenv.lib.maintainers; [viric shlevy]; + maintainers = with stdenv.lib.maintainers; [viric shlevy vlstill]; platforms = with stdenv.lib.platforms; all; }; } |