[Buildroot] [git commit branch/2020.11.x] package/elfutils: link with libatomic if needed

Peter Korsgaard peter at korsgaard.com
Fri Mar 5 12:22:52 UTC 2021


commit: https://git.buildroot.net/buildroot/commit/?id=7bb32d236372a788dd1f1005d96c0205d8406ad8
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2020.11.x

Fix build of elfutils 0.181 with Bootlin SPARC uclibc toolchain added
with commit 1348c569d0cb7f67eca30f170b782aa8b51cc259

Fixes:
 - http://autobuild.buildroot.org/results/31ce9e3861c6229a7869a15d322f5d2f5bfc6165

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
(cherry picked from commit 51b5df23b2019eb9da1fc2ceb43c518dc79f1378)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/elfutils/elfutils.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk
index 3d37c4634b..42f2f8b304 100644
--- a/package/elfutils/elfutils.mk
+++ b/package/elfutils/elfutils.mk
@@ -43,6 +43,10 @@ ELFUTILS_CONF_ENV += \
 ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS) \
 	$(TARGET_NLS_LIBS)
 
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+ELFUTILS_LDFLAGS += -latomic
+endif
+
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
 ELFUTILS_DEPENDENCIES += musl-fts
 ELFUTILS_LDFLAGS += -lfts


More information about the buildroot mailing list