Comment 2 for bug 1783705

Revision history for this message
Joel Stanley (shenki) wrote :

The error is due to clang using this header:

/usr/include/powerpc64le-linux-gnu/c++/8/bits/c++config.h

The difference between this header for gcc7 and gcc8:

--- /usr/include/powerpc64le-linux-gnu/c++/7/bits/c++config.h 2018-07-20 21:27:51.000000000 +0930
+++ /usr/include/powerpc64le-linux-gnu/c++/8/bits/c++config.h 2018-07-28 15:23:29.000000000 +0930
@@ -1550,7 +1531,7 @@ namespace std
 #define _GLIBCXX_USE_FCHMODAT 1

 /* Define if __float128 is supported on this host. */
-/* #undef _GLIBCXX_USE_FLOAT128 */
+#define _GLIBCXX_USE_FLOAT128 1

 /* Defined if gettimeofday is available. */
 #define _GLIBCXX_USE_GETTIMEOFDAY 1

$ dpkg -S /usr/include/powerpc64le-linux-gnu/c++/8/bits/c++config.h
libstdc++-8-dev:ppc64el: /usr/include/powerpc64le-linux-gnu/c++/8/bits/c++config.h

$ apt-cache policy libstdc++-8-dev
libstdc++-8-dev:
  Installed: 8.2.0-1ubuntu2

Upstream gcc has this change to c++config which would fix clang:

/* Define if __float128 is supported on this host. */
#if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
#define _GLIBCXX_USE_FLOAT128
#endif

https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=260043

    PR libstdc++/84654 Disable __float128 specializations for -mno-float128

    2018-05-01 Tulio Magno Quites Machado Filho <email address hidden>

            PR libstdc++/84654
            * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
            * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
            * configure: Regenerate.
            * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
            based on ENABLE_FLOAT128.
            * include/Makefile.in: Regenerate.
            * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
            [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
            _GLIBCXX_USE_FLOAT128.