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.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797

Reply via email to