From 789485b3e7a70e18c799ea330b3c184ce9ea245e Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Thu, 27 Aug 2026 23:21:24 +0200 Subject: [PATCH] package/gcc: enable decimal float on s390 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 Signed-off-by: Romain Naour Signed-off-by: Julien Olivain --- package/gcc/gcc.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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