From 3a1b58ec9d7190442150a09470a76405a17634f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Thu, 19 Jun 2025 20:00:02 +0200 Subject: [PATCH] trying more things --- pkgs/intel-oneapi/patch_intel.nix | 4 ++++ pkgs/llvm-ompss2/default.nix | 24 +++++++++++++++++------- test/compilers/icpx-ompss2.nix | 6 +++--- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/pkgs/intel-oneapi/patch_intel.nix b/pkgs/intel-oneapi/patch_intel.nix index ec9fb2d1..112ecce1 100644 --- a/pkgs/intel-oneapi/patch_intel.nix +++ b/pkgs/intel-oneapi/patch_intel.nix @@ -7,6 +7,7 @@ , overrideCC , gcc , hwloc +, glibc , libelf , libffi_3_3 , libpsm2 @@ -50,6 +51,9 @@ let echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags echo "-L${cc}/lib" >> $out/nix-support/cc-ldflags + # echo "-isystem ${lib.getDev glibc}/include" >> $out/nix-support/libc-cflags + # echo "-isystem ${lib.getDev glibc}/include" >> $out/nix-support/cc-cflags + echo "--gcc-toolchain=${gcc.cc}" >> $out/nix-support/cc-cflags # For some reason, If we don't resolve the realpath things go wrong diff --git a/pkgs/llvm-ompss2/default.nix b/pkgs/llvm-ompss2/default.nix index 33cb478f..6d99232c 100644 --- a/pkgs/llvm-ompss2/default.nix +++ b/pkgs/llvm-ompss2/default.nix @@ -6,6 +6,7 @@ , writeShellScript , openmp ? null , wrapCCWith +, glibc , llvmPackages_latest , ompss2rt ? null }: @@ -41,16 +42,25 @@ let resetIntelCCFlags = let tconf = builtins.replaceStrings ["-"] ["_"] targetConfig; in writeShellScript "remove-intel.sh" '' - if [ "$NIX_CC_WRAPPER_INTEL" = 1 ]; then + if [ "''${NIX_CC_WRAPPER_INTEL:-0}" = 1 ]; then unset NIX_CFLAGS_COMPILE_${tconf} - unset NIX_CFLAGS_COMPILE_BEFORE_${tconf} - unset NIX_CFLAGS_LINK_${tconf} - unset NIX_CXXSTDLIB_COMPILE_${tconf} - unset NIX_CXXSTDLIB_LINK_${tconf} - unset NIX_GNATFLAGS_COMPILE_${tconf} + + # unset NIX_CFLAGS_COMPILE_BEFORE_${tconf} + # + # unset NIX_CFLAGS_LINK_${tconf} + # unset NIX_CXXSTDLIB_COMPILE_${tconf} + # unset NIX_CXXSTDLIB_LINK_${tconf} + # unset NIX_GNATFLAGS_COMPILE_${tconf} + unset NIX_CC_WRAPPER_FLAGS_SET_${tconf} - # unset NIX_BINTOOLS_WRAPPER_FLAGS_${tconf} + # unset NIX_BINTOOLS_WRAPPER_FLAGS_${tconf} + + # export NIX_CFLAGS_COMPILE_${tconf}="-isystem ${lib.getDev glibc}/include" + # export NIX_CFLAGS_COMPILE_BEFORE_${tconf}="-isystem ${lib.getDev glibc}/include" + # export NIX_CC_WRAPPER_FLAGS_SET_${tconf}="-isystem ${lib.getDev glibc}/include" + + echo "CLEANED CC WRAPPER INTEL VARIABLES ${tconf}" fi ''; diff --git a/test/compilers/icpx-ompss2.nix b/test/compilers/icpx-ompss2.nix index 0cb3c17f..781215e8 100644 --- a/test/compilers/icpx-ompss2.nix +++ b/test/compilers/icpx-ompss2.nix @@ -46,7 +46,7 @@ intelPackages.stdenv.mkDerivation { env.NODES_HOME = nodes; - NIX_DEBUG = 0; + NIX_DEBUG = 1; buildPhase = '' cp $src hello.cpp set -x @@ -54,9 +54,9 @@ intelPackages.stdenv.mkDerivation { echo NODES_HOME=$NODES_HOME command -v $CXX - icpx -fsycl \ + icpx -Wno-deprecated-declarations -fsycl \ -fsycl-host-compiler=${clangOmpss2Nodes}/bin/clang++ \ - -fsycl-host-compiler-options='-fompss-2=libnodes' \ + -fsycl-host-compiler-options='-Wno-deprecated-declarations -fompss-2=libnodes' \ -lnodes -lnosv \ $NODES_HOME/lib/nodes-main-wrapper.o \ hello.cpp -o hello