diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-01-10 20:48:53 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-01-11 13:28:46 +0000 |
commit | 265d3e1a4e3d6c71d354f859302f023dc2d33f62 (patch) | |
tree | 5b1571d3734b6991d9d70a9b400e6a345db19eee /libstdc++-v3/include/Makefile.am | |
parent | e4fe6dba90b831dbd8f5e23041c5e0e8bdd75332 (diff) | |
download | gcc-265d3e1a4e3d6c71d354f859302f023dc2d33f62.zip gcc-265d3e1a4e3d6c71d354f859302f023dc2d33f62.tar.gz gcc-265d3e1a4e3d6c71d354f859302f023dc2d33f62.tar.bz2 |
libstdc++: Install <coroutine> header for freestanding [PR103726]
The standard says that <coroutine> should be present for freestanding.
That was intentionally left out of the initial implementation, but can
be done without much trouble. The header should be moved to libsupc++ at
some point in stage 1.
The standard also says that <coroutine> defines a std::hash
specialization, which was missing from our implementation. That's a
problem for freestanding (see LWG 3653) so only do that for hosted.
We can use concepts to constrain the __coroutine_traits_impl base class
when compiled with concepts enabled. In a pure C++20 implementation we
would not need that base class at all and could just use a constrained
partial specialization of coroutine_traits. But the absence of the
__coroutine_traits_impl<R, void> base would create an ABI difference
between the non-standard C++14/C++17 support for coroutines and the same
code compiled as C++20. If we drop support for <coroutine> pre-C++20 we
should revisit this.
libstdc++-v3/ChangeLog:
PR libstdc++/103726
* include/Makefile.am: Install <coroutine> for freestanding.
* include/Makefile.in: Regenerate.
* include/std/coroutine: Adjust headers and preprocessor
conditions.
(__coroutine_traits_impl): Use concepts when available.
[_GLIBCXX_HOSTED] (hash<coroutine_handle>): Define.
Diffstat (limited to 'libstdc++-v3/include/Makefile.am')
-rw-r--r-- | libstdc++-v3/include/Makefile.am | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 7afebb5..8f93bf2 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -1425,7 +1425,7 @@ endif # This is a subset of the full install-headers rule. We only need <ciso646>, # <cstddef>, <cfloat>, <limits>, <climits>, <version>, <cstdint>, <cstdlib>, # <new>, <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>, -# <concepts>, <cstdbool>, <type_traits>, <bit>, <atomic>, +# <concepts>, <coroutine>, <cstdbool>, <type_traits>, <bit>, <atomic>, # and any files which they include (and which we provide). # <new>, <typeinfo>, <exception>, <initializer_list> and <compare> # are installed by libsupc++, so only the others and the sub-includes @@ -1440,7 +1440,7 @@ install-freestanding-headers: ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir} - for file in limits type_traits atomic bit concepts version; do \ + for file in limits type_traits atomic bit concepts coroutine version; do \ $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} for file in ciso646 cstddef cfloat climits cstdint cstdlib \ |