* [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options
@ 2025-07-10 10:41 Jiaxun Yang
2025-07-10 10:41 ` [Buildroot] [PATCH v2 1/3] arch/loongarch: Fix toolchain triple ABI suffix Jiaxun Yang
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Jiaxun Yang @ 2025-07-10 10:41 UTC (permalink / raw)
To: buildroot; +Cc: Julien Olivain, Jiaxun Yang
Hi all,
This series fixed a couple of toolchain options. many thanks to
Julien and Thomas for reports and suggestions!
Thanks
Jiaxun
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
Changes in v2:
- Make it a series
- Link to v1: https://lore.kernel.org/r/20250708-loongarch-fabi-v1-1-1c9b4df3dee9@flygoat.com
---
Jiaxun Yang (3):
arch/loongarch: Fix toolchain triple ABI suffix
arch/loongarch: Mark lp64f and lp64s as broken
arch/loongarch: Fix minimal GCC version for taget arch options
arch/Config.in.loongarch | 8 ++++++--
package/Makefile.in | 8 ++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
---
base-commit: 09880508cb26260f30608137f697b6bdf11483fa
change-id: 20250708-loongarch-fabi-ce44d983eca1
Best regards,
--
Jiaxun Yang <jiaxun.yang@flygoat.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v2 1/3] arch/loongarch: Fix toolchain triple ABI suffix
2025-07-10 10:41 [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Jiaxun Yang
@ 2025-07-10 10:41 ` Jiaxun Yang
2025-07-12 10:41 ` Julien Olivain via buildroot
2025-07-10 10:41 ` [Buildroot] [PATCH v2 2/3] arch/loongarch: Mark lp64f and lp64s as broken Jiaxun Yang
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Jiaxun Yang @ 2025-07-10 10:41 UTC (permalink / raw)
To: buildroot; +Cc: Julien Olivain, Jiaxun Yang
LoongArch GCC infers ABI from triple suffix, thus it's necesessary
to set up proper triple ABI suffixes for different ABI types.
Adjust ABI suffix as per Table 10. List of possible <fabi-suffix>
in "LoongArch Toolchain Conventions Version 1.00".
Link: https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html
Link: https://lore.kernel.org/all/20250706105859.292908-1-ju.o@free.fr/
Suggested-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
package/Makefile.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/Makefile.in b/package/Makefile.in
index 829636900ba950f4e2af4e070b7f979646600bcc..5ebb5f9ba8abd55cf9519cf3eb2a9a774ef9e271 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -83,6 +83,14 @@ ABI := $(ABI)hf
endif
endif
+# LoongArch Float ABI suffixes
+ifeq ($(BR2_LOONGARCH_ABI_LP64F),y)
+ABI = f32
+endif
+ifeq ($(BR2_LOONGARCH_ABI_LP64S),y)
+ABI = sf
+endif
+
# For FSL PowerPC there's SPE
ifeq ($(BR2_POWERPC_CPU_HAS_SPE),y)
ABI = spe
--
2.49.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v2 2/3] arch/loongarch: Mark lp64f and lp64s as broken
2025-07-10 10:41 [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Jiaxun Yang
2025-07-10 10:41 ` [Buildroot] [PATCH v2 1/3] arch/loongarch: Fix toolchain triple ABI suffix Jiaxun Yang
@ 2025-07-10 10:41 ` Jiaxun Yang
2025-07-12 10:43 ` Julien Olivain via buildroot
2025-07-10 10:41 ` [Buildroot] [PATCH v2 3/3] arch/loongarch: Fix minimal GCC version for taget arch options Jiaxun Yang
2025-07-30 20:37 ` [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Thomas Petazzoni via buildroot
3 siblings, 1 reply; 11+ messages in thread
From: Jiaxun Yang @ 2025-07-10 10:41 UTC (permalink / raw)
To: buildroot; +Cc: Julien Olivain, Jiaxun Yang
Toolchain failed to bootstrap with LP64F and LP64S toolchain.
Mark it as broken at the moment to allow time for investigation.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
arch/Config.in.loongarch | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/Config.in.loongarch b/arch/Config.in.loongarch
index 1f302364b13b10183638da230a4735a7d7b7f46e..c11d8dc79f0e76526948d2befbfae722fbc1b0ed 100644
--- a/arch/Config.in.loongarch
+++ b/arch/Config.in.loongarch
@@ -87,11 +87,15 @@ config BR2_LOONGARCH_ABI_LP64D
config BR2_LOONGARCH_ABI_LP64F
bool "lp64f"
depends on BR2_ARCH_IS_64
+ # Failed to build host GCC initial, pending investigation
+ depends on BR2_BROKEN
depends on BR2_LOONGARCH_FPU_64 || BR2_LOONGARCH_FPU_32
config BR2_LOONGARCH_ABI_LP64S
bool "lp64s"
depends on BR2_ARCH_IS_64
+ # GCC can't find the right library path, pending investigation
+ depends on BR2_BROKEN
endchoice
config BR2_ARCH
--
2.49.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v2 3/3] arch/loongarch: Fix minimal GCC version for taget arch options
2025-07-10 10:41 [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Jiaxun Yang
2025-07-10 10:41 ` [Buildroot] [PATCH v2 1/3] arch/loongarch: Fix toolchain triple ABI suffix Jiaxun Yang
2025-07-10 10:41 ` [Buildroot] [PATCH v2 2/3] arch/loongarch: Mark lp64f and lp64s as broken Jiaxun Yang
@ 2025-07-10 10:41 ` Jiaxun Yang
2025-07-12 10:41 ` Julien Olivain via buildroot
2025-07-30 20:37 ` [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Thomas Petazzoni via buildroot
3 siblings, 1 reply; 11+ messages in thread
From: Jiaxun Yang @ 2025-07-10 10:41 UTC (permalink / raw)
To: buildroot; +Cc: Julien Olivain, Jiaxun Yang
Both la64v1.0 and la64v1.1 requires GCC 14 as minimum.
Fixes: https://autobuild.buildroot.org/results/04a904f08d6e0aacbd308692c99e77a334d72b95/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
arch/Config.in.loongarch | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/Config.in.loongarch b/arch/Config.in.loongarch
index c11d8dc79f0e76526948d2befbfae722fbc1b0ed..071ee241e932d1c63b86423c1c86ff3b16b25488 100644
--- a/arch/Config.in.loongarch
+++ b/arch/Config.in.loongarch
@@ -13,14 +13,14 @@ config BR2_loongarch64_generic
config BR2_loongarch64_v1_0
bool "LoongArch64 ISA version 1.0"
depends on BR2_ARCH_IS_64
- select BR2_ARCH_NEEDS_GCC_AT_LEAST_13
+ select BR2_ARCH_NEEDS_GCC_AT_LEAST_14
help
LoongArch64 ISA version 1.0 processor.
config BR2_loongarch64_v1_1
bool "LoongArch64 ISA version 1.1"
depends on BR2_ARCH_IS_64
- select BR2_ARCH_NEEDS_GCC_AT_LEAST_13
+ select BR2_ARCH_NEEDS_GCC_AT_LEAST_14
help
LoongArch64 ISA version 1.1 processor.
@@ -94,7 +94,7 @@ config BR2_LOONGARCH_ABI_LP64F
config BR2_LOONGARCH_ABI_LP64S
bool "lp64s"
depends on BR2_ARCH_IS_64
- # GCC can't find the right library path, pending investigation
+ # GCC can't find libraries, pending investigation
depends on BR2_BROKEN
endchoice
--
2.49.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH v2 1/3] arch/loongarch: Fix toolchain triple ABI suffix
2025-07-10 10:41 ` [Buildroot] [PATCH v2 1/3] arch/loongarch: Fix toolchain triple ABI suffix Jiaxun Yang
@ 2025-07-12 10:41 ` Julien Olivain via buildroot
0 siblings, 0 replies; 11+ messages in thread
From: Julien Olivain via buildroot @ 2025-07-12 10:41 UTC (permalink / raw)
To: Jiaxun Yang; +Cc: buildroot
On 10/07/2025 12:41, Jiaxun Yang wrote:
> LoongArch GCC infers ABI from triple suffix, thus it's necesessary
> to set up proper triple ABI suffixes for different ABI types.
>
> Adjust ABI suffix as per Table 10. List of possible <fabi-suffix>
> in "LoongArch Toolchain Conventions Version 1.00".
>
> Link:
> https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html
> Link: https://lore.kernel.org/all/20250706105859.292908-1-ju.o@free.fr/
> Suggested-by: Julien Olivain <ju.o@free.fr>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH v2 3/3] arch/loongarch: Fix minimal GCC version for taget arch options
2025-07-10 10:41 ` [Buildroot] [PATCH v2 3/3] arch/loongarch: Fix minimal GCC version for taget arch options Jiaxun Yang
@ 2025-07-12 10:41 ` Julien Olivain via buildroot
0 siblings, 0 replies; 11+ messages in thread
From: Julien Olivain via buildroot @ 2025-07-12 10:41 UTC (permalink / raw)
To: Jiaxun Yang; +Cc: buildroot
On 10/07/2025 12:41, Jiaxun Yang wrote:
> Both la64v1.0 and la64v1.1 requires GCC 14 as minimum.
>
> Fixes:
> https://autobuild.buildroot.org/results/04a904f08d6e0aacbd308692c99e77a334d72b95/
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH v2 2/3] arch/loongarch: Mark lp64f and lp64s as broken
2025-07-10 10:41 ` [Buildroot] [PATCH v2 2/3] arch/loongarch: Mark lp64f and lp64s as broken Jiaxun Yang
@ 2025-07-12 10:43 ` Julien Olivain via buildroot
0 siblings, 0 replies; 11+ messages in thread
From: Julien Olivain via buildroot @ 2025-07-12 10:43 UTC (permalink / raw)
To: Jiaxun Yang; +Cc: buildroot
Hi Jiaxun,
Thanks for the patch.
On 10/07/2025 12:41, Jiaxun Yang wrote:
> Toolchain failed to bootstrap with LP64F and LP64S toolchain.
>
> Mark it as broken at the moment to allow time for investigation.
Marking the lp64f and lp64s as broken is not sufficient to
prevent generating failing configurations.
When selecting BR2_LOONGARCH_FPU_32 or BR2_LOONGARCH_FPU_NONE,
there is no default ABI selected, gcc will then default to lp64d.
The following configuration:
cat >.config <<EOF
BR2_loongarch64=y
BR2_LOONGARCH_FPU_NONE=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set
EOF
make olddefconfig
make
still fails with message:
lp64d/base ABI cannot be implemented with --with-fpu=none.
I believe BR2_LOONGARCH_FPU_32 and BR2_LOONGARCH_FPU_NONE should
be marked as broken too. Since only FPU_64 can be selected, then
only lp64d will be selected, which is a currently working
configuration.
Can you confirm and send an updated patch, please?
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> arch/Config.in.loongarch | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/Config.in.loongarch b/arch/Config.in.loongarch
> index
> 1f302364b13b10183638da230a4735a7d7b7f46e..c11d8dc79f0e76526948d2befbfae722fbc1b0ed
> 100644
> --- a/arch/Config.in.loongarch
> +++ b/arch/Config.in.loongarch
> @@ -87,11 +87,15 @@ config BR2_LOONGARCH_ABI_LP64D
> config BR2_LOONGARCH_ABI_LP64F
> bool "lp64f"
> depends on BR2_ARCH_IS_64
> + # Failed to build host GCC initial, pending investigation
> + depends on BR2_BROKEN
> depends on BR2_LOONGARCH_FPU_64 || BR2_LOONGARCH_FPU_32
>
> config BR2_LOONGARCH_ABI_LP64S
> bool "lp64s"
> depends on BR2_ARCH_IS_64
> + # GCC can't find the right library path, pending investigation
> + depends on BR2_BROKEN
> endchoice
>
> config BR2_ARCH
>
> --
> 2.49.0
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options
2025-07-10 10:41 [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Jiaxun Yang
` (2 preceding siblings ...)
2025-07-10 10:41 ` [Buildroot] [PATCH v2 3/3] arch/loongarch: Fix minimal GCC version for taget arch options Jiaxun Yang
@ 2025-07-30 20:37 ` Thomas Petazzoni via buildroot
2025-08-01 4:13 ` Jiaxun Yang
3 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-07-30 20:37 UTC (permalink / raw)
To: Jiaxun Yang; +Cc: buildroot, Julien Olivain
Hello Jiaxun,
On Thu, 10 Jul 2025 11:41:55 +0100
Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
> This series fixed a couple of toolchain options. many thanks to
> Julien and Thomas for reports and suggestions!
Thanks for those fixes. However, we still a considerable amount of
failures of GCC on loongarch64 in our autobuilders:
https://autobuild.buildroot.net/?reason=%gcc%&arch=loongarch64
Normally, you should be receiving an e-mail every day with build
failures occurring on loongarch64, and as you've introduced support for
this architecture, we expect some level of support from your side to
resolve those architecture-specific issues. Could you have a look a
those build failures that are loongarch64 specific and provide some
fixes?
Thanks a lot for your support,
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] 11+ messages in thread
* Re: [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options
2025-07-30 20:37 ` [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Thomas Petazzoni via buildroot
@ 2025-08-01 4:13 ` Jiaxun Yang
2025-08-01 7:46 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 11+ messages in thread
From: Jiaxun Yang @ 2025-08-01 4:13 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot, Julien Olivain
在2025年7月31日周四 上午4:37,Thomas Petazzoni写道:
> Hello Jiaxun,
>
> On Thu, 10 Jul 2025 11:41:55 +0100
> Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
>
>> This series fixed a couple of toolchain options. many thanks to
>> Julien and Thomas for reports and suggestions!
>
> Thanks for those fixes. However, we still a considerable amount of
> failures of GCC on loongarch64 in our autobuilders:
>
> https://autobuild.buildroot.net/?reason=%gcc%&arch=loongarch64
>
> Normally, you should be receiving an e-mail every day with build
> failures occurring on loongarch64, and as you've introduced support for
> this architecture, we expect some level of support from your side to
> resolve those architecture-specific issues. Could you have a look a
> those build failures that are loongarch64 specific and provide some
> fixes?
Sure, sorry those emails slipped across my email filter.
I'm actually looking into fix LP64S and LP64D ABI in GCC and other
libraries but trapped by various failures. If I'm unable to get them
fixed we may need to drop them in Buildroot.
Thanks!
>
> Thanks a lot for your support,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
--
- Jiaxun
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options
2025-08-01 4:13 ` Jiaxun Yang
@ 2025-08-01 7:46 ` Thomas Petazzoni via buildroot
2025-08-01 12:30 ` Julien Olivain via buildroot
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-08-01 7:46 UTC (permalink / raw)
To: Jiaxun Yang; +Cc: buildroot, Julien Olivain
Hello,
On Fri, 01 Aug 2025 12:13:48 +0800
"Jiaxun Yang" <jiaxun.yang@flygoat.com> wrote:
> Sure, sorry those emails slipped across my email filter.
>
> I'm actually looking into fix LP64S and LP64D ABI in GCC and other
> libraries but trapped by various failures. If I'm unable to get them
> fixed we may need to drop them in Buildroot.
Thanks for your feedback. If there are known broken features causing
those failures, I would prefer that we remove/disable them now, and
re-enable them later once they are fixed. There are currently way too
many failures on loongarch64.
Best regards,
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] 11+ messages in thread
* Re: [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options
2025-08-01 7:46 ` Thomas Petazzoni via buildroot
@ 2025-08-01 12:30 ` Julien Olivain via buildroot
0 siblings, 0 replies; 11+ messages in thread
From: Julien Olivain via buildroot @ 2025-08-01 12:30 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Jiaxun Yang, buildroot
Hi Thomas, Jiaxun,
On 01/08/2025 09:46, Thomas Petazzoni via buildroot wrote:
> Hello,
>
> On Fri, 01 Aug 2025 12:13:48 +0800
> "Jiaxun Yang" <jiaxun.yang@flygoat.com> wrote:
>
>> Sure, sorry those emails slipped across my email filter.
>>
>> I'm actually looking into fix LP64S and LP64D ABI in GCC and other
>> libraries but trapped by various failures. If I'm unable to get them
>> fixed we may need to drop them in Buildroot.
>
> Thanks for your feedback. If there are known broken features causing
> those failures, I would prefer that we remove/disable them now, and
> re-enable them later once they are fixed. There are currently way too
> many failures on loongarch64.
I agree we should disable the lp64f and lp64s ABIs, which I believe
are a major source of those failures.
For that reason, I reworked and proposed the Jiaxun's patch doing so:
https://patchwork.ozlabs.org/project/buildroot/patch/20250731134401.30301-1-ju.o@free.fr/
Jiaxun, could you please review and test it?
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-08-01 12:30 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10 10:41 [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Jiaxun Yang
2025-07-10 10:41 ` [Buildroot] [PATCH v2 1/3] arch/loongarch: Fix toolchain triple ABI suffix Jiaxun Yang
2025-07-12 10:41 ` Julien Olivain via buildroot
2025-07-10 10:41 ` [Buildroot] [PATCH v2 2/3] arch/loongarch: Mark lp64f and lp64s as broken Jiaxun Yang
2025-07-12 10:43 ` Julien Olivain via buildroot
2025-07-10 10:41 ` [Buildroot] [PATCH v2 3/3] arch/loongarch: Fix minimal GCC version for taget arch options Jiaxun Yang
2025-07-12 10:41 ` Julien Olivain via buildroot
2025-07-30 20:37 ` [Buildroot] [PATCH v2 0/3] arch/loongarch: Fix a couple of toolchain options Thomas Petazzoni via buildroot
2025-08-01 4:13 ` Jiaxun Yang
2025-08-01 7:46 ` Thomas Petazzoni via buildroot
2025-08-01 12:30 ` Julien Olivain via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox