From: Felix Morgner <[email protected]>

The <ranges> header was added to the freestanding headers in
r16-3575-g1a41e52d7ecb58 but bits/binders.h that it depends on was not
moved, making <ranges> unusable with --disable-libstdcxx-hosted.

libstdc++-v3/ChangeLog:

        PR libstdc++/125112
        * include/Makefile.am: Move bits/binders.h from bits_headers to
        bits_freestanding.
        * include/Makefile.in:
---

Tested x86_64-linux. Pushed to trunk and gcc-16.

As noted in bugzilla, <ranges> also uses <cwchar> so if you don't use
--disable-wchar_t with --disable-hosted-libstdcxx then you still can't
use <ranges> in a freestanding build. That can be fixed separately.

 libstdc++-v3/include/Makefile.am | 2 +-
 libstdc++-v3/include/Makefile.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index e9e46139da2f..ec932181a966 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -129,6 +129,7 @@ bits_freestanding = \
        ${bits_srcdir}/alloc_traits.h \
        ${bits_srcdir}/atomic_base.h \
        ${bits_srcdir}/c++0x_warning.h \
+       ${bits_srcdir}/binders.h \
        ${bits_srcdir}/boost_concept_check.h \
        ${bits_srcdir}/concept_check.h \
        ${bits_srcdir}/char_traits.h \
@@ -201,7 +202,6 @@ bits_headers = \
        ${bits_srcdir}/basic_ios.tcc \
        ${bits_srcdir}/basic_string.h \
        ${bits_srcdir}/basic_string.tcc \
-       ${bits_srcdir}/binders.h \
        ${bits_srcdir}/charconv.h \
        ${bits_srcdir}/chrono.h \
        ${bits_srcdir}/chrono_io.h \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index f3d2f58dbe42..00ae5209f604 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -487,6 +487,7 @@ bits_freestanding = \
        ${bits_srcdir}/alloc_traits.h \
        ${bits_srcdir}/atomic_base.h \
        ${bits_srcdir}/c++0x_warning.h \
+       ${bits_srcdir}/binders.h \
        ${bits_srcdir}/boost_concept_check.h \
        ${bits_srcdir}/concept_check.h \
        ${bits_srcdir}/char_traits.h \
@@ -557,7 +558,6 @@ bits_freestanding = \
 @GLIBCXX_HOSTED_TRUE@  ${bits_srcdir}/basic_ios.tcc \
 @GLIBCXX_HOSTED_TRUE@  ${bits_srcdir}/basic_string.h \
 @GLIBCXX_HOSTED_TRUE@  ${bits_srcdir}/basic_string.tcc \
-@GLIBCXX_HOSTED_TRUE@  ${bits_srcdir}/binders.h \
 @GLIBCXX_HOSTED_TRUE@  ${bits_srcdir}/charconv.h \
 @GLIBCXX_HOSTED_TRUE@  ${bits_srcdir}/chrono.h \
 @GLIBCXX_HOSTED_TRUE@  ${bits_srcdir}/chrono_io.h \
-- 
2.54.0

Reply via email to