Commit 23c3cbae authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Fix bootstrap for --disable-threads build [PR107221]

The __scoped_lock type should be used unqualified so that we always
refer to pool::__scoped_lock, which might be the dummy fallback
implementation.

The __mutex and __scoped_lock types in <ext/concurrence.h> already work
fine without __GTHREADS being defined, but that header isn't included at
all unless _GLIBCXX_HOSTED != 0. The fallback implementation should be
used for ! _GLIBCXX_HOSTED instead of for !defined __GTHREADS.

libstdc++-v3/ChangeLog:

	PR bootstrap/107221
	* libsupc++/eh_alloc.cc (pool): Change preprocessor condition
	for using __mutex from __GTHREADS to _GLIBCXX_HOSTED.
	(pool::allocate): Remove namespace qualification to use
	pool::__scoped_lock instead of __gnu_cxx::__scoped_lock.
parent 9736a42e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment