From: Mikko Rasa Date: Tue, 27 Dec 2022 16:08:20 +0000 (+0200) Subject: Use GnuCompiler's build info to link libstdc++ X-Git-Url: http://git.tdb.fi/?p=builder.git;a=commitdiff_plain;h=64ed75d757c4f31f60d8fa19b37efb6b3e02fdd4 Use GnuCompiler's build info to link libstdc++ --- diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 59ffdf2..0c5f2f8 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -107,6 +107,9 @@ void GnuCompiler::do_prepare(ToolData &tool) const tool.extra_data = 0U; prepare_syspath(tool); prepare_version(tool); + + if(tag=="CXX") + tool.build_info.libs.push_back("stdc++"); } void GnuCompiler::prepare_syspath(ToolData &tool) const diff --git a/source/gnulinker.cpp b/source/gnulinker.cpp index 591c80b..dacd54d 100644 --- a/source/gnulinker.cpp +++ b/source/gnulinker.cpp @@ -309,9 +309,6 @@ Task *GnuLinker::_run(const Binary &bin) argv.push_back(l.substr(0, l.size()-10)); } - if(has_cplusplus) - argv.push_back("-lstdc++"); - if(static_link_ok) argv.push_back("-static"); else