Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
@ 2023-10-30  0:27 Damien Le Moal
  2023-11-06  2:17 ` Damien Le Moal
  0 siblings, 1 reply; 8+ messages in thread
From: Damien Le Moal @ 2023-10-30  0:27 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni; +Cc: Romain Naour

When BR2_TOOLCHAIN_HAS_LIBATOMIC is "n", there is no gcc libatomic.so
library to install. For configurations with such settings, compilation
fails as gcc-final.mk unconditionally adds libatomic as an installation
target. This error, for instance, shows for all Canaan K210 riscv
configs, as they all use uclibc flat binary format which disabled
libatomic:

Fix this by modifying package/gcc/gcc-final/gcc-final.mk to add
libatomic to GCC_FINAL_LIBS only for configurations that have
BR2_TOOLCHAIN_HAS_LIBATOMIC set to "y".

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
 package/gcc/gcc-final/gcc-final.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index edb9b2f73a..99d7047b5f 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -144,7 +144,11 @@ HOST_GCC_FINAL_POST_INSTALL_HOOKS += TOOLCHAIN_WRAPPER_INSTALL
 # -cc symlink to the wrapper is not created.
 HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS
 
-GCC_FINAL_LIBS = libatomic
+GCC_FINAL_LIBS =
+
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GCC_FINAL_LIBS += libatomic
+endif
 
 ifeq ($(BR2_STATIC_LIBS),)
 GCC_FINAL_LIBS += libgcc_s
-- 
2.41.0

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

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

end of thread, other threads:[~2023-11-12 13:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-30  0:27 [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation Damien Le Moal
2023-11-06  2:17 ` Damien Le Moal
2023-11-06  7:43   ` Thomas Petazzoni via buildroot
2023-11-06  9:57     ` Damien Le Moal
2023-11-06 20:18     ` Arnout Vandecappelle via buildroot
2023-11-06 20:49       ` Thomas Petazzoni via buildroot
2023-11-12 13:09         ` Peter Korsgaard
2023-11-06 22:14       ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox