]> git.tdb.fi Git - builder.git/commitdiff
Rudimentary support for Debian/Ubuntu multiarch library locations
authorMikko Rasa <tdb@tdb.fi>
Fri, 16 Sep 2011 20:24:53 +0000 (20:24 +0000)
committerMikko Rasa <tdb@tdb.fi>
Fri, 16 Sep 2011 20:24:53 +0000 (20:24 +0000)
source/architecture.cpp
source/builder.cpp

index fbb246191af4ad0a6a627dd16e5977df01c6dc20..98f809b2a4ebc379e21d2639f09e936b8c805710 100644 (file)
@@ -161,7 +161,9 @@ bool Architecture::match_name(const string &pattern) const
        for(vector<string>::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;
index c8091ffd822eb2de8bf28b3a70551641ecd280e1..d16dd47532ca8d5cf4598a4bd74314cca3a50920 100644 (file)
@@ -461,6 +461,10 @@ Target *Builder::get_library(const string &lib, const list<string> &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");