@@ -19,21 +19,6 @@ class LibffiRecipe(Recipe):
19
19
20
20
patches = ['remove-version-info.patch' ]
21
21
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
-
37
22
def should_build (self , arch ):
38
23
return not exists (join (self .ctx .get_libs_dir (arch .arch ), 'libffi.so' ))
39
24
@@ -46,6 +31,7 @@ def build_arch(self, arch):
46
31
shprint (sh .Command ('./configure' ),
47
32
'--host=' + arch .command_prefix ,
48
33
'--prefix=' + self .ctx .get_python_install_dir (),
34
+ '--disable-builddir' ,
49
35
'--enable-shared' , _env = env )
50
36
# '--with-sysroot={}'.format(self.ctx.ndk_platform),
51
37
# '--target={}'.format(arch.toolchain_prefix),
@@ -62,7 +48,7 @@ def build_arch(self, arch):
62
48
info ("make libffi.la failed as expected" )
63
49
cc = sh .Command (env ['CC' ].split ()[0 ])
64
50
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 )
66
52
67
53
arch_flags = ''
68
54
if '-march=' in env ['CFLAGS' ]:
@@ -91,8 +77,7 @@ def build_arch(self, arch):
91
77
join (host_build , '.libs' , 'libffi.so' ))
92
78
93
79
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' )]
96
81
97
82
98
83
recipe = LibffiRecipe ()
0 commit comments