Hpc_sdk installer script overwrites PATH

It seems the hpc_sdk installer script
nvhpc_2022_225_Linux_x86_64_cuda_11.7/install_components/install modifies the existing PATH variable by prepending /usr/bin:/bin
That seems like an odd behavior, as it will cause things like loaded modules (or similarly modified PATHs) to be overridden. In my specific case, I wanted to use a gcc version different from my system default. Is that not supported? or is there a different mechanism to enable that - short of modifying the installer script, of course.
As per the path, this is on x86 Linux, v22.5, CentOS

Has anyone encountered this and has thoughts? Or am I doing something out of the ordinary?

Alex

Hi Alex,

In my specific case, I wanted to use a gcc version different from my system default. Is that not supported?

When using non-default GNU installations for the C++ STL, the best method is to use the compilation flag “–gcc-toolchain=<path_to_gcc_bin>”.

Hope this helps,
Mat

It does help, thanks Mat.
I admit I was a bit thrown off by the documentation stating that changes to the gcc environment would require a re-install of the hpc_sdk.

Alex