From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id AC175389603D; Thu, 17 Dec 2020 16:20:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC175389603D 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-6234] libstdc++: Fix condition for gthreads-timed effective-target X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: ec2a58a36ae14be4793c04c0bab183734aeb0312 X-Git-Newrev: b2bc1bb6cabf30f332938d648fe6432a3a9d27b6 Message-Id: <20201217162032.AC175389603D@sourceware.org> Date: Thu, 17 Dec 2020 16:20:32 +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: Thu, 17 Dec 2020 16:20:32 -0000 https://gcc.gnu.org/g:b2bc1bb6cabf30f332938d648fe6432a3a9d27b6 commit r11-6234-gb2bc1bb6cabf30f332938d648fe6432a3a9d27b6 Author: Jonathan Wakely Date: Thu Dec 17 14:28:17 2020 +0000 libstdc++: Fix condition for gthreads-timed effective-target The refactoring in r11-5500 altered the condition for the gthreads-timed test from #if to #ifdef. For some reason that macro is always defined, rather than being defined to 1 or undefined like most of our autoconf macros. That means the test always passes now, even for targets where the macro is defined to 0 (specifically, Darwin). That causes some tests to FAIL when they should have been UNSUPPORTED. This restores the previous behaviour. libstdc++-v3/ChangeLog: * testsuite/lib/libstdc++.exp (check_v3_target_gthreads_timed): Fix condition for _GTHREAD_USE_MUTEX_TIMEDLOCK test. Diff: --- libstdc++-v3/testsuite/lib/libstdc++.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index aeb881f91a6..b7d7b906de4 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -1129,7 +1129,7 @@ proc check_effective_target_gthreads { } { proc check_v3_target_gthreads_timed { } { return [check_v3_target_prop_cached et_gthreads_timed { if [check_v3_target_gthreads] { - set cond "defined _GTHREAD_USE_MUTEX_TIMEDLOCK" + set cond "_GTHREAD_USE_MUTEX_TIMEDLOCK" return [v3_check_preprocessor_condition gthreads_timed $cond] } else { return 0