From: Mikko Rasa Date: Fri, 16 Sep 2011 20:24:53 +0000 (+0000) Subject: Rudimentary support for Debian/Ubuntu multiarch library locations X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8445faf175b11b224d7c6592b18aa0be0aab19ce;p=builder.git Rudimentary support for Debian/Ubuntu multiarch library locations --- diff --git a/source/architecture.cpp b/source/architecture.cpp index fbb2461..98f809b 100644 --- a/source/architecture.cpp +++ b/source/architecture.cpp @@ -161,7 +161,9 @@ bool Architecture::match_name(const string &pattern) const for(vector::const_iterator i=parts.begin(); i!=parts.end(); ++i) { string part = resolve_alias(*i); - if(part!=type && part!=cpu && part!=system) + if((part=="32" && bits==32) || (part=="64" && bits==64)) + ; + else if(part!=type && part!=cpu && part!=system) return false; } return true; diff --git a/source/builder.cpp b/source/builder.cpp index c8091ff..d16dd47 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -461,6 +461,10 @@ Target *Builder::get_library(const string &lib, const list &path, LibMod { syspath.push_back("/lib"); syspath.push_back("/usr/lib"); + if(current_arch->match_name("pc-32-linux")) + syspath.push_back("/usr/lib/i386-linux-gnu"); + else if(current_arch->match_name("pc-64-linux")) + syspath.push_back("/usr/lib/x86_64-linux-gnu"); } else syspath.push_back("/usr/"+current_arch->get_cross_prefix()+"/lib");