]> git.tdb.fi Git - builder.git/blobdiff - source/architecture.cpp
Make BuildInfo able to handle chained dependencies
[builder.git] / source / architecture.cpp
index fbb246191af4ad0a6a627dd16e5977df01c6dc20..e0b69667952c64c1ad2e70229e5c4e951a128d7f 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2007-2010  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include <limits>
 #ifndef WIN32
 #include <sys/utsname.h>
@@ -105,16 +98,8 @@ Architecture::Architecture(Builder &b, const string &spec):
 
                if(type!=native_arch.type || system!=native_arch.system)
                        cross_prefix = format("%s-%s", type, system);
-               else if(bits!=native_arch.bits)
-               {
-                       build_info.cflags.push_back(format("-m%d", bits));
-                       build_info.ldflags.push_back(format("-m%d", bits));
-               }
-               else
+               else if(bits==native_arch.bits)
                        native = true;
-
-               if(!cpu.empty())
-                       build_info.cflags.push_back(format("-march=%s", cpu));
        }
        name = type;
        if(!cpu.empty())
@@ -161,7 +146,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;