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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 04C2E395CC6B for ; Wed, 2 Dec 2020 16:42:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 04C2E395CC6B 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-19-pQfME7YTMruZblkZeR-WDg-1; Wed, 02 Dec 2020 11:42:52 -0500 X-MC-Unique: pQfME7YTMruZblkZeR-WDg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E55B7100C665; Wed, 2 Dec 2020 16:42:50 +0000 (UTC) Received: from localhost (unknown [10.33.37.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E3A15D705; Wed, 2 Dec 2020 16:42:49 +0000 (UTC) Date: Wed, 2 Dec 2020 16:42:49 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Iain Sandoe , Mike Stump , David Edelsohn , Segher Boessenkool Subject: [committed] libstdc++: Use libatomic for tests on all 32-bit powerpc targets Message-ID: <20201202164249.GA3597508@redhat.com> MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline X-Spam-Status: No, score=-14.7 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_H3, 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: Wed, 02 Dec 2020 16:42:58 -0000 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In addition to the existing powerpc targets, powerpc64 needs libatomic for 64-bit atomics when testing the 32-bit multilib with -m32. Adjust the existing target checks to match all 32-bit powerpc targets, but not 64-bit ones. libstdc++-v3/ChangeLog: * testsuite/lib/dg-options.exp (add_options_for_libatomic): Replace powerpc-ibm-aix* and powerpc*-*-darwin* with check for powerpc && ilp32. Tested powerpc64-linux (with both -m32 and -m64) and powerpc-ibm-aix7.2.0.0 (with both -maix32 and -maix64) and powerpc64le-linux (-m64 only). Committed to trunk. --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit dd053eea0be4f3ec8b76fb2e103a13a3977bcf9f Author: Jonathan Wakely Date: Wed Dec 2 16:37:56 2020 libstdc++: Use libatomic for tests on all 32-bit powerpc targets In addition to the existing powerpc targets, powerpc64 needs libatomic for 64-bit atomics when testing the 32-bit multilib with -m32. Adjust the existing target checks to match all 32-bit powerpc targets, but not 64-bit ones. libstdc++-v3/ChangeLog: * testsuite/lib/dg-options.exp (add_options_for_libatomic): Replace powerpc-ibm-aix* and powerpc*-*-darwin* with check for powerpc && ilp32. diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp index d3f61cb5267..0102acf65a2 100644 --- a/libstdc++-v3/testsuite/lib/dg-options.exp +++ b/libstdc++-v3/testsuite/lib/dg-options.exp @@ -257,13 +257,14 @@ proc add_options_for_net_ts { flags } { return $flags } -# Add to FLAGS all the target-specific flags to link to libatomic, if required. +# Add to FLAGS all the target-specific flags to link to libatomic, +# if required for atomics on pointers and 64-bit types. proc add_options_for_libatomic { flags } { if { [istarget hppa*-*-hpux*] - || [istarget powerpc-ibm-aix*] - || [istarget powerpc*-*-darwin*] - || [istarget riscv*-*-*] } { + || ([istarget powerpc*-*-*] && [check_effective_target_ilp32]) + || [istarget riscv*-*-*] + } { return "$flags -L../../libatomic/.libs -latomic" } return $flags --3V7upXqbjpZ4EhLz--