https://gcc.gnu.org/g:b529e8c55169a99212d9b0ca8d6dd8b812ba9718
commit r17-5306-gb529e8c55169a99212d9b0ca8d6dd8b812ba9718 Author: Iain Sandoe <[email protected]> Date: Sun Aug 16 10:07:25 2026 +0100 libstdc++ testsuite: Remove STATIC_LIBCXXFLAGS (avoid a duplicate -B/-L) It was added in 2009 to resolve target/41605 - to let 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 newr 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]> Diff: --- 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 92589ff75852..ab94bef3907d 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
