From 8836ca435936209d8e71977f2eb94485a3220735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Mon, 19 May 2025 19:25:37 +0200 Subject: [PATCH] intel: more messing around --- pkgs/intel-oneapi/patch_intel.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/intel-oneapi/patch_intel.nix b/pkgs/intel-oneapi/patch_intel.nix index b5cde4d..d5427dc 100644 --- a/pkgs/intel-oneapi/patch_intel.nix +++ b/pkgs/intel-oneapi/patch_intel.nix @@ -46,6 +46,12 @@ let in (wrapCCWith { inherit cc; extraBuildCommands = '' + 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${cc}/lib" >> $out/nix-support/cc-ldflags + + echo "--gcc-toolchain=${gcc.cc}" >> $out/nix-support/cc-cflags + # For some reason, If we don't resolve the realpath things go wrong for stddef in ${cc}/lib/clang/*/include/stddef.h ; do dir=$(dirname $(realpath "$stddef")) @@ -55,11 +61,9 @@ let echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags echo "-isystem ${cc}/include/intel64" >> $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 - echo "-L${cc}/lib" >> $out/nix-support/cc-ldflags - - echo "--gcc-toolchain=${gcc.cc}" >> $out/nix-support/libcxx-cxxflags + for dir in ${gcc.cc}/lib/gcc/${targetConfig}/*/include; do + echo "-isystem $dir" >> $out/nix-support/cc-cflags + done for dir in ${gcc.cc}/include/c++/*; do echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags