Fix PATH in intel compiler wrapper

We need to add the gcc in the PATH, but adding it directly to $PATH
doesn't work, as it will be restored to $path_backup before icc runs. So
for now we simply inject it to path_backup, but ideally we should find a
more robust solution.

Reviewed-by: Aleix Boné <abonerib@bsc.es>
This commit is contained in:
Rodrigo Arias 2025-07-21 16:23:53 +02:00
parent f0637b4569
commit 52fe43bfe1

View File

@ -400,7 +400,9 @@ let
echo "-L${cc}/lib" >> $out/nix-support/cc-ldflags
# Need the gcc in the path
echo 'export "PATH=${mygcc}/bin:$PATH"' >> $out/nix-support/cc-wrapper-hook
# FIXME: We should find a better way to modify the PATH instead of using
# this ugly hack. See https://jungle.bsc.es/git/rarias/bscpkgs/issues/9
echo 'path_backup="${mygcc}/bin:$path_backup"' >> $out/nix-support/cc-wrapper-hook
# Disable hardening by default
echo "" > $out/nix-support/add-hardening.sh