From b7644af3c04b3229465d0a8b72d24737dca7384c Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Tue, 25 Jul 2023 20:50:04 +0200 Subject: [PATCH] package/libopenssl: update configure option for libatomic Without this patch openssl adds -latomic twice to Libs.private in libcrypto.pc: cat output/per-package/opensc/host/arceb-buildroot-linux-uclibc/sysroot/usr/lib/pkgconfig/libcrypto.pc | grep atomic Libs.private: -ldl -pthread -latomic -latomic Instead of passing -latomic to Configure we use the target arch "linux-latomic" which is provided by upstream since version 3.0.0 especially for libatomic handling: https://github.com/openssl/openssl/commit/535130c39d33df41b6a7d14302a93ffaa10ebc46 https://github.com/openssl/openssl/commit/cdf2986a70d92668d882eb29737225f1aaafd0f1 To be noted: the build still fails for both bootlin-armv7m-uclibc and bootlin-m68k-5208-uclibc, but this is not a regression due to this patch, and is tracked as #15709. Signed-off-by: Bernd Kuhls Signed-off-by: Yann E. MORIN --- package/libopenssl/Config.in | 1 + package/libopenssl/libopenssl.mk | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package/libopenssl/Config.in b/package/libopenssl/Config.in index 26c8f4c085..fdfa135f52 100644 --- a/package/libopenssl/Config.in +++ b/package/libopenssl/Config.in @@ -26,6 +26,7 @@ config BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH # linux-generic{32,64}, see # https://github.com/openssl/openssl/issues/9839 default "linux-generic64 no-asm" if BR2_ARCH_IS_64 && !BR2_MIPS_NABI32 + default "linux-latomic no-asm" if BR2_TOOLCHAIN_HAS_LIBATOMIC default "linux-generic32 no-asm" config BR2_PACKAGE_LIBOPENSSL_BIN diff --git a/package/libopenssl/libopenssl.mk b/package/libopenssl/libopenssl.mk index 06eac8f3d9..41626d20e1 100644 --- a/package/libopenssl/libopenssl.mk +++ b/package/libopenssl/libopenssl.mk @@ -73,7 +73,6 @@ define LIBOPENSSL_CONFIGURE_CMDS $(LIBOPENSSL_TARGET_ARCH) \ --prefix=/usr \ --openssldir=/etc/ssl \ - $(if $(BR2_TOOLCHAIN_HAS_LIBATOMIC),-latomic) \ $(if $(BR2_TOOLCHAIN_HAS_THREADS),threads,no-threads) \ $(if $(BR2_STATIC_LIBS),no-shared,shared) \ $(if $(BR2_PACKAGE_CRYPTODEV_LINUX),enable-devcryptoeng) \