Hide all uses of __float128 from Clang. Brackets _GLIBCXX_USE_FLOAT128 with #ifndef __clang__. Clang does not ...
12 years, 10 months ago
(2012-05-09 15:19:01 UTC)
#1
Hide all uses of __float128 from Clang.
Brackets _GLIBCXX_USE_FLOAT128 with #ifndef __clang__. Clang does not
currently support the __float128 builtin, and so will fail to process
libstdc++ headers that use it.
Tested for full bootstrap and dejagnu testsuite.
Okay for google/integration and google/gcc-4_7-integration branches?
Thanks.
2012-05-09 Simon Baldwin <simonb@google.com>
* libstdc++-v3/acinclude.m4: Bracket _GLIBCXX_USE_FLOAT128
definition with ifndef __clang__.
* libstdc++-v3/config.h.in: Rebuild.
Index: libstdc++-v3/config.h.in
===================================================================
--- libstdc++-v3/config.h.in (revision 187148)
+++ libstdc++-v3/config.h.in (working copy)
@@ -799,8 +799,11 @@
this host. */
#undef _GLIBCXX_USE_DECIMAL_FLOAT
-/* Define if __float128 is supported on this host. */
+/* Define if __float128 is supported on this host.
+ Hide all uses of __float128 from Clang. Google ref b/6422845 */
+#ifndef __clang__
#undef _GLIBCXX_USE_FLOAT128
+#endif
/* Defined if gettimeofday is available. */
#undef _GLIBCXX_USE_GETTIMEOFDAY
Index: libstdc++-v3/acinclude.m4
===================================================================
--- libstdc++-v3/acinclude.m4 (revision 187148)
+++ libstdc++-v3/acinclude.m4 (working copy)
@@ -2529,10 +2529,16 @@ int main()
}
EOF
+ AH_VERBATIM([_GLIBCXX_USE_FLOAT128,],
+ [/* Define if __float128 is supported on this host.
+ Hide all uses of __float128 from Clang. Google ref b/6422845 */
+#ifndef __clang__
+#undef _GLIBCXX_USE_FLOAT128
+#endif])
+
AC_MSG_CHECKING([for __float128])
if AC_TRY_EVAL(ac_compile); then
- AC_DEFINE(_GLIBCXX_USE_FLOAT128, 1,
- [Define if __float128 is supported on this host.])
+ AC_DEFINE(_GLIBCXX_USE_FLOAT128, 1)
enable_float128=yes
else
enable_float128=no
--
This patch is available for review at http://codereview.appspot.com/6195066
On Wed, May 9, 2012 at 8:19 AM, Simon Baldwin <simonb@google.com> wrote: > > Hide ...
12 years, 10 months ago
(2012-05-09 15:33:34 UTC)
#3
On Wed, May 9, 2012 at 8:19 AM, Simon Baldwin <simonb@google.com> wrote:
>
> Hide all uses of __float128 from Clang.
>
> Brackets _GLIBCXX_USE_FLOAT128 with #ifndef __clang__. Clang does not
> currently support the __float128 builtin, and so will fail to process
> libstdc++ headers that use it.
>
> Tested for full bootstrap and dejagnu testsuite.
>
> Okay for google/integration and google/gcc-4_7-integration branches?
Please check this into google/gcc-4_7 as well.
Ollie
Issue 6195066: [google] Hide all uses of __float128 from Clang
Created 12 years, 10 months ago by simonb
Modified 12 years, 10 months ago
Reviewers: Diego Novillo, Ollie Wild
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/integration/
Comments: 0