[Buildroot] [PATCH 1/1] toolchain/Config.in: enable libatomic with BR2_BINFMT_FLAT

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Mar 7 12:49:16 UTC 2024


Hello Fabrice,

On Thu,  7 Mar 2024 13:28:06 +0100
Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:

> Enable libatomic with BR2_BINFMT_FLAT to avoid the following build
> failure with libopenssl and
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7M_UCLIBC_STABLE:
> 
> /home/buildroot/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: ./libcrypto.a(libcrypto-lib-threads_pthread.o): in function `CRYPTO_atomic_or':
> threads_pthread.c:(.text+0xfa): undefined reference to `__atomic_is_lock_free'
> 
> Indeed, bootlin armv7m is an uclibc toolchain compiled with atomic
> support through libatomic
> 
> This build failure is probably raised since activation of threads in
> static builds by commit ea3e60229bc5647e587685023de475276e28584d
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/d25e898f9715bf6a21284807361a57735a7a2e1d
>  - http://autobuild.buildroot.org/results/e37ed5ad6ba41d610bffe9c234f699e203ef5069
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>

Thanks for the patch. Do we know since when there is support for
libatomic for platforms that use the FLAT binary format? Is this
specific to ARM/FLAT, or applicable to all configurations that use the
FLAT binary format?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list