[PATCH, V2] Add conversions between _Float128 and Decimal.
Segher Boessenkool
segher@kernel.crashing.org
Mon Mar 29 14:05:09 GMT 2021
Hi!
On Sat, Mar 27, 2021 at 04:07:18PM +0100, Florian Weimer wrote:
> * Michael Meissner via Gcc-patches:
> > On Wed, Feb 24, 2021 at 11:12:54PM +0000, Joseph Myers wrote:
> >> This change appears to have broken builds for powerpc in a configuration
> >> that bootstraps a cross toolchain starting with a GCC build with no libc
> >> available.
> >>
> >> Specifically, such a bootstrap build uses --disable-decimal-float among
> >> other options (in the first GCC build before libc has been built), to
> >> disable GCC target library code that has any dependence on libc or libc
> >> headers - dfp-bit.c uses libc headers, without an inhibit_libc
> >> conditional, so cannot be used in such a bootstrap configuration. Most of
> >> the DFP code in libgcc is disabled by --disable-decimal-float, but it
> >> seems the new conversions are not. This results in errors of the form:
> >>
> >> In file included from /scratch/jmyers/glibc-bot/src/gcc/libgcc/config/rs6000/_kf_to_sd.c:37:
> >> /scratch/jmyers/glibc-bot/src/gcc/libgcc/dfp-bit.c:32:10: fatal error: stdio.h: No such file or directory
> >> 32 | #include <stdio.h>
> >> | ^~~~~~~~~
> >> compilation terminated.
> >>
> >> The appropriate fix is not to build any of these new conversions in the
> >> --disable-decimal-float case. (That clearly makes sense anyway, even in
> >> the absence of the bootstrap issue.)
> >>
> >> https://sourceware.org/pipermail/libc-testresults/2021q1/007576.html
> >
> > Thanks. I agree if --disable-decimal-float is used we should not build the
> > conversions. And we want to eliminate the stdio.h dependency. I will look at
> > it unless somebody has already fixed it.
>
> This issue is still present.
>
> What about the patch below?
>
> Thanks,
> Florian
>
> rs6000: Do not build _Float128/Decimal routines with --disable-decimal-float
>
> Fixes commit 781183595acba67a37c66f59a0c1d9b5fee7e248 ("Add conversions
> between _Float128 and Decimal.).
That seems likely. Okay for trunk if Mike agrees. Thanks!
Segher
> libgcc/
> * config/rs6000/t-float128 (fp128_ppc_funcs): Add decimal floating
> point functions for $(decimal_float) only.
More information about the Gcc-patches
mailing list