D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26
Blower, Melanie via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 13 04:33:28 PST 2018
> -----Original Message-----
> From: Szabolcs Nagy via Phabricator [mailto:reviews at reviews.llvm.org]
> Sent: Friday, January 12, 2018 3:18 PM
>
> nsz added a comment.
>
>
> it is not clear to me from the original bug report what "fedora 27 workloads"
> break because of the lack of _Float128 type on x86. The glibc headers refer to
> _Float128, but normal include should not break unless the compiler claims to be
> >=gcc-7 or somebody explicitly requested the _Float128 support.
[Blower, Melanie] I was building open source projects like ffmpeg, linux from scratch, and others. I was incorrect in my original post, I was using a patched compiler which led to _Float128 being exposed. In an unpatched clang this problem doesn't arise. I regret the lack of care taken in my analysis of the problem.
>
> if clang defines _Float128 then the headers "work" on x86 as in simple math.h
> include is not broken, but some macro definitions will use the f128 const suffix
> (e.g. FLT128_MAX) which won't cause much breakage now but in the future
> users will want to know whether they can use these macros or not.
>
> so either clang have to introduce all these features that are used by glibc
> together or provide ways for users (and glibc) to figure out what is supported
> and what isn't.
>
> on non-x86 targets a glibc fix can solve the problem such that they "work" on
> the same level as x86, i.e. no immediate build breakage on most code, but some
> features are not supported. i think that's the right way forward, but it's not clear
> if anybody has time to do the header changes in glibc before release (it has to be
> tested on several targets).
>
> if glibc is released as is today then those non-x86 targets don't want a _Float128
> definition in clang-6 that breaks any math.h include on a glibc-2.27 system.
>
> > (We have a bit of time before the 6.0 release, so we can adjust the behavior
> here to make it work. We probably don't want to try to add full _Float128
> support on the branch, though.)
>
>
>
>
> Repository:
> rC Clang
>
> https://reviews.llvm.org/D40673
>
>
More information about the cfe-commits
mailing list