]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite, darwin: improve check for -shared support
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Thu, 7 Mar 2024 16:27:17 +0000 (17:27 +0100)
committerFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Thu, 7 Mar 2024 20:30:30 +0000 (21:30 +0100)
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

index ae33c4f1e3af03495606f4149c044aef5ffbde42..467b539b20dbd17abbd98045cea3c0ad65c2720c 100644 (file)
@@ -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