public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iains.gcc@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: libstdc++@gcc.gnu.org
Subject: [pushed] testsuite, Darwin: Remove an unnecessary flags addition.
Date: Mon,  3 Jul 2023 20:20:24 +0100	[thread overview]
Message-ID: <20230703192024.11486-1-iain@sandoe.co.uk> (raw)

This has been in use for some time in the Darwin branches that are used
by downstream distributions. Re-tested on x86_64-darwin, pushed to trunk,
thanks,
Iain

--- 8< ---

The addition of the multiply_defined suppress flag has been handled for some
considerable time now in the Darwin specs; remove it from the testsuite libs.
Avoid duplicates in the specs.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

gcc/ChangeLog:

	* config/darwin.h: Avoid duplicate multiply_defined specs on
	earlier Darwin versions with shared libgcc.

libstdc++-v3/ChangeLog:

	* testsuite/lib/libstdc++.exp: Remove additional flag handled
	by Darwin specs.

gcc/testsuite/ChangeLog:

	* lib/g++.exp: Remove additional flag handled by Darwin specs.
	* lib/obj-c++.exp: Likewise.
---
 gcc/config/darwin.h                      | 5 ++---
 gcc/testsuite/lib/g++.exp                | 4 ----
 gcc/testsuite/lib/obj-c++.exp            | 4 ----
 libstdc++-v3/testsuite/lib/libstdc++.exp | 3 ---
 4 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index e6f76e598e6..714d3d5cc0d 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -217,8 +217,7 @@ extern GTY(()) int darwin_ms_struct;
   "%{image_base*:-Xlinker -image_base -Xlinker %*} %<image_base*",	\
   "%{init*:-Xlinker -init -Xlinker %*} %<init*",			\
   "%{multi_module:-Xlinker -multi_module} %<multi_module",		\
-  "%{multiply_defined*:-Xlinker -multiply_defined -Xlinker %*} \
-     %<multiply_defined* ",						\
+  "%{multiply_defined*:-Xlinker -multiply_defined -Xlinker %*} ",	\
   "%{multiplydefinedunused*:\
      -Xlinker -multiply_defined_unused -Xlinker %*} \
      %<multiplydefinedunused* ",					\
@@ -294,7 +293,7 @@ extern GTY(()) int darwin_ms_struct;
    %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) }"
 
 #define DARWIN_CC1_SPEC							\
-  "%<dynamic %<dynamiclib %<force_cpusubtype_ALL "
+  "%<dynamic %<dynamiclib %<force_cpusubtype_ALL %<multiply_defined* "
 
 #define SUBSUBTARGET_OVERRIDE_OPTIONS					\
   do {									\
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index e759f76b3f8..db6e5b8fa05 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -285,10 +285,6 @@ proc g++_init { args } {
     set gcc_warning_prefix "warning:"
     set gcc_error_prefix "(fatal )?error:"
 
-    if { [istarget *-*-darwin*] } {
-	lappend ALWAYS_CXXFLAGS "ldflags=-multiply_defined suppress"
-       }
-
     verbose -log "ALWAYS_CXXFLAGS set to $ALWAYS_CXXFLAGS"
 
     verbose "g++ is initialized" 3
diff --git a/gcc/testsuite/lib/obj-c++.exp b/gcc/testsuite/lib/obj-c++.exp
index 51268fd64ae..98f1e5c6a04 100644
--- a/gcc/testsuite/lib/obj-c++.exp
+++ b/gcc/testsuite/lib/obj-c++.exp
@@ -277,10 +277,6 @@ proc obj-c++_init { args } {
     set gcc_warning_prefix "warning:"
     set gcc_error_prefix "(fatal )?error:"
 
-    if { [istarget *-*-darwin*] } {
-	lappend ALWAYS_OBJCXXFLAGS "ldflags=-multiply_defined suppress"
-    }
-
     verbose -log "ALWAYS_OBJCXXFLAGS set to $ALWAYS_OBJCXXFLAGS"
 
     verbose "obj-c++ is initialized" 3
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index c83147ce99a..9f3e896751a 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -133,9 +133,6 @@ proc libstdc++_init { testfile } {
     if ![info exists DEFAULT_CXXFLAGS] then {
 	set DEFAULT_CXXFLAGS ""
 	# Host specific goo here.
-	if { [string match "powerpc-*-darwin*" $target_triplet] } {
-	    append DEFAULT_CXXFLAGS " -multiply_defined suppress"
-	}
 	if { [string match "powerpc-ibm-aix*" $target_triplet] } {
 	    append DEFAULT_CXXFLAGS " -Wl,-bmaxdata:0x20000000"
 	}
-- 
2.39.2 (Apple Git-143)


                 reply	other threads:[~2023-07-03 19:20 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=20230703192024.11486-1-iain@sandoe.co.uk \
    --to=iains.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --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).