public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Cc: Iain Sandoe <idsandoe@googlemail.com>
Subject: [committed] libstdc++: Fix condition for gthreads-timed effective-target
Date: Thu, 17 Dec 2020 16:21:07 +0000	[thread overview]
Message-ID: <20201217162107.GA1219110@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

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.

Tested powerpc64le-linux. Committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1479 bytes --]

commit b2bc1bb6cabf30f332938d648fe6432a3a9d27b6
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Dec 17 14:28:17 2020

    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 --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

                 reply	other threads:[~2020-12-17 16:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201217162107.GA1219110@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=idsandoe@googlemail.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).