[PATCH] Provide _Float128 for Clang
H.J. Lu
hjl.tools@gmail.com
Wed Dec 18 02:24:12 GMT 2024
On Wed, Dec 18, 2024, 10:02 AM Andrew Pinski <pinskia@gmail.com> wrote:
> On Tue, Dec 17, 2024 at 5:40 PM Andrew Pinski <pinskia@gmail.com> wrote:
> >
> > On Tue, Dec 17, 2024 at 5:36 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> > >
> > > Since Clang doesn't provide _Float128:
> > >
> > > test-fesetexcept-traps.c:67:3: error: unknown type name '_Float128'
> > > 67 | math_force_eval (b);
> > > | ^
> > > ../sysdeps/x86/fpu/math-barriers.h:34:49: note: expanded from macro
> 'math_force_eval'
> > > 34 | || __builtin_types_compatible_p (__typeof (x),
> _Float128)) \
> > > | ^
> > >
> > > provide it for Clang.
> >
> > I think this is wrong. I think it is better to fix clang to provide
> > the standard names.
> > Also this will NOT work on many targets where _Float128/__float128
> > does not exists.
>
> By the way the missing _Float128 support in clang/LLVM is
> https://github.com/llvm/llvm-project/issues/97335 .
>
This is a compile time failure. Without a fix, clang can't finish glibc
testing.
> Thanks,
> Andrew Pinski
>
> >
> > Thanks,
> > Andrew Pinski
> >
> > >
> > > Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> > > ---
> > > include/libc-symbols.h | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/include/libc-symbols.h b/include/libc-symbols.h
> > > index 4367aa6740..1add2c825f 100644
> > > --- a/include/libc-symbols.h
> > > +++ b/include/libc-symbols.h
> > > @@ -46,6 +46,11 @@
> > > wrapper headers. */
> > > #if IS_IN (testsuite) || defined IS_IN_build || defined __cplusplus
> > > # define _ISOMAC 1
> > > +
> > > +/* Provide _Float128 for Clang which doesn't predefine _Float128. */
> > > +# if !defined __ASSEMBLER__ && defined __clang__
> > > +typedef __float128 _Float128;
> > > +# endif
> > > #endif
> > >
> > > #else
> > > --
> > > 2.47.1
> > >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20241218/50b19c7e/attachment-0001.htm>
More information about the Libc-alpha
mailing list