Hi Olivier,

On Wed, Oct 03, 2018 at 09:35:35PM +0200, Olivier Hainque wrote:
> With a forthcoming micro cleanup patch to the 32bits powerpc-vxworks
> port (arranging to define __powerpc__ in addition to a few others), 
> the port fails to build with:
> 
>   In file included from 
> ../../../../src/libgcc/config/rs6000/ibm-ldouble.c:384:
>   ../../../../src/libgcc/soft-fp/quad.h:72:1: error: unable to emulate 'TF'
> 
> The port doesn't support 128bit floats so the attempt to compile
> ibm-ldouble.c is surprising.
> 
> The whole source is guarded with a number of conditions already:
> 
> #if (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)) \
>   && !defined (__rtems__)
> 
> The file starts with:
> 
> /* 128-bit long double support routines for Darwin.
> 
> so presumably none of this is needed when the target
> doesn't have support for 128bit FP types at all.
> 
> rs6000_init_libfuncs tells us when we get to initialize
> float128 libcalls:
> 
> rs6000_init_libfuncs (void)
> {
> /* __float128 support.  */
> if (TARGET_FLOAT128_TYPE)
>   ...
> 
> /* AIX/Darwin/64-bit Linux quad floating point routines.  */
> if (TARGET_LONG_DOUBLE_128)
>   ...
> }
> 
> Then rs6000_cpu_cpp_builtins tells what macros get
> defined when the two target attributes above are true:
> 
> if (TARGET_FLOAT128_TYPE)
>   builtin_define ("__FLOAT128_TYPE__");
> 
> if (TARGET_LONG_DOUBLE_128)
>   {
>     builtin_define ("__LONG_DOUBLE_128__");
> 
> This suggests the attached patchlet, which cures the VxWorks
> build issue.
> 
> I'd appreciate feedback on the idea before going on with
> further testing deemed appropriate.
> 
> How does that look ?

I think it looks fine.  Okay for trunk after some testing.

(Please don't use application/octet-stream for patches btw).


Segher

Reply via email to