S390 Buildroot/gcc build issue
Alexander,
I am contacting you regarding a build issue I'm seeing with the S390 architecture in Buildroot.
With the following defconfig:
BR2_s390x=y
BR2_KERNEL_HEADERS_6_12=y
BR2_PACKAGE_GLIBC_KERNEL_COMPAT=y
BR2_BINUTILS_VERSION_2_46_X=y
BR2_BINUTILS_GPROFNG=y
BR2_GCC_VERSION_16_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
BR2_GCC_ENABLE_OPENMP=y
BR2_PACKAGE_HOST_GDB=y
BR2_PACKAGE_HOST_GDB_TUI=y
BR2_PACKAGE_HOST_GDB_PYTHON3=y
BR2_GDB_VERSION_17=y
BR2_GNU_MIRROR="https://mirrors.kernel.org/gnu/"
BR2_PACKAGE_GDB=y
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)
| ^~~~~~~~~~I haven't checked whether this is new with gcc 16.x or not, and I'm not familiar with floating point support on S390.
Are you familiar with this issue?
I see the same issue with gcc 16.1.0 in the autobuilders:
https://autobuild.buildroot.net/results/f88/f88565af0f653df831a7fa43d2507d167fdb9d36/build-end.log
But I don't seem to see any issue with gcc 15.x, so my guess is that this is a new issue with gcc 16.x.
Any idea?
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 41 lines · Thomas Petazzoni
Alexander,
I am contacting you regarding a build issue I'm seeing with the S390 architecture in Buildroot.
With the following defconfig:
BR2_s390x=y
BR2_KERNEL_HEADERS_6_12=y
BR2_PACKAGE_GLIBC_KERNEL_COMPAT=y
BR2_BINUTILS_VERSION_2_46_X=y
BR2_BINUTILS_GPROFNG=y
BR2_GCC_VERSION_16_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
BR2_GCC_ENABLE_OPENMP=y
BR2_PACKAGE_HOST_GDB=y
BR2_PACKAGE_HOST_GDB_TUI=y
BR2_PACKAGE_HOST_GDB_PYTHON3=y
BR2_GDB_VERSION_17=y
BR2_GNU_MIRROR="https://mirrors.kernel.org/gnu/"
BR2_PACKAGE_GDB=ygcc 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 target27 | 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) | ^~~~~~~~~~I haven't checked whether this is new with gcc 16.x or not, and I'm not familiar with floating point support on S390.
Quoted 9 lines
Are you familiar with this issue?
I see the same issue with gcc 16.1.0 in the autobuilders:
https://autobuild.buildroot.net/results/f88/f88565af0f653df831a7fa43d2507d167fdb9d36/build-end.log
But I don't seem to see any issue with gcc 15.x, so my guess is that this is a new issue with gcc 16.x.
Hi,
the types _Decimal* require for the host compiler to be built with --enable-decimal-float.
package/gcc/gcc.mk:
-------------------
HOST_GCC_COMMON_CONF_OPTS = \ --target=$(GNU_TARGET_NAME) \ --with-sysroot=$(STAGING_DIR) \ --enable-__cxa_atexit \ --with-gnu-ld \ --disable-libssp \ --disable-multilib \ --disable-decimal-float <----- !!!
Can we turn --disable-decimal-float into --enable-decimal-float on s390x arch ? It fixed the problem for me.
package/gcc/gcc.mk:
-------------------
ifeq ($(BR2_s390x),y)
HOST_GCC_COMMON_CONF_OPTS += \ --with-long-double-128 \ --enable-decimal-float <----- !!!
endif
Regards
Alex
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Quoted 2 lines · Alexander Egorenkov
the types _Decimal* require for the host compiler to be built with --enable-decimal-float.
What do you call the "host compiler" in this context?
Are you talking about the native gcc compiler available on the host, or the cross-compiler built by Buildroot?
Quoted 4 lines
package/gcc/gcc.mk:
-------------------
Quoted 8 lines
HOST_GCC_COMMON_CONF_OPTS = \ --target=$(GNU_TARGET_NAME) \ --with-sysroot=$(STAGING_DIR) \ --enable-__cxa_atexit \ --with-gnu-ld \ --disable-libssp \ --disable-multilib \ --disable-decimal-float <----- !!!
These are the common options...
Quoted 10 lines
Can we turn --disable-decimal-float into --enable-decimal-float on s390x arch ? It fixed the problem for me.
package/gcc/gcc.mk:
-------------------ifeq ($(BR2_s390x),y)
HOST_GCC_COMMON_CONF_OPTS += \ --with-long-double-128 \ --enable-decimal-float <----- !!!
and for S390, it gets overridden.
See: it's the same variable that gets appended, so at the end we have:
HOST_GCC_COMMON_CONF_OPTS = \ [...] --disable-decimal-float \ [...] --enable-decimal-float
So on S390, the cross-compiler is built with --enable-decimal-float.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 4 lines · Thomas Petazzoni
Hello,
On Wed, Aug 12, 2026 at 11:11:10AM +0200, Alexander Egorenkov wrote:
Quoted 8 lines
Quoted 2 lines
the types _Decimal* require for the host compiler to be built with --enable-decimal-float.
What do you call the "host compiler" in this context?
Are you talking about the native gcc compiler available on the host, or the cross-compiler built by Buildroot?
A cross-compiler built by Buildroot.
Quoted 11 lines
and for S390, it gets overridden.
See: it's the same variable that gets appended, so at the end we have:
HOST_GCC_COMMON_CONF_OPTS = \ [...] --disable-decimal-float \ [...] --enable-decimal-floatSo on S390, the cross-compiler is built with --enable-decimal-float.
Sorry for not being clear here, this was added by me for testing ;-) I this change is okay, then i'll send a patch.
Not sure here, do we need to deal with Gcc 15 conditionally here ?
Regards
Alex
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Alexander,
Do you have some updates about the S390 gcc build issues? (See below).
Thanks a lot for your feedback,
Thomas
Quoted 57 lines · Thomas Petazzoni
Hello,
Quoted 2 lines · Alexander Egorenkov
the types _Decimal* require for the host compiler to be built with --enable-decimal-float.
What do you call the "host compiler" in this context?
Are you talking about the native gcc compiler available on the host, or the cross-compiler built by Buildroot?
Quoted 4 lines
package/gcc/gcc.mk:
-------------------Quoted 8 lines
HOST_GCC_COMMON_CONF_OPTS = \ --target=$(GNU_TARGET_NAME) \ --with-sysroot=$(STAGING_DIR) \ --enable-__cxa_atexit \ --with-gnu-ld \ --disable-libssp \ --disable-multilib \ --disable-decimal-float <----- !!!These are the common options...
Quoted 10 lines
Can we turn --disable-decimal-float into --enable-decimal-float on s390x arch ? It fixed the problem for me.
package/gcc/gcc.mk:
-------------------ifeq ($(BR2_s390x),y)
HOST_GCC_COMMON_CONF_OPTS += \ --with-long-double-128 \ --enable-decimal-float <----- !!!and for S390, it gets overridden.
See: it's the same variable that gets appended, so at the end we have:
HOST_GCC_COMMON_CONF_OPTS = \ [...] --disable-decimal-float \ [...] --enable-decimal-floatSo on S390, the cross-compiler is built with --enable-decimal-float.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot