spack/lib/spack/env
Harmen Stoppels d946c37cbb
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`.
2024-04-26 09:19:03 +02:00
..
aocc Adding AOCC compiler to SPACK community (#19345) 2020-10-20 10:50:09 -05:00
arm Armcompiler (#9840) 2019-01-08 16:31:25 -08:00
case-insensitive
cce Cray support: use linux platform for newer craype versions (#29392) 2022-11-04 14:52:11 -07:00
clang compilers/clang: add flang (#5503) 2017-10-10 13:52:10 -07:00
fj Add Fujitsu compiler to Spack. (#11287) 2019-05-21 20:31:14 -05:00
gcc Fix #254: libtool & distutils want certain compiler names. 2015-12-19 02:06:47 -08:00
intel Fix #254: libtool & distutils want certain compiler names. 2015-12-19 02:06:47 -08:00
nag Add symlink for NAG Fortran Compiler 2016-01-19 13:07:07 -06:00
nvhpc New compiler: nvhpc (NVIDIA HPC SDK) (#19294) 2020-10-16 14:04:27 -07:00
oneapi Support packages which need to explicitly refer to dpcpp by name (#27168) 2021-12-02 15:49:20 -08:00
pgi Modifications to get PGI working 2016-03-03 16:50:51 -06:00
rocmcc rocmcc compiler: initial commit based on aocc and clang (#28575) 2022-03-03 14:34:22 -07:00
xl Fix #254: libtool & distutils want certain compiler names. 2015-12-19 02:06:47 -08:00
xl_r Add support for IBM threaded compilers: xl*_r (#2894) 2017-01-25 16:26:17 -07:00
c++
c89
c99
cc ldflags=* are compiler flags, not linker flags (#43820) 2024-04-26 09:19:03 +02:00
cpp
f77 Fix for SPACK-35: Fortran not working properly 2014-07-09 01:28:23 -07:00
f90 Fix for SPACK-35: Fortran not working properly 2014-07-09 01:28:23 -07:00
f95 Fix for SPACK-35: Fortran not working properly 2014-07-09 01:28:23 -07:00
fc Fix for SPACK-35: Fortran not working properly 2014-07-09 01:28:23 -07:00
ftn Add ftn to lib/spack/env (#11180) 2019-04-17 13:12:25 -07:00
ld
ld.gold Add ld.gold and ld.lld compiler wrapper (#25626) 2021-08-27 13:16:26 +02:00
ld.lld Add ld.gold and ld.lld compiler wrapper (#25626) 2021-08-27 13:16:26 +02:00