From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 924533896804 for ; Thu, 17 Dec 2020 16:21:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 924533896804 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-230-dyqmTcm0MNOkOqjzRls7Qw-1; Thu, 17 Dec 2020 11:21:10 -0500 X-MC-Unique: dyqmTcm0MNOkOqjzRls7Qw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3443A1842148; Thu, 17 Dec 2020 16:21:09 +0000 (UTC) Received: from localhost (unknown [10.33.36.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6C7560C15; Thu, 17 Dec 2020 16:21:08 +0000 (UTC) Date: Thu, 17 Dec 2020 16:21:07 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Iain Sandoe Subject: [committed] libstdc++: Fix condition for gthreads-timed effective-target Message-ID: <20201217162107.GA1219110@redhat.com> MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2020 16:21:14 -0000 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit b2bc1bb6cabf30f332938d648fe6432a3a9d27b6 Author: Jonathan Wakely 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 --ZGiS0Q5IWpPtfppv--