Browse Source

Buildsystem: Windows cross-compilation on Linux defaults to 64-bit

Rémi Verschelde 8 years ago
parent
commit
f48a1c9ebf
1 changed files with 6 additions and 3 deletions
  1. 6 3
      platform/windows/detect.py

+ 6 - 3
platform/windows/detect.py

@@ -226,10 +226,13 @@ def configure(env):
         else:
         else:
             env["PROGSUFFIX"] = env["PROGSUFFIX"] + ".exe"  # for linux cross-compilation
             env["PROGSUFFIX"] = env["PROGSUFFIX"] + ".exe"  # for linux cross-compilation
 
 
-        mingw_prefix = ""
-
         if (env["bits"] == "default"):
         if (env["bits"] == "default"):
-            env["bits"] = "64" if "PROGRAMFILES(X86)" in os.environ else "32"
+            if (os.name == "nt"):
+                env["bits"] = "64" if "PROGRAMFILES(X86)" in os.environ else "32"
+            else: # default to 64-bit on Linux
+                env["bits"] = "64"
+
+        mingw_prefix = ""
 
 
         if (env["bits"] == "32"):
         if (env["bits"] == "32"):
             env.Append(LINKFLAGS=['-static'])
             env.Append(LINKFLAGS=['-static'])