@@ -19,21 +19,6 @@ class LibffiRecipe(Recipe):
1919
2020 patches = ['remove-version-info.patch' ]
2121
22- def get_host (self , arch ):
23- with current_directory (self .get_build_dir (arch .arch )):
24- host = None
25- with open ('Makefile' ) as f :
26- for line in f :
27- if line .startswith ('host = ' ):
28- host = line .strip ()[7 :]
29- break
30-
31- if not host or not exists (host ):
32- raise RuntimeError ('failed to find build output! ({})'
33- .format (host ))
34-
35- return host
36-
3722 def should_build (self , arch ):
3823 return not exists (join (self .ctx .get_libs_dir (arch .arch ), 'libffi.so' ))
3924
@@ -46,6 +31,7 @@ def build_arch(self, arch):
4631 shprint (sh .Command ('./configure' ),
4732 '--host=' + arch .command_prefix ,
4833 '--prefix=' + self .ctx .get_python_install_dir (),
34+ '--disable-builddir' ,
4935 '--enable-shared' , _env = env )
5036 # '--with-sysroot={}'.format(self.ctx.ndk_platform),
5137 # '--target={}'.format(arch.toolchain_prefix),
@@ -62,7 +48,7 @@ def build_arch(self, arch):
6248 info ("make libffi.la failed as expected" )
6349 cc = sh .Command (env ['CC' ].split ()[0 ])
6450 cflags = env ['CC' ].split ()[1 :]
65- host_build = join ( self .get_build_dir (arch .arch ), self . get_host ( arch ) )
51+ host_build = self .get_build_dir (arch .arch )
6652
6753 arch_flags = ''
6854 if '-march=' in env ['CFLAGS' ]:
@@ -91,8 +77,7 @@ def build_arch(self, arch):
9177 join (host_build , '.libs' , 'libffi.so' ))
9278
9379 def get_include_dirs (self , arch ):
94- return [join (self .get_build_dir (arch .arch ), self .get_host (arch ),
95- 'include' )]
80+ return [join (self .get_build_dir (arch .arch ), 'include' )]
9681
9782
9883recipe = LibffiRecipe ()
0 commit comments