public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX Coudert <fxcoudert@gmail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Iain Sandoe <iain@sandoe.co.uk>
Subject: [PATCH] testsuite, darwin: improve check for -shared support
Date: Thu, 7 Mar 2024 21:44:19 +0100	[thread overview]
Message-ID: <B6390939-2814-417F-92F2-0E9C2661C0CE@gmail.com> (raw)

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

The undefined symbols are allowed for C checks, but when
this is run as C++, the mangled foo() symbol is still
seen as undefined, and the testsuite thinks darwin does not
support -shared.

Pushed after approval by Iain Sandoe in PR114233

FX



[-- Attachment #2: 0001-testsuite-darwin-improve-check-for-shared-support.patch --]
[-- Type: application/octet-stream, Size: 1292 bytes --]

From 0ed6e5b4820e01fa86b48a7b1d62f752ec97ea41 Mon Sep 17 00:00:00 2001
From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Date: Thu, 7 Mar 2024 17:27:17 +0100
Subject: [PATCH] testsuite, darwin: improve check for -shared support

The undefined symbols are allowed for C checks, but when
this is run as C++, the mangled foo() symbol is still
seen as undefined, and the testsuite thinks darwin does not
support -shared.

gcc/testsuite/ChangeLog:

	PR target/114233
	* lib/target-supports.exp: Fix test for C++.
---
 gcc/testsuite/lib/target-supports.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ae33c4f1e3a..467b539b20d 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1390,7 +1390,7 @@ proc check_effective_target_shared { } {
     # here to be undefined.
     set extra_flags ""
     if { [istarget *-*-darwin\[912\]*] } {
-      set extra_flags "-Wl,-U,_foo,-U,_bar"
+      set extra_flags "-Wl,-U,_foo,-U,_bar,-U,__Z3foov"
     }
     # Note that M68K has a multilib that supports -fpic but not
     # -fPIC, so we need to check both.  We test with a program that
-- 
2.39.3 (Apple Git-146)


                 reply	other threads:[~2024-03-07 20:44 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=B6390939-2814-417F-92F2-0E9C2661C0CE@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    /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).