diff mbox series

package/gcc: enable decimal float on s390

Message ID 20260827212125.1988552-2-romain.naour@smile.fr
State New
Headers show
Series package/gcc: enable decimal float on s390 | expand

Commit Message

Romain Naour Aug. 27, 2026, 9:21 p.m. UTC
Floating-point type _Float16 added in gcc-16 on s390 now requires
decimal floating-point support enabled in the toolchain [1][2].

Without decimal floating-point, gcc 16.2.0 fails to build with:

../../../libgcc/config/s390/_dpd_sd_to_hf.c:27:25: error: decimal floating-point not supported for this target
   27 | HFtype __dpd_truncsdhf (_Decimal32);
      |                         ^~~~~~~~~~
../../../libgcc/config/s390/_dpd_sd_to_hf.c:31:16: error: decimal floating-point not supported for this target
   31 | force_convert (_Decimal32 x)
      |                ^~~~~~~~~~
../../../libgcc/config/s390/_dpd_hf_to_td.c:34:1: error: decimal floating-point not supported for this target
   34 | _Decimal128
      | ^~~~~~~~~~~
../../../libgcc/config/s390/_dpd_sd_to_hf.c:35:18: error: decimal floating-point not supported for this target
   35 | __dpd_truncsdhf (_Decimal32 x)

Enable decimal floating-point support as suggested by Alexander
Egorenkov.

Fixes:
https://lore.kernel.org/buildroot/ansJ5dXXblvYeMLB@windsurf/

[1] https://gcc.gnu.org/gcc-16/changes.html#s390
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5d6d56d837c3dbeabd382c1fb4f7d21d9891f4b9

Cc: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 package/gcc/gcc.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Julien Olivain Sept. 1, 2026, 9:57 p.m. UTC | #1
On 27/08/2026 23:21, Romain Naour via buildroot wrote:
> Floating-point type _Float16 added in gcc-16 on s390 now requires
> decimal floating-point support enabled in the toolchain [1][2].
> 
> Without decimal floating-point, gcc 16.2.0 fails to build with:
> 
> ../../../libgcc/config/s390/_dpd_sd_to_hf.c:27:25: error: decimal 
> floating-point not supported for this target
>    27 | HFtype __dpd_truncsdhf (_Decimal32);
>       |                         ^~~~~~~~~~
> ../../../libgcc/config/s390/_dpd_sd_to_hf.c:31:16: error: decimal 
> floating-point not supported for this target
>    31 | force_convert (_Decimal32 x)
>       |                ^~~~~~~~~~
> ../../../libgcc/config/s390/_dpd_hf_to_td.c:34:1: error: decimal 
> floating-point not supported for this target
>    34 | _Decimal128
>       | ^~~~~~~~~~~
> ../../../libgcc/config/s390/_dpd_sd_to_hf.c:35:18: error: decimal 
> floating-point not supported for this target
>    35 | __dpd_truncsdhf (_Decimal32 x)
> 
> Enable decimal floating-point support as suggested by Alexander
> Egorenkov.
> 
> Fixes:
> https://lore.kernel.org/buildroot/ansJ5dXXblvYeMLB@windsurf/
> 
> [1] https://gcc.gnu.org/gcc-16/changes.html#s390
> [2] 
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5d6d56d837c3dbeabd382c1fb4f7d21d9891f4b9
> 
> Cc: Alexander Egorenkov <egorenar@linux.ibm.com>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Applied to master, thanks.
diff mbox series

Patch

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 04ba70c52c..c183bf8848 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -70,7 +70,6 @@  HOST_GCC_COMMON_CONF_OPTS = \
 	--with-gnu-ld \
 	--disable-libssp \
 	--disable-multilib \
-	--disable-decimal-float \
 	--enable-plugins \
 	--enable-lto \
 	--with-gmp=$(HOST_DIR) \
@@ -80,6 +79,15 @@  HOST_GCC_COMMON_CONF_OPTS = \
 	--with-bugurl="https://gitlab.com/buildroot.org/buildroot/-/issues" \
 	--without-zstd
 
+# https://gcc.gnu.org/gcc-16/changes.html#s390
+# Floating-point type _Float16 added in gcc-16 on s390 now requires
+# decimal float support enabled in the toolchain.
+ifeq ($(BR2_s390x)$(BR2_TOOLCHAIN_GCC_AT_LEAST_16),yy)
+HOST_GCC_COMMON_CONF_OPTS += --enable-decimal-float
+else
+HOST_GCC_COMMON_CONF_OPTS += --disable-decimal-float
+endif
+
 ifeq ($(BR2_REPRODUCIBLE),y)
 HOST_GCC_COMMON_CONF_OPTS += --with-debug-prefix-map=$(BASE_DIR)=buildroot
 endif