From 1e54fbdc43edf9dc7f5f3734fec9b8754626673f Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 21 Jul 2020 16:31:31 +0200 Subject: [PATCH] Fix libcxx include path --- bsc/intel-compiler/default.nix | 1 - bsc/llvm-ompss2/clang.nix | 2 +- bsc/llvm-ompss2/default.nix | 10 ++++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bsc/intel-compiler/default.nix b/bsc/intel-compiler/default.nix index 2c6f82b..14ae4b8 100644 --- a/bsc/intel-compiler/default.nix +++ b/bsc/intel-compiler/default.nix @@ -4,7 +4,6 @@ , nanos6 , icc-unwrapped , wrapCCWith -, libstdcxxHook , intel-license }: diff --git a/bsc/llvm-ompss2/clang.nix b/bsc/llvm-ompss2/clang.nix index f9d6d34..b418760 100644 --- a/bsc/llvm-ompss2/clang.nix +++ b/bsc/llvm-ompss2/clang.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { version = "11.0.0"; pname = "clang-ompss2"; enableParallelBuilding = true; - #isClang = true; + isClang = true; #isGNU = true; isClangWithOmpss = true; diff --git a/bsc/llvm-ompss2/default.nix b/bsc/llvm-ompss2/default.nix index fdd789a..78c7e94 100644 --- a/bsc/llvm-ompss2/default.nix +++ b/bsc/llvm-ompss2/default.nix @@ -4,7 +4,6 @@ , nanos6 , clang-ompss2-unwrapped , wrapCCWith -, libstdcxxHook }: @@ -13,12 +12,19 @@ let inherit gcc nanos6; in wrapCCWith rec { cc = clang-ompss2-unwrapped; - extraPackages = [ libstdcxxHook ]; extraBuildCommands = '' echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags + + for dir in ${gcc.cc}/include/c++/*; do + echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags + done + for dir in ${gcc.cc}/include/c++/*/${targetConfig}; do + echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags + done + echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags echo "# Hack to include NANOS6_HOME" >> $out/nix-support/setup-hook