X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnulinker.cpp;h=ee4f02dd2fd520bd4e05402b596dbcd718601eae;hb=4facd021514ab372c23b1b132d6b4b62baa4efbf;hp=3693e2b0cc08386c6d9cb3bceecee05aa1d72455;hpb=dceec8d95c63aaf4d8d4b367c9846caf9e32a6bf;p=builder.git diff --git a/source/gnulinker.cpp b/source/gnulinker.cpp index 3693e2b..ee4f02d 100644 --- a/source/gnulinker.cpp +++ b/source/gnulinker.cpp @@ -22,6 +22,19 @@ GnuLinker::GnuLinker(Builder &b): { input_suffixes.push_back(".o"); input_suffixes.push_back(".a"); + + const Architecture &arch = builder.get_current_arch(); + if(arch.is_native()) + { + system_path.push_back("/lib"); + system_path.push_back("/usr/lib"); + if(arch.match_name("pc-32-linux")) + system_path.push_back("/usr/lib/i386-linux-gnu"); + else if(arch.match_name("pc-64-linux")) + system_path.push_back("/usr/lib/x86_64-linux-gnu"); + } + else + system_path.push_back("/usr/"+arch.get_cross_prefix()+"/lib"); } Target *GnuLinker::create_target(const list &sources, const std::string &arg) const