From 9c0385972dfd2e244214ba4549e2e8d011a26565 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Wed, 16 Sep 2026 22:52:44 +0200 Subject: [PATCH] package/ghostscript: link with libatomic if needed Fixes: https://autobuild.buildroot.net/results/eed/eed88a2a77cb8c4ff8c59bac5091221e6873004c/ The build error occurs since 2024 so a backport to LTS branches should be considered: https://autobuild.buildroot.net/results/1ab/1ab4767c1198838c3e3d126cdba790197d102053/ Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain --- package/ghostscript/ghostscript.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/ghostscript/ghostscript.mk b/package/ghostscript/ghostscript.mk index 250c851b28..08e2667981 100644 --- a/package/ghostscript/ghostscript.mk +++ b/package/ghostscript/ghostscript.mk @@ -37,6 +37,11 @@ GHOSTSCRIPT_CONF_ENV = \ CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)" \ PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)" +# Uses __atomic_fetch_add_4 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +GHOSTSCRIPT_MAKE_ENV += XTRALIBS=-latomic +endif + GHOSTSCRIPT_CONF_OPTS = \ --disable-compile-inits \ --enable-fontconfig \