From fc2e51e7c6b5b04b087a3a9c34b5aabaf2c89002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Wed, 8 Oct 2025 12:38:48 +0200 Subject: [PATCH] Revert "Reorder includes in intel 202{4,5} wrapper" This reverts commit 9cab8161656dd62a2929bba3e4c84f667d8f1b5a. --- pkgs/intel-oneapi/patch_intel.nix | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/pkgs/intel-oneapi/patch_intel.nix b/pkgs/intel-oneapi/patch_intel.nix index 8428d3f3..be08f6cf 100644 --- a/pkgs/intel-oneapi/patch_intel.nix +++ b/pkgs/intel-oneapi/patch_intel.nix @@ -49,25 +49,14 @@ let in (wrapCCWith { inherit cc; extraBuildCommands = '' + 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 - 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")) - echo "-isystem $dir" >> $out/nix-support/cc-cflags - done - - echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags - echo "-isystem ${cc}/include/intel64" >> $out/nix-support/cc-cflags - - for dir in ${gcc.cc}/lib/gcc/${targetConfig}/*/include; do - echo "-isystem $dir" >> $out/nix-support/cc-cflags - done + echo "--gcc-toolchain=${gcc.cc}" >> $out/nix-support/libcxx-cxxflags for dir in ${gcc.cc}/include/c++/*; do echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags @@ -80,8 +69,16 @@ let # this ugly hack. See https://jungle.bsc.es/git/rarias/bscpkgs/issues/9 echo 'path_backup="${gcc.cc}/bin:$path_backup"' >> $out/nix-support/cc-wrapper-hook + # Disable hardening by default echo "" > $out/nix-support/add-hardening.sh + + # 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")) + echo "-isystem $dir" >> $out/nix-support/cc-cflags + done + '' + extraBuildCommands; } // (removeAttrs args ["cc" "extraBuildCommands" "extraInstall"]) ).overrideAttrs (old: {