Re: [Buildroot] S390 Buildroot/gcc build issue

Alexander Egorenkov <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
Thomas Petazzoni <[email protected]> writes:

> 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.
>

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.