Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: buildroot <buildroot@buildroot.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Romain Naour <romain.naour@gmail.com>
Subject: [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
Date: Mon, 30 Oct 2023 09:27:48 +0900	[thread overview]
Message-ID: <20231030002748.280144-1-dlemoal@kernel.org> (raw)

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

             reply	other threads:[~2023-10-30  0:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30  0:27 Damien Le Moal [this message]
2023-11-06  2:17 ` [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231030002748.280144-1-dlemoal@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox