Hello.
There's a patch attempt for the problem with std::thread::hardware_concurrency
where
it's used only if _GLIBCXX_HAS_GTHREADS is set.
Does it help?
Thanks,
Martin
gcc/ChangeLog:
PR bootstrap/100186
* lto-wrapper.c: Use hardware_concurrency only if
_GLIBCXX_HAS_GTHREADS.
---
gcc/lto-wrapper.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 6ba401007f6..8a85b3e93a8 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1285,7 +1285,11 @@ run_gcc (unsigned argc, char *argv[])
static char current_dir[] = { '.', DIR_SEPARATOR, '\0' };
/* Number of CPUs that can be used for parallel LTRANS phase. */
- unsigned long nthreads_var = std::thread::hardware_concurrency ();
+ unsigned long nthreads_var = 0;
+
+#ifdef _GLIBCXX_HAS_GTHREADS
+ nthreads_var = std::thread::hardware_concurrency ();
+#endif
/* Get the driver and options. */
collect_gcc = getenv ("COLLECT_GCC");
--
2.31.1