intel: reorder wrapper isystems

This commit is contained in:
Aleix Boné 2025-05-19 18:21:03 +02:00
parent bdbfd77446
commit 8ffb971348
Signed by: abonerib
SSH Key Fingerprint: SHA256:Jmq7aNH8XDdGy7E9dqfqrc/LRaVqhnFgDgdxlFw/pl8

View File

@ -46,6 +46,12 @@ let
in (wrapCCWith {
inherit cc;
extraBuildCommands = ''
# 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
@ -68,12 +74,6 @@ let
# 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: {