+ if(type.empty())
+ type = native_arch.type;
+ if(system.empty())
+ system = native_arch.system;
+ if(!bits)
+ {
+ if(type==native_arch.type)
+ bits = native_arch.bits;
+ else
+ bits = 32;
+ }
+
+ if(type!=native_arch.type || system!=native_arch.system)
+ cross_prefix = format("%s-%s", type, system);
+ else if(bits==native_arch.bits)
+ native = true;
+ }
+ name = type;
+ if(!cpu.empty())
+ name += format("-%s", cpu);
+ name += format("-%d-%s", bits, system);
+
+ if(system=="windows")
+ {
+ sharedlib_patterns.push_back(Pattern("%.dll"));
+ sharedlib_patterns.push_back(Pattern("lib%.dll"));
+ /* XXX Hack: Consider import libraries (*.dll.a) as dynamic libraries,
+ even though technically they are linked statically. */
+ sharedlib_patterns.push_back(Pattern("lib%.dll.a"));
+ staticlib_patterns.push_back(Pattern("lib%.a"));
+ executable_patterns.push_back(Pattern("%.exe"));