d946c37cbb
We run `extend spack_flags_list SPACK_LDFLAGS` for `$mode in ld|ccld`. That's problematic, cause `ccld` needs `-Wl,--flag` whereas `ld` needs `--flag` directly. Only `-L` and `-l` are common to compiler & linker. In all build systems `LDFLAGS` is for the compiler not the linker, cause any linker flag `-x` can be passed as a compiler flag `-Wl,-x`, and there are many compiler flags that affect the linker invocation, like `-fopenmp`, `-fuse-ld=`, `-fsanitize=` etc. So don't pass `LDFLAGS` to the linker directly. This way users can set `ldflags: -Wl,--allow-shlib-undefined` in compilers.yaml to work around an issue where the linker tries to resolve the `libcuda.so.1` stub lib which cannot be located by design in `cuda`. |
||
---|---|---|
.. | ||
aocc | ||
arm | ||
case-insensitive | ||
cce | ||
clang | ||
fj | ||
gcc | ||
intel | ||
nag | ||
nvhpc | ||
oneapi | ||
pgi | ||
rocmcc | ||
xl | ||
xl_r | ||
c++ | ||
c89 | ||
c99 | ||
cc | ||
cpp | ||
f77 | ||
f90 | ||
f95 | ||
fc | ||
ftn | ||
ld | ||
ld.gold | ||
ld.lld |