All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] toolchain/Config.in: enable libatomic with BR2_BINFMT_FLAT
@ 2024-03-07 12:28 Fabrice Fontaine
  2024-03-07 12:49 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2024-03-07 12:28 UTC (permalink / raw)
  To: buildroot
  Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti,
	Thomas De Schampheleire, Fabrice Fontaine

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@gmail.com>
---
 toolchain/Config.in | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 3dd6e83d35..13d1b94fe4 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -880,15 +880,12 @@ config BR2_TOOLCHAIN_HAS_SYNC_8
 	default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
 
 # libatomic is available since gcc 4.8, when thread support is
-# enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
-# part of the tuple, and is therefore not build on uclinux targets,
-# which is why BR2_BINFMT_FLAT configurations are excluded.
+# enabled.
 config BR2_TOOLCHAIN_HAS_LIBATOMIC
 	bool
 	default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
 		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 && \
-		BR2_TOOLCHAIN_HAS_THREADS && \
-		!BR2_BINFMT_FLAT
+		BR2_TOOLCHAIN_HAS_THREADS
 
 # __atomic intrinsics are available:
 # - with gcc 4.8, either through built-ins or libatomic, on all
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-12  8:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-07 12:28 [Buildroot] [PATCH 1/1] toolchain/Config.in: enable libatomic with BR2_BINFMT_FLAT Fabrice Fontaine
2024-03-07 12:49 ` Thomas Petazzoni via buildroot
2024-03-07 17:18   ` Fabrice Fontaine
2024-03-11 11:35     ` Thomas Petazzoni via buildroot
2024-03-12  7:18       ` Fabrice Fontaine
2024-05-12  8:15         ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.