mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 17:35:20 +02:00
selftests/bpf: Fix cross-compiling urandom_read
[ Upstream commitfd526e121c
] 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:08c79c9cd6
("selftests/bpf: Don't force lld on non-x86 architectures") Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241009040720.635260-1-tony.ambardar@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
923c5ded50
commit
a3fe89d4f5
|
@ -200,7 +200,7 @@ $(OUTPUT)/%:%.c
|
||||||
ifeq ($(SRCARCH),x86)
|
ifeq ($(SRCARCH),x86)
|
||||||
LLD := lld
|
LLD := lld
|
||||||
else
|
else
|
||||||
LLD := ld
|
LLD := $(shell command -v $(LD))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Filter out -static for liburandom_read.so and its dependent targets so that static builds
|
# Filter out -static for liburandom_read.so and its dependent targets so that static builds
|
||||||
|
|
Loading…
Reference in New Issue
Block a user