@@ -486,6 +486,9 @@ def get_env(self):
486
486
env ['TOOLCHAIN_PREFIX' ] = toolchain_prefix
487
487
env ['TOOLCHAIN_VERSION' ] = toolchain_version
488
488
489
+ if toolchain_prefix == 'x86' :
490
+ toolchain_prefix = 'i686-linux-android'
491
+ print ('path is' , environ ['PATH' ])
489
492
cc = find_executable ('{toolchain_prefix}-gcc' .format (
490
493
toolchain_prefix = toolchain_prefix ), path = environ ['PATH' ])
491
494
if cc is None :
@@ -986,7 +989,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
986
989
self .ndk_dir ,
987
990
'platforms' ,
988
991
'android-{}' .format (self .android_api ),
989
- 'arch-arm' )
992
+ compiler_dir )
990
993
if not exists (self .ndk_platform ):
991
994
warning ('ndk_platform doesn\' t exist' )
992
995
ok = False
@@ -1022,15 +1025,18 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
1022
1025
py_platform = sys .platform
1023
1026
if py_platform in ['linux2' , 'linux3' ]:
1024
1027
py_platform = 'linux'
1025
- if self .ndk_ver == 'r5b' :
1026
- toolchain_prefix = 'arm-eabi'
1027
- elif self .ndk_ver [:2 ] in ('r7' , 'r8' , 'r9' ):
1028
- toolchain_prefix = 'arm-linux-androideabi'
1029
- elif self .ndk_ver [:3 ] == 'r10' :
1030
- toolchain_prefix = 'arm-linux-androideabi'
1028
+ if arch .arch [:3 ] == 'arm' :
1029
+ if self .ndk_ver == 'r5b' :
1030
+ toolchain_prefix = 'arm-eabi'
1031
+ elif self .ndk_ver [:2 ] in ('r7' , 'r8' , 'r9' ):
1032
+ toolchain_prefix = 'arm-linux-androideabi'
1033
+ elif self .ndk_ver [:3 ] == 'r10' :
1034
+ toolchain_prefix = 'arm-linux-androideabi'
1035
+ else :
1036
+ warning ('Error: NDK not supported by these tools?' )
1037
+ exit (1 )
1031
1038
else :
1032
- warning ('Error: NDK not supported by these tools?' )
1033
- exit (1 )
1039
+ toolchain_prefix = 'x86'
1034
1040
1035
1041
toolchain_versions = []
1036
1042
toolchain_path = join (self .ndk_dir , 'toolchains' )
@@ -1042,9 +1048,11 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
1042
1048
os .path .join (toolchain_path , toolchain_content )):
1043
1049
toolchain_version = toolchain_content [
1044
1050
len (toolchain_prefix )+ 1 :]
1045
- debug ('Found toolchain version: {}' .format (
1046
- toolchain_version ))
1047
- toolchain_versions .append (toolchain_version )
1051
+ # AND: This is terrible!
1052
+ if toolchain_version [0 ] in map (str , range (10 )) and 'clang' not in toolchain_version and toolchain_version [:2 ] != '64' :
1053
+ debug ('Found toolchain version: {}' .format (
1054
+ toolchain_version ))
1055
+ toolchain_versions .append (toolchain_version )
1048
1056
else :
1049
1057
warning ('Could not find toolchain subdirectory!' )
1050
1058
ok = False
0 commit comments