[Bug libstdc++/66146] call_once not C++11-compliant on ppc64le

libor.bukata at oracle dot com gcc-bugzilla@gcc.gnu.org
Thu Feb 11 08:00:07 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146

--- Comment #39 from Libor Bukata <libor.bukata at oracle dot com> ---
(In reply to Libor Bukata from comment #38)
> (In reply to Jonathan Wakely from comment #34)
> > Untested sketch of a solution for Solaris and BSDs:
> > https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557928.html
> 
> Thank you for the patch, I will test it on Solaris
> and let you know when I have the results.

Patched GCC master with Jonathan's patch, but unfortunately it is not
compilable on Solaris 11:
In file included from
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/sparcv9-sun-solaris2.11/bits/c++config.h:568,
                 from
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/cassert:43,
                 from
/gcc_nightly/gcc-11.0.0-master/libstdc++-v3/include/precompiled/stdc++.h:33:
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/mutex:861:10:
error: token "{" is not valid in preprocessor expressions
  861 |       || _GLIBCXX_COMPAT_PTHREAD_ONCE_T
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/sparcv9-sun-solaris2.11/bits/c++config.h:568,
                 from
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/cassert:43,
                 from
/gcc_nightly/gcc-11.0.0-master/libstdc++-v3/include/precompiled/stdc++.h:33:
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/mutex:861:10:
error: token "{" is not valid in preprocessor expressions
  861 |       || _GLIBCXX_COMPAT_PTHREAD_ONCE_T
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/future:38,
                 from
/gcc_nightly/gcc-11.0.0-master/libstdc++-v3/include/precompiled/stdc++.h:105:
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/mutex:675:15:
error: explicitly defaulted function 'constexpr std::once_flag::once_flag()'
cannot be declared 'constexpr' because the implicit declaration is not
'constexpr':
  675 |     constexpr once_flag() noexcept = default;
      |               ^~~~~~~~~
/gcc_nightly/build/sparcv9/sparcv9-sun-solaris2.11/libstdc++-v3/include/mutex:699:12:
note: defaulted constructor calls non-'constexpr'
'std::once_flag::_Once::_Once()'
  699 |     struct _Once _GLIBCXX_COMPAT_PTHREAD_ONCE_T;

Note that there was a merge conflict with the current master, however, its
resolution was straightforward. If there is an updated patch, I will be happy
to test it as well.


More information about the Gcc-bugs mailing list