]> git.tdb.fi Git - builder.git/commitdiff
Use GnuCompiler's build info to link libstdc++
authorMikko Rasa <tdb@tdb.fi>
Tue, 27 Dec 2022 16:08:20 +0000 (18:08 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 27 Dec 2022 16:08:20 +0000 (18:08 +0200)
source/gnucompiler.cpp
source/gnulinker.cpp

index 59ffdf2fff4e0f65f80c440e650931df25e8dc3f..0c5f2f8611db9eb588b8649fe3867f313153c5fc 100644 (file)
@@ -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
index 591c80be20db9aefc4d7b7d9713c455313e14665..dacd54d5b1649e7b08fd7bc0885895df0dbcd3a1 100644 (file)
@@ -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