using namespace Msp;
GnuCompiler::GnuCompiler(Builder &b, const string &t, const string &n):
- Tool(b, t),
- name(n)
+ Tool(b, t)
{
+ executable = builder.get_vfs().find_binary(n);
+
const Architecture &arch = builder.get_current_arch();
if(arch.is_native())
system_path.push_back("/usr/include");
system_path.push_back("/usr/"+arch.get_cross_prefix()+"/include");
}
-Target *GnuCompiler::create_target(const list<Target *> &sources, const std::string &) const
+Target *GnuCompiler::create_target(const list<Target *> &sources, const string &) const
{
if(sources.size()!=1)
throw invalid_argument("GnuCCompiler::create_target");
const Component &comp = object.get_component();
ExternalTask::Arguments argv;
- argv.push_back(name);
+ argv.push_back(executable->get_path().str());
argv.push_back("-c");
const BuildInfo &binfo = comp.get_build_info();