* [Buildroot] [PATCH] toolchain/Config.in: refine BR2_TOOLCHAIN_HAS_LIBQUADMATH definition
@ 2026-08-23 19:19 Thomas Petazzoni via buildroot
2026-08-25 8:34 ` Peter Korsgaard
2026-09-04 12:18 ` Thomas Perale via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-23 19:19 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti, Romain Naour
In commit a2380157f6688c5c065fa19060a2c33145bab95b ("toolchain: enable
libquadmath for PowerPC with VSX"), the definition of
BR2_TOOLCHAIN_HAS_LIBQUADMATH has been extended to also be true when
BR2_POWERPC_CPU_HAS_VSX.
However, practical experiments show that when 64-bit VSX-capable cores
are used in 32-bit mode, libquadmath is not built by GCC, causing
build failures:
cp: cannot stat '/home/autobuild/autobuild/instance-3/output-1/host/powerpc-buildroot-linux-musl/lib*/libquadmath*': No such file or directory
We did an extensive testing, building the 27 combinations of:
- GCC versions: 14, 15, 16
- C library: glibc, uclibc, musl
- PowerPC 32-bit, PowerPC 64-bit, PowerPC 64-bit little endian
This testing provides the following results:
| gcc14 | powerpc64 | glibc | OK |
| gcc14 | powerpc64le | glibc | OK |
| gcc14 | powerpc64le | musl | OK |
| gcc14 | powerpc64le | uclibc | SKIPPED |
| gcc14 | powerpc64 | musl | OK |
| gcc14 | powerpc64 | uclibc | SKIPPED |
| gcc14 | powerpc | glibc | FAILED |
| gcc14 | powerpc | musl | FAILED |
| gcc14 | powerpc | uclibc | FAILED |
| gcc15 | powerpc64 | glibc | OK |
| gcc15 | powerpc64le | glibc | OK |
| gcc15 | powerpc64le | musl | OK |
| gcc15 | powerpc64le | uclibc | SKIPPED |
| gcc15 | powerpc64 | musl | OK |
| gcc15 | powerpc64 | uclibc | SKIPPED |
| gcc15 | powerpc | glibc | FAILED |
| gcc15 | powerpc | musl | FAILED |
| gcc15 | powerpc | uclibc | FAILED |
| gcc16 | powerpc64 | glibc | OK |
| gcc16 | powerpc64le | glibc | OK |
| gcc16 | powerpc64le | musl | OK |
| gcc16 | powerpc64le | uclibc | SKIPPED |
| gcc16 | powerpc64 | musl | OK |
| gcc16 | powerpc64 | uclibc | SKIPPED |
| gcc16 | powerpc | glibc | FAILED |
| gcc16 | powerpc | musl | FAILED |
| gcc16 | powerpc | uclibc | FAILED |
The "SKIPPED" are when the configuration is not possible: uClibc
doesn't support powerpc64 or powerpc64le.
Then, as we can see, the build fails for all "powerpc"
configuration. Our conclusion is therefore that libquadmath is not
supported on PowerPC 32-bit. While we were not able to find direct
evidence in the gcc code base, this practical experiment shows that is
simply doesn't work on PowerPC 32-bit.
So, we take the logical action of adjusting
BR2_TOOLCHAIN_HAS_LIBQUADMATH so that it is true only on
powerpc64/powerpc64le.
Fixes:
https://autobuild.buildroot.org/results/46d435c9f5086a8695f4f6cd4026bb0d194de13c/
Cc: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
toolchain/Config.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 7762106bee..128f8faef2 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -989,12 +989,12 @@ config BR2_TOOLCHAIN_HAS_ATOMIC
# - At least, libquadmath is available on:
# - i*86
# - x86_64
-# - PowerPC with vector scalar (VSX) instruction set
+# - PowerPC64 with vector scalar (VSX) instruction set
# - When available, libquadmath requires wchar support.
config BR2_TOOLCHAIN_HAS_LIBQUADMATH
bool
default y if BR2_i386 || BR2_x86_64
- default y if BR2_POWERPC_CPU_HAS_VSX
+ default y if (BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_VSX
comment "Bare metal toolchain"
--
2.55.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Buildroot] [PATCH] toolchain/Config.in: refine BR2_TOOLCHAIN_HAS_LIBQUADMATH definition
2026-08-23 19:19 [Buildroot] [PATCH] toolchain/Config.in: refine BR2_TOOLCHAIN_HAS_LIBQUADMATH definition Thomas Petazzoni via buildroot
@ 2026-08-25 8:34 ` Peter Korsgaard
2026-09-04 12:18 ` Thomas Perale via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2026-08-25 8:34 UTC (permalink / raw)
To: Thomas Petazzoni via buildroot
Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti, Romain Naour
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
> In commit a2380157f6688c5c065fa19060a2c33145bab95b ("toolchain: enable
> libquadmath for PowerPC with VSX"), the definition of
> BR2_TOOLCHAIN_HAS_LIBQUADMATH has been extended to also be true when
> BR2_POWERPC_CPU_HAS_VSX.
> However, practical experiments show that when 64-bit VSX-capable cores
> are used in 32-bit mode, libquadmath is not built by GCC, causing
> build failures:
> cp: cannot stat
> '/home/autobuild/autobuild/instance-3/output-1/host/powerpc-buildroot-linux-musl/lib*/libquadmath*':
> No such file or directory
> We did an extensive testing, building the 27 combinations of:
> - GCC versions: 14, 15, 16
> - C library: glibc, uclibc, musl
> - PowerPC 32-bit, PowerPC 64-bit, PowerPC 64-bit little endian
Wow ;)
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Buildroot] [PATCH] toolchain/Config.in: refine BR2_TOOLCHAIN_HAS_LIBQUADMATH definition
2026-08-23 19:19 [Buildroot] [PATCH] toolchain/Config.in: refine BR2_TOOLCHAIN_HAS_LIBQUADMATH definition Thomas Petazzoni via buildroot
2026-08-25 8:34 ` Peter Korsgaard
@ 2026-09-04 12:18 ` Thomas Perale via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Perale via buildroot @ 2026-09-04 12:18 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Thomas Perale, buildroot
In reply of:
> In commit a2380157f6688c5c065fa19060a2c33145bab95b ("toolchain: enable
> libquadmath for PowerPC with VSX"), the definition of
> BR2_TOOLCHAIN_HAS_LIBQUADMATH has been extended to also be true when
> BR2_POWERPC_CPU_HAS_VSX.
>
> However, practical experiments show that when 64-bit VSX-capable cores
> are used in 32-bit mode, libquadmath is not built by GCC, causing
> build failures:
>
> cp: cannot stat '/home/autobuild/autobuild/instance-3/output-1/host/powerpc-buildroot-linux-musl/lib*/libquadmath*': No such file or directory
>
> We did an extensive testing, building the 27 combinations of:
>
> - GCC versions: 14, 15, 16
> - C library: glibc, uclibc, musl
> - PowerPC 32-bit, PowerPC 64-bit, PowerPC 64-bit little endian
>
> This testing provides the following results:
>
> | gcc14 | powerpc64 | glibc | OK |
> | gcc14 | powerpc64le | glibc | OK |
> | gcc14 | powerpc64le | musl | OK |
> | gcc14 | powerpc64le | uclibc | SKIPPED |
> | gcc14 | powerpc64 | musl | OK |
> | gcc14 | powerpc64 | uclibc | SKIPPED |
> | gcc14 | powerpc | glibc | FAILED |
> | gcc14 | powerpc | musl | FAILED |
> | gcc14 | powerpc | uclibc | FAILED |
> | gcc15 | powerpc64 | glibc | OK |
> | gcc15 | powerpc64le | glibc | OK |
> | gcc15 | powerpc64le | musl | OK |
> | gcc15 | powerpc64le | uclibc | SKIPPED |
> | gcc15 | powerpc64 | musl | OK |
> | gcc15 | powerpc64 | uclibc | SKIPPED |
> | gcc15 | powerpc | glibc | FAILED |
> | gcc15 | powerpc | musl | FAILED |
> | gcc15 | powerpc | uclibc | FAILED |
> | gcc16 | powerpc64 | glibc | OK |
> | gcc16 | powerpc64le | glibc | OK |
> | gcc16 | powerpc64le | musl | OK |
> | gcc16 | powerpc64le | uclibc | SKIPPED |
> | gcc16 | powerpc64 | musl | OK |
> | gcc16 | powerpc64 | uclibc | SKIPPED |
> | gcc16 | powerpc | glibc | FAILED |
> | gcc16 | powerpc | musl | FAILED |
> | gcc16 | powerpc | uclibc | FAILED |
>
> The "SKIPPED" are when the configuration is not possible: uClibc
> doesn't support powerpc64 or powerpc64le.
>
> Then, as we can see, the build fails for all "powerpc"
> configuration. Our conclusion is therefore that libquadmath is not
> supported on PowerPC 32-bit. While we were not able to find direct
> evidence in the gcc code base, this practical experiment shows that is
> simply doesn't work on PowerPC 32-bit.
>
> So, we take the logical action of adjusting
> BR2_TOOLCHAIN_HAS_LIBQUADMATH so that it is true only on
> powerpc64/powerpc64le.
>
> Fixes:
>
> https://autobuild.buildroot.org/results/46d435c9f5086a8695f4f6cd4026bb0d194de13c/
>
> Cc: Romain Naour <romain.naour@smile.fr>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Applied to 2025.02.x & 2026.05.x. Thanks
> ---
> toolchain/Config.in | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index 7762106bee..128f8faef2 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -989,12 +989,12 @@ config BR2_TOOLCHAIN_HAS_ATOMIC
> # - At least, libquadmath is available on:
> # - i*86
> # - x86_64
> -# - PowerPC with vector scalar (VSX) instruction set
> +# - PowerPC64 with vector scalar (VSX) instruction set
> # - When available, libquadmath requires wchar support.
> config BR2_TOOLCHAIN_HAS_LIBQUADMATH
> bool
> default y if BR2_i386 || BR2_x86_64
> - default y if BR2_POWERPC_CPU_HAS_VSX
> + default y if (BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_VSX
>
> comment "Bare metal toolchain"
>
> --
> 2.55.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-04 12:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-23 19:19 [Buildroot] [PATCH] toolchain/Config.in: refine BR2_TOOLCHAIN_HAS_LIBQUADMATH definition Thomas Petazzoni via buildroot
2026-08-25 8:34 ` Peter Korsgaard
2026-09-04 12:18 ` Thomas Perale via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox