Commit ea45f1e8 authored by Tony Ambardar's avatar Tony Ambardar Committed by Greg Kroah-Hartman
Browse files

selftests/bpf: Fix cross-compiling urandom_read



[ Upstream commit fd526e12 ]

Linking of urandom_read and liburandom_read.so prefers LLVM's 'ld.lld' but
falls back to using 'ld' if unsupported. However, this fallback discards
any existing makefile macro for LD and can break cross-compilation.

Fix by changing the fallback to use the target linker $(LD), passed via
'-fuse-ld=' using an absolute path rather than a linker "flavour".

Fixes: 08c79c9c ("selftests/bpf: Don't force lld on non-x86 architectures")
Signed-off-by: default avatarTony Ambardar <tony.ambardar@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241009040720.635260-1-tony.ambardar@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 81b23c8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment