From fd907e6ef46316cd06afb5a1e710a644bec65267 Mon Sep 17 00:00:00 2001 From: hanzhijian Date: Wed, 20 May 2026 11:48:22 +0800 Subject: [PATCH] sim: pass no-pie through gcc driver Pass -no-pie through the gcc driver instead of forwarding it as -Wl,-no-pie. On Ubuntu 20 with GCC 9, sim:nsh failed during the final link step with /usr/bin/ld: cannot find -lgcc_s. This change fixes the link failure in that environment. Signed-off-by: hanzhijian --- boards/sim/sim/sim/scripts/Make.defs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index 0a65fb44e25..009c76b1622 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -336,7 +336,7 @@ else ifeq ($(CONFIG_HOST_MACOS)$(CONFIG_HOST_ARM64),) # which works correctly on aarch64 hosts. ARCHCFLAGS += -no-pie ARCHPICFLAGS += -no-pie - LDFLAGS += -Wl,-no-pie + LDFLAGS += -no-pie endif ifeq ($(CONFIG_HOST_LINUX),y)