Fix libcxx include path

This commit is contained in:
Rodrigo Arias 2020-07-21 16:31:31 +02:00
parent 10b061aa96
commit 1e54fbdc43
3 changed files with 9 additions and 4 deletions

View File

@ -4,7 +4,6 @@
, nanos6 , nanos6
, icc-unwrapped , icc-unwrapped
, wrapCCWith , wrapCCWith
, libstdcxxHook
, intel-license , intel-license
}: }:

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
version = "11.0.0"; version = "11.0.0";
pname = "clang-ompss2"; pname = "clang-ompss2";
enableParallelBuilding = true; enableParallelBuilding = true;
#isClang = true; isClang = true;
#isGNU = true; #isGNU = true;
isClangWithOmpss = true; isClangWithOmpss = true;

View File

@ -4,7 +4,6 @@
, nanos6 , nanos6
, clang-ompss2-unwrapped , clang-ompss2-unwrapped
, wrapCCWith , wrapCCWith
, libstdcxxHook
}: }:
@ -13,12 +12,19 @@ let
inherit gcc nanos6; inherit gcc nanos6;
in wrapCCWith rec { in wrapCCWith rec {
cc = clang-ompss2-unwrapped; cc = clang-ompss2-unwrapped;
extraPackages = [ libstdcxxHook ];
extraBuildCommands = '' extraBuildCommands = ''
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $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/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
echo "-L${gcc.cc.lib}/lib" >> $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 "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
echo "# Hack to include NANOS6_HOME" >> $out/nix-support/setup-hook echo "# Hack to include NANOS6_HOME" >> $out/nix-support/setup-hook