From 172ed10426df966ee5df76a1ef18f683698fe23f Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sun, 28 Jun 2015 20:58:31 +0200 Subject: [PATCH] Fix libcxxStdenv on Linux This corrects linkage failures arising from missing -lc++abi and resolves "unused argument" warnings arising due to -stdlib=libc++ serving no purpose when search paths are being supplied explicitly. --- pkgs/development/compilers/llvm/3.5/libc++/setup-hook.sh | 6 ++---- pkgs/development/compilers/llvm/3.6/libc++/setup-hook.sh | 6 ++---- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pkgs/development/compilers/llvm/3.5/libc++/setup-hook.sh b/pkgs/development/compilers/llvm/3.5/libc++/setup-hook.sh index 8a45be7e85a2..62ab46ac3100 100644 --- a/pkgs/development/compilers/llvm/3.5/libc++/setup-hook.sh +++ b/pkgs/development/compilers/llvm/3.5/libc++/setup-hook.sh @@ -1,4 +1,2 @@ -export NIX_CFLAGS_COMPILE+=" -isystem @out@/include/c++/v1" - -export NIX_CXXSTDLIB_COMPILE=" -stdlib=libc++" -export NIX_CXXSTDLIB_LINK=" -stdlib=libc++" +export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" +export NIX_CXXSTDLIB_LINK=" -lc++ -lc++abi" diff --git a/pkgs/development/compilers/llvm/3.6/libc++/setup-hook.sh b/pkgs/development/compilers/llvm/3.6/libc++/setup-hook.sh index 8a45be7e85a2..62ab46ac3100 100644 --- a/pkgs/development/compilers/llvm/3.6/libc++/setup-hook.sh +++ b/pkgs/development/compilers/llvm/3.6/libc++/setup-hook.sh @@ -1,4 +1,2 @@ -export NIX_CFLAGS_COMPILE+=" -isystem @out@/include/c++/v1" - -export NIX_CXXSTDLIB_COMPILE=" -stdlib=libc++" -export NIX_CXXSTDLIB_LINK=" -stdlib=libc++" +export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" +export NIX_CXXSTDLIB_LINK=" -lc++ -lc++abi" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6cf9fed11ae2..b8ef6fc1c5d4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3531,7 +3531,7 @@ let libc = glibc; binutils = binutils; inherit coreutils zlib; - extraPackages = [ libcxx ]; + extraPackages = [ libcxx libcxxabi ]; nativeTools = false; nativeLibc = false; };