On 03/11/20 22:22 +0100, Christophe Lyon via Libstdc++ wrote:
On Mon, 2 Nov 2020 at 19:43, Thomas Rodgers via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
Testsed x86_64-pc-linux-gnu, committed to master.
Hi,
I can see the new tests failing on bare-metal targets using newlib
(arm-eabi, aarch64-elf):
27_io/basic_syncbuf/1.cc (test for excess errors)
27_io/basic_syncbuf/basic_ops/1.cc (test for excess errors)
27_io/basic_syncbuf/requirements/types.cc (test for excess errors)
27_io/basic_syncstream/1.cc (test for excess errors)
27_io/basic_syncstream/basic_ops/1.cc (test for excess errors)
27_io/basic_syncstream/requirements/types.cc (test for excess errors)
because:
libstdc++-v3/include/syncstream:142: error: 'lock_guard' does not name a type
Fixed like so. Tested powerpc64le-linux (--disable-threads) and pushed
to trunk.
commit e1276e334298251d73303999d2adc688abbfc856
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Tue Nov 3 21:56:44 2020
libstdc++: Ensure std::lock_guard is declared
libstdc++-v3/ChangeLog:
* include/std/syncstream: Include <bits/std_mutex.h>
unconditionally.
diff --git a/libstdc++-v3/include/std/syncstream b/libstdc++-v3/include/std/syncstream
index 5e0864ec54a8..9d1db0cf286e 100644
--- a/libstdc++-v3/include/std/syncstream
+++ b/libstdc++-v3/include/std/syncstream
@@ -44,10 +44,7 @@
#include <bits/allocator.h>
#include <bits/functexcept.h>
#include <bits/functional_hash.h>
-
-#if _GLIBCXX_HAS_GTHREADS
-# include <bits/std_mutex.h>
-#endif
+#include <bits/std_mutex.h>
namespace std _GLIBCXX_VISIBILITY(default)
{