https://gcc.gnu.org/g:7e5fe1837c79233a9cdb2fdef655f82f8cabdafb
commit r17-5392-g7e5fe1837c79233a9cdb2fdef655f82f8cabdafb Author: Jonathan Wakely <[email protected]> Date: Mon Oct 19 21:59:46 2026 +0100 libstdc++: Do not include <bits/indirect.h> for freestanding [PR127476] This header is not installed for freestanding builds, so we should not try to include it. We could consider making std::indirect and std::polymorphic available for freestanding, but that would be more effort as it requires installing <bits/new_allocator.h> and other headers. libstdc++-v3/ChangeLog: PR libstdc++/127476 * include/std/memory [!_GLIBCXX_HOSTED]: Do not include bits/indirect.h. Diff: --- libstdc++-v3/include/std/memory | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory index 0daf004fe950..aea83b6a7511 100644 --- a/libstdc++-v3/include/std/memory +++ b/libstdc++-v3/include/std/memory @@ -97,7 +97,7 @@ # include <bits/out_ptr.h> #endif -#if __cplusplus > 202302L +#if __cplusplus > 202302L && _GLIBCXX_HOSTED # include <bits/indirect.h> #endif
