* [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
* Re: [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
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
0 siblings, 1 reply; 8+ messages in thread
From: Damien Le Moal @ 2023-11-06 2:17 UTC (permalink / raw)
To: buildroot, Thomas Petazzoni; +Cc: Romain Naour
On 10/30/23 09:27, Damien Le Moal wrote:
> 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>
Ping ?
I received a build failure report (again) for the RISC-V Canaan & Sipeed boards
configs. This patch fixes these build failures.
> ---
> 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
--
Damien Le Moal
Western Digital Research
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
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
0 siblings, 2 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-06 7:43 UTC (permalink / raw)
To: Damien Le Moal; +Cc: Romain Naour, buildroot
On Mon, 6 Nov 2023 11:17:41 +0900
Damien Le Moal <dlemoal@kernel.org> wrote:
> I received a build failure report (again) for the RISC-V Canaan & Sipeed boards
> configs. This patch fixes these build failures.
I need to dig deeper into this. We looked into this issue with Romain,
and I believe our conclusion is that it was unfortunately more complex
than this, because in fact BR2_TOOLCHAIN_HAS_LIBATOMIC is not a fully
accurate representation of whether gcc has libatomic or not.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
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
1 sibling, 0 replies; 8+ messages in thread
From: Damien Le Moal @ 2023-11-06 9:57 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Romain Naour, buildroot
On 11/6/23 16:43, Thomas Petazzoni wrote:
> On Mon, 6 Nov 2023 11:17:41 +0900
> Damien Le Moal <dlemoal@kernel.org> wrote:
>
>> I received a build failure report (again) for the RISC-V Canaan & Sipeed boards
>> configs. This patch fixes these build failures.
>
> I need to dig deeper into this. We looked into this issue with Romain,
> and I believe our conclusion is that it was unfortunately more complex
> than this, because in fact BR2_TOOLCHAIN_HAS_LIBATOMIC is not a fully
> accurate representation of whether gcc has libatomic or not.
Understood. Thanks.
--
Damien Le Moal
Western Digital Research
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
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-06 22:14 ` Damien Le Moal
1 sibling, 2 replies; 8+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2023-11-06 20:18 UTC (permalink / raw)
To: Thomas Petazzoni, Damien Le Moal; +Cc: Romain Naour, buildroot
On 06/11/2023 08:43, Thomas Petazzoni via buildroot wrote:
> On Mon, 6 Nov 2023 11:17:41 +0900
> Damien Le Moal <dlemoal@kernel.org> wrote:
>
>> I received a build failure report (again) for the RISC-V Canaan & Sipeed boards
>> configs. This patch fixes these build failures.
>
> I need to dig deeper into this. We looked into this issue with Romain,
> and I believe our conclusion is that it was unfortunately more complex
> than this, because in fact BR2_TOOLCHAIN_HAS_LIBATOMIC is not a fully
> accurate representation of whether gcc has libatomic or not.
Even so, we could apply this already as a first step that fixes many
configurations, and improve the fix later? Currently there are quite a lot of
configurations for which we simply can't build a toolchain...
BTW, Damien, you forgot the Fixes line:
Fixes:
http://autobuild.buildroot.net/results/98f/98fedf4969c260f73a01b937b9625e66dcd86b3c
(there are about 10 failures per day on various architectures, I don't think we
need to enumerate them all.)
Regards,
Arnout
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
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
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-06 20:49 UTC (permalink / raw)
To: Arnout Vandecappelle; +Cc: Romain Naour, Damien Le Moal, buildroot
On Mon, 6 Nov 2023 21:18:04 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:
> Even so, we could apply this already as a first step that fixes many
> configurations, and improve the fix later? Currently there are quite a lot of
> configurations for which we simply can't build a toolchain...
Oh, yes, absolutely. This patch is better than doing nothing, that's
for sure.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
2023-11-06 20:18 ` Arnout Vandecappelle via buildroot
2023-11-06 20:49 ` Thomas Petazzoni via buildroot
@ 2023-11-06 22:14 ` Damien Le Moal
1 sibling, 0 replies; 8+ messages in thread
From: Damien Le Moal @ 2023-11-06 22:14 UTC (permalink / raw)
To: Arnout Vandecappelle, Thomas Petazzoni; +Cc: Romain Naour, buildroot
On 11/7/23 05:18, Arnout Vandecappelle wrote:
>
>
> On 06/11/2023 08:43, Thomas Petazzoni via buildroot wrote:
>> On Mon, 6 Nov 2023 11:17:41 +0900
>> Damien Le Moal <dlemoal@kernel.org> wrote:
>>
>>> I received a build failure report (again) for the RISC-V Canaan & Sipeed boards
>>> configs. This patch fixes these build failures.
>>
>> I need to dig deeper into this. We looked into this issue with Romain,
>> and I believe our conclusion is that it was unfortunately more complex
>> than this, because in fact BR2_TOOLCHAIN_HAS_LIBATOMIC is not a fully
>> accurate representation of whether gcc has libatomic or not.
>
> Even so, we could apply this already as a first step that fixes many
> configurations, and improve the fix later? Currently there are quite a lot of
> configurations for which we simply can't build a toolchain...
>
> BTW, Damien, you forgot the Fixes line:
>
> Fixes:
> http://autobuild.buildroot.net/results/98f/98fedf4969c260f73a01b937b9625e66dcd86b3c
Thomas, can you add this if you apply the patch ? I can send a v2 of the patch
as well if you prefer that.
>
> (there are about 10 failures per day on various architectures, I don't think we
> need to enumerate them all.)
>
> Regards,
> Arnout
>
--
Damien Le Moal
Western Digital Research
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] package/gcc: Fix gcc finale library installation
2023-11-06 20:49 ` Thomas Petazzoni via buildroot
@ 2023-11-12 13:09 ` Peter Korsgaard
0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2023-11-12 13:09 UTC (permalink / raw)
To: Thomas Petazzoni via buildroot
Cc: Romain Naour, Damien Le Moal, Thomas Petazzoni
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
> On Mon, 6 Nov 2023 21:18:04 +0100
> Arnout Vandecappelle <arnout@mind.be> wrote:
>> Even so, we could apply this already as a first step that fixes many
>> configurations, and improve the fix later? Currently there are quite a lot of
>> configurations for which we simply can't build a toolchain...
> Oh, yes, absolutely. This patch is better than doing nothing, that's
> for sure.
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [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