From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id E9A8A3857C46; Tue, 12 Apr 2022 20:18:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9A8A3857C46 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-9834] libstdc++: Disable atomic wait for freestanding [PR105021] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: 105f1c08369aa6702d070f911dd658b93230ac46 X-Git-Newrev: ac0e9b696c362fdd49752260ca7b3ce9e467ec36 Message-Id: <20220412201813.E9A8A3857C46@sourceware.org> Date: Tue, 12 Apr 2022 20:18:13 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2022 20:18:14 -0000 https://gcc.gnu.org/g:ac0e9b696c362fdd49752260ca7b3ce9e467ec36 commit r11-9834-gac0e9b696c362fdd49752260ca7b3ce9e467ec36 Author: Jonathan Wakely Date: Tue Mar 22 21:17:01 2022 +0000 libstdc++: Disable atomic wait for freestanding [PR105021] We use either condition variables or futexes to implement atomic waits, so we can't do it in freestanding. This is non-conforming, so should be revisited later, probably by making freestanding atomic waiting operations spin without ever blocking. Reviewed-by: Thomas Rodgers libstdc++-v3/ChangeLog: PR libstdc++/105021 * include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include for freestanding. (cherry picked from commit 5bf59b004808abf6acbfe5ef54a0f9216b8dce22) Diff: --- libstdc++-v3/include/bits/atomic_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index 2db35722ce0..60b976bf8d1 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -37,7 +37,7 @@ #include #include -#if __cplusplus > 201703L +#if __cplusplus > 201703L && _GLIBCXX_HOSTED #include #endif