diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2024-04-26 09:19:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-26 09:19:03 +0200 |
commit | d946c37cbb7a41acbb2b34fc98078acc96533705 (patch) | |
tree | f77b60d589ed51631eccc7c16c1b1c5b9b1e0b0f /share | |
parent | 47a9f0bdf712b2d2c36d867b016bf871dd6fa77f (diff) | |
download | spack-d946c37cbb7a41acbb2b34fc98078acc96533705.tar.gz spack-d946c37cbb7a41acbb2b34fc98078acc96533705.tar.bz2 spack-d946c37cbb7a41acbb2b34fc98078acc96533705.tar.xz spack-d946c37cbb7a41acbb2b34fc98078acc96533705.zip |
ldflags=* are compiler flags, not linker flags (#43820)
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`.
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions