X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnucompiler.cpp;h=a3052df1a6d4a4b2041ec5940e75239d4f6ffccf;hb=a6d467d13a8fc69a508d4d0698885fc0c627d11d;hp=3f5121997dbe2d8322b9561ea9cbcaca668663d1;hpb=824c28d552668240b98a353acdcc284a477d8b19;p=builder.git diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 3f51219..a3052df 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -20,6 +20,8 @@ GnuCompiler::GnuCompiler(Builder &b, const Architecture &a, const string &t, con if(architecture->is_cross()) command = format("%s-%s", architecture->get_cross_prefix(), command); executable = builder.get_vfs().find_binary(command); + if(!executable) + builder.problem(string(), format("Can't find executable %s for tool %s", command, tag)); if(architecture->is_native()) system_path.push_back("/usr/include"); @@ -40,6 +42,11 @@ Target *GnuCompiler::create_target(const list &sources, const string & string GnuCompiler::create_build_signature(const BuildInfo &binfo) const { string result = FS::basename(executable->get_path()); + if(!architecture->get_cpu().empty()) + { + result += ",m"; + result += architecture->get_cpu(); + } result += ','; if(binfo.debug) result += 'g'; @@ -131,8 +138,5 @@ Task *GnuCompiler::run(const Target &target) const argv.push_back(relative(obj_path, work_dir).str()); argv.push_back(relative(src_path, work_dir).str()); - if(!builder.get_dry_run()) - FS::mkpath(FS::dirname(obj_path), 0755); - return new ExternalTask(argv, work_dir); }