Correct OS architecture detection
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
This commit is contained in:
parent
78d97b060a
commit
f87e32696d
@ -124,19 +124,20 @@ def configure(env):
|
|||||||
|
|
||||||
gcc_path=env["ANDROID_NDK_ROOT"]+"/toolchains/"+env["NDK_TARGET"]+"/prebuilt/";
|
gcc_path=env["ANDROID_NDK_ROOT"]+"/toolchains/"+env["NDK_TARGET"]+"/prebuilt/";
|
||||||
|
|
||||||
if (sys.platform.find("linux")==0):
|
if (sys.platform.startswith("linux")):
|
||||||
if (platform.architecture()[0]=='64bit' or os.path.isdir(gcc_path+"linux-x86_64/bin")): # check was not working
|
if (platform.machine().endswith('64')):
|
||||||
gcc_path=gcc_path+"/linux-x86_64/bin"
|
gcc_path=gcc_path+"/linux-x86_64/bin"
|
||||||
else:
|
else:
|
||||||
gcc_path=gcc_path+"/linux-x86/bin"
|
gcc_path=gcc_path+"/linux-x86/bin"
|
||||||
elif (sys.platform=="darwin"):
|
elif (sys.platform.startswith("darwin")):
|
||||||
gcc_path=gcc_path+"/darwin-x86_64/bin" #this may be wrong
|
gcc_path=gcc_path+"/darwin-x86_64/bin"
|
||||||
env['SHLINKFLAGS'][1] = '-shared'
|
env['SHLINKFLAGS'][1] = '-shared'
|
||||||
env['SHLIBSUFFIX'] = '.so'
|
env['SHLIBSUFFIX'] = '.so'
|
||||||
elif (os.name=="nt"):
|
elif (os.platform.startswith('win')):
|
||||||
gcc_path=gcc_path+"/windows-x86_64/bin" #this may be wrong
|
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']
|
env['ENV']['PATH'] = gcc_path+":"+env['ENV']['PATH']
|
||||||
if env['android_arch']=='x86':
|
if env['android_arch']=='x86':
|
||||||
|
Loading…
Reference in New Issue
Block a user