X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flink.cpp;h=2ff5a97e85060545194ab58b4832e219617bb542;hb=57bdb055acb0453c75b22cb64f35cc0e817a2827;hp=0d94e5ab62251c14c4a49ffea687cfb3ab3d3077;hpb=40eb101a642b9ed2e898eec39e0916fa71066b23;p=builder.git diff --git a/source/link.cpp b/source/link.cpp index 0d94e5a..2ff5a97 100644 --- a/source/link.cpp +++ b/source/link.cpp @@ -18,12 +18,14 @@ Link::Link(Builder &b, const Executable &exe): { const Component &comp=exe.get_component(); + const string &prefix=b.get_arch_prefix(exe.get_package()->get_arch()); + //XXX Determine whether to use g++ or gcc - argv.push_back("g++"); + argv.push_back(prefix+"g++"); if(comp.get_type()==Component::LIBRARY) argv.push_back("-shared"); - else if(comp.get_package().get_config().get_option("staticlibs").value=="all") + else if(comp.get_package().get_library_mode()==ALL_STATIC) argv.push_back("-static"); const BuildInfo &binfo=comp.get_build_info();