From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id E6750385BF9E; Tue, 23 Mar 2021 15:02:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6750385BF9E MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-7790] libstdc++: Disable "ALT128" long double support for Clang X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 831f9f768eb1fbf9a31d9a89591188b1487b6376 X-Git-Newrev: baef0cffb58be7f5d9aeac6313ea9d8becc017b1 Message-Id: <20210323150205.E6750385BF9E@sourceware.org> Date: Tue, 23 Mar 2021 15:02:05 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 15:02:06 -0000 https://gcc.gnu.org/g:baef0cffb58be7f5d9aeac6313ea9d8becc017b1 commit r11-7790-gbaef0cffb58be7f5d9aeac6313ea9d8becc017b1 Author: Jonathan Wakely Date: Tue Mar 23 13:08:32 2021 +0000 libstdc++: Disable "ALT128" long double support for Clang Clang does not currently support the __ibm128 type [1] and only supports the __ieee128 type in the unreleased 12.0.0 version [2]. That means it is not possible to provide support for -mabi=ieeelongdouble with Clang in an ABI compatible way (as we do for GCC by defining new facets and other types in the __gnu_cxx_ldbl128 namespace). By preventing the definition of _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT when compiling with Clang, all uses of __ibm128 and __ieee128 types will be disabled. This can be revisited in future when Clang supports the types (and provides a way to detect that support using the preprocessor). [1] https://reviews.llvm.org/D93377 [2] https://reviews.llvm.org/D97846 libstdc++-v3/ChangeLog: * include/bits/c++config (_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT): Do not define when compiling with Clang. Diff: --- libstdc++-v3/include/bits/c++config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index b57ff339990..72ec91949de 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -425,9 +425,12 @@ _GLIBCXX_END_NAMESPACE_VERSION // GLIBCXX_ABI Deprecated // Define if compatibility should be provided for -mlong-double-64. #undef _GLIBCXX_LONG_DOUBLE_COMPAT + // Define if compatibility should be provided for alternative 128-bit long -// double formats. +// double formats. Not possible for Clang until __ibm128 is supported. +#ifndef __clang__ #undef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT +#endif // Inline namespaces for long double 128 modes. #if defined _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT \