summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-10-17 09:48:26 +0200
committerGitHub <noreply@github.com>2016-10-17 09:48:26 +0200
commit0eccf42884d4a595ac659355190dc1bb0a932c7a (patch)
tree7755339be81b82e334c0b9e7a7f78977c47ed520
parentfb257f7f24cd8e0bc5ecef2e7c244232febb6aa6 (diff)
parentf87e32696de6126f05d0b839a2a3689dd16fe73f (diff)
Merge pull request #6723 from bvbfan/patch-1
Correct OS architecture detection
-rw-r--r--platform/android/detect.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index f778e9a095..acf4ce412a 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -122,19 +122,20 @@ def configure(env):
gcc_path=env["ANDROID_NDK_ROOT"]+"/toolchains/"+env["NDK_TARGET"]+"/prebuilt/";
- if (sys.platform.find("linux")==0):
- if (platform.architecture()[0]=='64bit' or os.path.isdir(gcc_path+"linux-x86_64/bin")): # check was not working
+ if (sys.platform.startswith("linux")):
+ if (platform.machine().endswith('64')):
gcc_path=gcc_path+"/linux-x86_64/bin"
else:
gcc_path=gcc_path+"/linux-x86/bin"
- elif (sys.platform=="darwin"):
- gcc_path=gcc_path+"/darwin-x86_64/bin" #this may be wrong
+ elif (sys.platform.startswith("darwin")):
+ gcc_path=gcc_path+"/darwin-x86_64/bin"
env['SHLINKFLAGS'][1] = '-shared'
env['SHLIBSUFFIX'] = '.so'
- elif (os.name=="nt"):
- gcc_path=gcc_path+"/windows-x86_64/bin" #this may be wrong
-
-
+ elif (os.platform.startswith('win')):
+ if (platform.machine().endswith('64')):
+ gcc_path=gcc_path+"/windows-x86_64/bin"
+ else:
+ gcc_path=gcc_path+"/windows-x86/bin"
env['ENV']['PATH'] = gcc_path+":"+env['ENV']['PATH']
if env['android_arch']=='x86':