Target *GnuCompiler::create_target(const list<Target *> &sources, const string &)
{
if(sources.size()!=1)
- throw invalid_argument("GnuCCompiler::create_target");
+ throw invalid_argument("GnuCompiler::create_target");
SourceFile &source = dynamic_cast<SourceFile &>(*sources.front());
ObjectFile *obj = new ObjectFile(builder, *source.get_component(), source);
obj->set_tool(*this);
if(!executable)
return string();
- string result = FS::basename(executable->get_path());
+ string result = Tool::create_build_signature(binfo);
if(!architecture->get_cpu().empty())
{
result += ",m";
result += architecture->get_cpu();
}
- result += ',';
+ if(binfo.debug || binfo.optimize)
+ result += ',';
if(binfo.debug)
result += 'g';
if(binfo.optimize)
else if(architecture->is_native())
system_path.push_back("/usr/include");
else
- system_path.push_back("/usr/"+architecture->get_cross_prefix()+"/include");
+ system_path.push_back(format("/usr/%s/include", architecture->get_cross_prefix()));
}
}