diff options
| author | Thomas Weißschuh <[email protected]> | 2025-02-17 07:27:54 +0000 |
|---|---|---|
| committer | Masahiro Yamada <[email protected]> | 2025-03-04 19:02:39 +0000 |
| commit | dfc1b168a8c4b376fa222b27b97c2c4ad4b786e1 (patch) | |
| tree | 048aad4bdb2a6679198e99af343feedea0cfe1e3 /scripts/extract-fwblobs | |
| parent | Linux 6.14-rc5 (diff) | |
| download | kernel-dfc1b168a8c4b376fa222b27b97c2c4ad4b786e1.tar.gz kernel-dfc1b168a8c4b376fa222b27b97c2c4ad4b786e1.zip | |
kbuild: userprogs: use correct lld when linking through clang
The userprog infrastructure links objects files through $(CC).
Either explicitly by manually calling $(CC) on multiple object files or
implicitly by directly compiling a source file to an executable.
The documentation at Documentation/kbuild/llvm.rst indicates that ld.lld
would be used for linking if LLVM=1 is specified.
However clang instead will use either a globally installed cross linker
from $PATH called ${target}-ld or fall back to the system linker, which
probably does not support crosslinking.
For the normal kernel build this is not an issue because the linker is
always executed directly, without the compiler being involved.
Explicitly pass --ld-path to clang so $(LD) is respected.
As clang 13.0.1 is required to build the kernel, this option is available.
Fixes: 7f3a59db274c ("kbuild: add infrastructure to build userspace programs")
Cc: [email protected] # needs wrapping in $(cc-option) for < 6.9
Signed-off-by: Thomas Weißschuh <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Diffstat (limited to 'scripts/extract-fwblobs')
0 files changed, 0 insertions, 0 deletions
