X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Farchitecture.cpp;h=e0b69667952c64c1ad2e70229e5c4e951a128d7f;hb=7e5ac6af8987bf12f3e338d00e96e8cb74f3534b;hp=fbb246191af4ad0a6a627dd16e5977df01c6dc20;hpb=0458300fda4f345f865a7f3ee4fc0f2020a91983;p=builder.git diff --git a/source/architecture.cpp b/source/architecture.cpp index fbb2461..e0b6966 100644 --- a/source/architecture.cpp +++ b/source/architecture.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of builder -Copyright © 2007-2010 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include #ifndef WIN32 #include @@ -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::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;