@@ -47,35 +47,34 @@ def get_env(self):
4747
4848 toolchain_prefix = self .ctx .toolchain_prefix
4949 toolchain_version = self .ctx .toolchain_version
50+ command_prefix = self .command_prefix
5051
5152 env ['TOOLCHAIN_PREFIX' ] = toolchain_prefix
5253 env ['TOOLCHAIN_VERSION' ] = toolchain_version
5354
54- if toolchain_prefix == 'x86' :
55- toolchain_prefix = 'i686-linux-android'
5655 print ('path is' , environ ['PATH' ])
57- cc = find_executable ('{toolchain_prefix }-gcc' .format (
58- toolchain_prefix = toolchain_prefix ), path = environ ['PATH' ])
56+ cc = find_executable ('{command_prefix }-gcc' .format (
57+ command_prefix = command_prefix ), path = environ ['PATH' ])
5958 if cc is None :
6059 warning ('Couldn\' t find executable for CC. This indicates a '
6160 'problem locating the {} executable in the Android '
6261 'NDK, not that you don\' t have a normal compiler '
6362 'installed. Exiting.' )
6463 exit (1 )
6564
66- env ['CC' ] = '{toolchain_prefix }-gcc {cflags}' .format (
67- toolchain_prefix = toolchain_prefix ,
65+ env ['CC' ] = '{command_prefix }-gcc {cflags}' .format (
66+ command_prefix = command_prefix ,
6867 cflags = env ['CFLAGS' ])
69- env ['CXX' ] = '{toolchain_prefix }-g++ {cxxflags}' .format (
70- toolchain_prefix = toolchain_prefix ,
68+ env ['CXX' ] = '{command_prefix }-g++ {cxxflags}' .format (
69+ command_prefix = command_prefix ,
7170 cxxflags = env ['CXXFLAGS' ])
7271
73- env ['AR' ] = '{}-ar' .format (toolchain_prefix )
74- env ['RANLIB' ] = '{}-ranlib' .format (toolchain_prefix )
75- env ['LD' ] = '{}-ld' .format (toolchain_prefix )
76- env ['STRIP' ] = '{}-strip --strip-unneeded' .format (toolchain_prefix )
72+ env ['AR' ] = '{}-ar' .format (command_prefix )
73+ env ['RANLIB' ] = '{}-ranlib' .format (command_prefix )
74+ env ['LD' ] = '{}-ld' .format (command_prefix )
75+ env ['STRIP' ] = '{}-strip --strip-unneeded' .format (command_prefix )
7776 env ['MAKE' ] = 'make -j5'
78- env ['READELF' ] = '{}-readelf' .format (toolchain_prefix )
77+ env ['READELF' ] = '{}-readelf' .format (command_prefix )
7978
8079 hostpython_recipe = Recipe .get_recipe ('hostpython2' , self .ctx )
8180
0 commit comments