From: Simon Glass <simon.glass@canonical.com> Link with libbacktrace when CONFIG_BACKTRACE is enabled. This library is bundled with GCC and provides DWARF-based symbol resolution for backtraces. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- arch/sandbox/config.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index f80e2ef369f..7039b256d81 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -3,7 +3,13 @@ PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE PLATFORM_CPPFLAGS += -fPIC -ffunction-sections -fdata-sections + +ifeq ($(CONFIG_BACKTRACE),y) +GCC_LIB_DIR := $(shell $(CC) -print-file-name=) +PLATFORM_LIBS += -L$(GCC_LIB_DIR) -lbacktrace +endif PLATFORM_LIBS += -lrt + SDL_CONFIG ?= sdl2-config # Define this to avoid linking with SDL, which requires SDL libraries -- 2.43.0