On Sun, 27 Sept 2026 at 15:25, Iain Sandoe <[email protected]> wrote: > > We have made some steps already to avoid duplication of -B and -L in the > testsuite since that now produces linker warnings on Darwin leading to > spurious fails (or a need to prune warnings). > > Tested on x86_64-darwin/linux, OK for trunk? thanks
OK > Iain > > --- 8< --- > > STATIC_LIBCXXFLAGS was added in 2009 to resolve target/41605 so link spec %s > substitutions find the uninstalled static library, at a time when nothing else > supplied a -B for that directory. @CXX@ now provides the -B anyway. > > So now we get duplicate -B options (which also lead to duplicate -Ls) and > newer static linkers complain about this - either of embedded runpaths or > -L depending on the kind of link. Retire this now - and save some pruning of > warnings. > > libstdc++-v3/ChangeLog: > > * testsuite/lib/libstdc++.exp: Remove STATIC_LIBCXXFLAGS, it is > no longer needed. > > Signed-off-by: Iain Sandoe <[email protected]> > --- > libstdc++-v3/testsuite/lib/libstdc++.exp | 14 -------------- > 1 file changed, 14 deletions(-) > > diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp > b/libstdc++-v3/testsuite/lib/libstdc++.exp > index b2b1934a524..73d51402409 100644 > --- a/libstdc++-v3/testsuite/lib/libstdc++.exp > +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp > @@ -119,7 +119,6 @@ proc libstdc++_init { testfile } { > global flags_file > global tool_timeout > global DEFAULT_CXXFLAGS > - global STATIC_LIBCXXFLAGS > > # We set LC_ALL and LANG to C so that we get the same error > # messages as expected. > @@ -220,15 +219,6 @@ proc libstdc++_init { testfile } { > } > v3track v3-sharedlib 3 > > - set STATIC_LIBCXXFLAGS "" > - set staticlibdir [lookfor_file $blddir src/.libs/libstdc++.a] > - if {$staticlibdir != ""} { > - set staticlibdir [file dirname $staticlibdir] > - # Some targets use libstdc++.a%s in their specs, so they need a > - # -B option for uninstalled testing. > - set STATIC_LIBCXXFLAGS " -B${staticlibdir} " > - } > - > # Compute what needs to be added to the existing LD_LIBRARY_PATH. > if {$gccdir != ""} { > set compiler ${gccdir}/xg++ > @@ -594,7 +584,6 @@ proc v3_target_compile { source dest type options } { > global cxxvtvflags > global cxxldflags > global includes > - global STATIC_LIBCXXFLAGS > global tool > > lappend options "additional_flags=-fdiagnostics-plain-output" > @@ -608,7 +597,6 @@ proc v3_target_compile { source dest type options } { > set cxx_final $cxx > set cxxlibglossflags [libgloss_link_flags] > set cxx_final [concat $cxx_final $cxxlibglossflags] > - set cxx_final [concat $cxx_final $STATIC_LIBCXXFLAGS] > set cxx_final [concat $cxx_final $cxxflags] > set cxx_final [concat $cxx_final $cxxvtvflags] > set cxx_final [concat $cxx_final $includes] > @@ -686,7 +674,6 @@ proc v3_target_compile_as_c { source dest type options } { > global blddir > global cc > global cxxflags > - global STATIC_LIBCXXFLAGS > global tool > > if { [target_info needs_status_wrapper] != "" && [info exists gluefile] > } { > @@ -698,7 +685,6 @@ proc v3_target_compile_as_c { source dest type options } { > set cc_final $cc > set cxxlibglossflags [libgloss_link_flags] > set cc_final [concat $cc_final $cxxlibglossflags] > - set cc_final [concat $cc_final $STATIC_LIBCXXFLAGS] > set cc_final [concat $cc_final $cxxflags] > set cc_final [concat $cc_final $includes] > regsub -all {\s[-]nostdinc[+][+]} $cc_final "" cc_final > -- > 2.50.1 (Apple Git-155) >
