From e40b563e87fd4ff58474a289909a1827c8d2bca7 Mon Sep 17 00:00:00 2001 From: Chris Kay Date: Tue, 6 Feb 2024 14:33:12 +0000 Subject: [PATCH] fix(bl1): add missing spinlock dependency The spinlock functions from `spinlock.S` are used by `errata_report.c`, which is pulled into BL1. In a normal build it appears that this function call undergoes dead code elimination so the link error is not reported, but when compiled with LTO enabled the linker reports an undefined reference. Change-Id: Id22ffa8c0c8d3ca4b4cd46f0f4aefa53907c8de5 Signed-off-by: Chris Kay --- bl1/bl1.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/bl1/bl1.mk b/bl1/bl1.mk index dbb646bd4..db0eafc43 100644 --- a/bl1/bl1.mk +++ b/bl1/bl1.mk @@ -12,6 +12,7 @@ BL1_SOURCES += bl1/${ARCH}/bl1_arch_setup.c \ lib/cpus/${ARCH}/cpu_helpers.S \ lib/cpus/errata_report.c \ lib/el3_runtime/${ARCH}/context_mgmt.c \ + lib/locks/exclusive/${ARCH}/spinlock.S \ plat/common/plat_bl1_common.c \ plat/common/${ARCH}/platform_up_stack.S \ ${MBEDTLS_SOURCES}