[Buildroot] [PATCH 1/1] package/libopenssl: fix configure option for libatomic

Yann E. MORIN yann.morin.1998 at free.fr
Tue Jul 25 19:42:43 UTC 2023


Bernd, All,

On 2023-07-25 20:50 +0200, Bernd Kuhls spake thusly:
> 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

This is not fixing an actual build failure, but is really just a cleanup
fix, right?

> 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
> 
> Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
> ---
> Build-tested using this defconfig
> BR2_PACKAGE_OPENSSL=y
> BR2_PACKAGE_LIBOPENSSL_BIN=y
>                    bootlin-armv7m-uclibc [ 6/45]: FAILED
>                 bootlin-m68k-5208-uclibc [ 8/45]: FAILED
> Reported the two unrelated build errors:
> https://bugs.busybox.net/show_bug.cgi?id=15709

Those two are not a regression, they already failed to build before this
patch, but the phrasing was a bit ambiguoug, so I had to check...

If you can confirm that this is just a cleanup fix, then no need to
respin, I'll amend the comit log when applying.

Regards,
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) \
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list