https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114233
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Francois-Xavier Coudert from comment #3) > Jakub has posted a patch in the linker PR (thanks!). > > But there remains a darwin bug. The test in check_effective_target_shared > actually works with C, but not with C++, because: > > 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" > } Ah that's an omission on my part, the fix applied recently was incomplete :-(. (FWIW, the "C" fix doubled the number of libphobos tests, IIRC).