summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/Makefile.in
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-01-10 20:48:53 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-01-11 13:28:46 +0000
commit265d3e1a4e3d6c71d354f859302f023dc2d33f62 (patch)
tree5b1571d3734b6991d9d70a9b400e6a345db19eee /libstdc++-v3/include/Makefile.in
parente4fe6dba90b831dbd8f5e23041c5e0e8bdd75332 (diff)
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.in')
-rw-r--r--libstdc++-v3/include/Makefile.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 0031f54f3fa..4ab942ae666 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -1906,7 +1906,7 @@ ${pch3_output}: ${pch3_source} ${pch2_output}
# 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
@@ -1921,7 +1921,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 \