- if(!current_arch->is_native())
- {
- for(StringMap::const_iterator i=cross_prefixes.begin(); i!=cross_prefixes.end(); ++i)
- if(current_arch->match_name(i->first))
- {
- current_arch->set_cross_prefix(i->second);
- break;
- }
- }
-
- toolchain.add_tool(new GnuCCompiler(*this, *current_arch));
- toolchain.add_tool(new GnuCxxCompiler(*this, *current_arch));
- toolchain.add_tool(new GnuLinker(*this, *current_arch));
- toolchain.add_tool(new GnuArchiver(*this, *current_arch));
- toolchain.add_tool(new Copy(*this));
- toolchain.add_tool(new Tar(*this));
- toolchain.add_tool(new PkgConfigGenerator(*this));
+ list<FS::Path> start_files;
+ start_files.push_back(FS::get_sys_data_dir(argv[0], "builder")/"builderrc");
+ start_files.push_back(FS::get_user_data_dir("builder")/"rc");
+ for(list<FS::Path>::const_iterator i=start_files.begin(); i!=start_files.end(); ++i)
+ if(FS::exists(*i))
+ load_build_file(*i);