package/elfutils: link with libatomic if needed
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 21 Feb 2021 20:29:44 +0000 (21:29 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Thu, 25 Feb 2021 21:21:38 +0000 (22:21 +0100)
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@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/elfutils/elfutils.mk

index 3d37c4634b623bcd81ee1e741d366bf69f0bd16f..42f2f8b304204caf0cebfcfb3a2242ff9455ab5a 100644 (file)
@@ -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