[Buildroot] [PATCH v1 6/8] package/at-spi2-core: fix reference to atomic

Thomas Devoogdt thomas at devoogdt.com
Sat Apr 20 18:58:51 UTC 2024


gthread-posix.c:(.text+0x137c): undefined reference to `__atomic_compare_exchange_4'
collect2: error: ld returned 1 exit status

Signed-off-by: Thomas Devoogdt <thomas at devoogdt.com>
---
 package/at-spi2-core/at-spi2-core.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/at-spi2-core/at-spi2-core.mk b/package/at-spi2-core/at-spi2-core.mk
index 828280de1a..43befa99f0 100644
--- a/package/at-spi2-core/at-spi2-core.mk
+++ b/package/at-spi2-core/at-spi2-core.mk
@@ -38,4 +38,9 @@ endif
 
 AT_SPI2_CORE_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
 
+# Uses __atomic_compare_exchange_4
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+AT_SPI2_CORE_LDFLAGS += -latomic
+endif
+
 $(eval $(meson-package))
-- 
2.34.1




More information about the buildroot mailing list