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 <iain@sandoe.co.uk>,
	Mike Stump <mikestump@comcast.net>,
	David Edelsohn <dje.gcc@gmail.com>,
	Segher Boessenkool <segher@kernel.crashing.org>
Subject: [committed] libstdc++: Use libatomic for tests on all 32-bit powerpc targets
Date: Wed, 2 Dec 2020 16:42:49 +0000	[thread overview]
Message-ID: <20201202164249.GA3597508@redhat.com> (raw)

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

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.


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

commit dd053eea0be4f3ec8b76fb2e103a13a3977bcf9f
Author: Jonathan Wakely <jwakely@redhat.com>
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

                 reply	other threads:[~2020-12-02 16:42 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=20201202164249.GA3597508@redhat.com \
    --to=jwakely@redhat.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=libstdc++@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=segher@kernel.crashing.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).