From: Fabrice Fontaine Date: Fri, 6 Aug 2021 17:26:38 +0000 (+0200) Subject: package/mutt: link with -latomic if needed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80f5a6ca924740b8daca86f9a48c4e41b6295826;p=buildroot.git package/mutt: link with -latomic if needed Link with -latomic if needed to avoid the following build failure with openssl: configure:10549: checking for X509_STORE_CTX_new in -lcrypto configure:10574: /tmp/instance-0/output-1/host/bin/sparc-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/tmp/instance-0/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/include -static -L/tmp/instance-0/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib conftest.c -lcrypto -lz >&5 /tmp/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /tmp/instance-0/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libcrypto.a(x509cset.o): in function `X509_CRL_up_ref': x509cset.c:(.text+0xfc): undefined reference to `__atomic_fetch_add_4' Ideally, mutt should use pkg-config but upstream don't want to use it: https://gitlab.com/muttmua/mutt/-/merge_requests/25 Fixes: - http://autobuild.buildroot.org/results/e357984853f8ca879156245717fadbeaa9b0dbae Signed-off-by: Fabrice Fontaine Signed-off-by: Yann E. MORIN --- diff --git a/package/mutt/mutt.mk b/package/mutt/mutt.mk index a8734855f8..66616f032c 100644 --- a/package/mutt/mutt.mk +++ b/package/mutt/mutt.mk @@ -12,6 +12,10 @@ MUTT_CPE_ID_VENDOR = mutt MUTT_DEPENDENCIES = ncurses MUTT_CONF_OPTS = --disable-doc --disable-smtp +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +MUTT_CONF_ENV += LIBS=-latomic +endif + ifeq ($(BR2_PACKAGE_LIBICONV),y) MUTT_DEPENDENCIES += libiconv MUTT_CONF_OPTS += --enable-iconv