libstdc++: Install <source_location> header for freestanding [PR103726]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 11 Jan 2022 17:47:17 +0000 (17:47 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 11 Jan 2022 18:36:36 +0000 (18:36 +0000)
This C++20 header is also supposed to be present for freestanding.

libstdc++-v3/ChangeLog:

PR libstdc++/103726
* include/Makefile.am: Install <source_location> for
freestanding.
* include/Makefile.in: Regenerate.
* include/std/version (__cpp_lib_source_location): Define for
freestanding.

libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/std/version

index 8f93bf2..8b1300e 100644 (file)
@@ -1426,7 +1426,7 @@ endif
 # <cstddef>, <cfloat>, <limits>, <climits>, <version>, <cstdint>, <cstdlib>,
 # <new>, <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
 # <concepts>, <coroutine>, <cstdbool>, <type_traits>, <bit>, <atomic>,
-# and any files which they include (and which we provide).
+# <source_location> 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
 # are copied here.
@@ -1440,7 +1440,8 @@ 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 coroutine version; do \
+       for file in limits type_traits atomic bit concepts coroutine \
+         source_location 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 \
index 4ab942a..3ff18fe 100644 (file)
@@ -1907,7 +1907,7 @@ ${pch3_output}: ${pch3_source} ${pch2_output}
 # <cstddef>, <cfloat>, <limits>, <climits>, <version>, <cstdint>, <cstdlib>,
 # <new>, <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
 # <concepts>, <coroutine>, <cstdbool>, <type_traits>, <bit>, <atomic>,
-# and any files which they include (and which we provide).
+# <source_location> 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
 # are copied here.
@@ -1921,7 +1921,8 @@ 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 coroutine version; do \
+       for file in limits type_traits atomic bit concepts coroutine \
+         source_location 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 \
index 012d78e..c5d5efb 100644 (file)
 #endif
 #define __cpp_lib_is_nothrow_convertible 201806L
 #define __cpp_lib_remove_cvref 201711L
+#if __has_builtin(__builtin_source_location)
+# define __cpp_lib_source_location 201907L
+#endif
 #if __cpp_impl_three_way_comparison >= 201907L && __cpp_lib_concepts
 # define __cpp_lib_three_way_comparison 201907L
 #endif
 # define __cpp_lib_semaphore 201907L
 #endif
 #define __cpp_lib_shift 201806L
-#if __has_builtin(__builtin_source_location)
-# define __cpp_lib_source_location 201907L
-#endif
 #if __cpp_lib_concepts
 # define __cpp_lib_span 202002L
 #endif