Skip to content

Commit d5df06b

Browse files
author
Kim Rinnewitz
committed
Add workaround for crystax lrintf segfault
1 parent 8f1201b commit d5df06b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pythonforandroid/recipes/openal/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ def prebuild_arch(self, arch):
2020
def build_arch(self, arch):
2121
with current_directory(self.get_build_dir(arch.arch)):
2222
env = self.get_recipe_env(arch)
23+
cmake_args = [
24+
'-DCMAKE_TOOLCHAIN_FILE={}'.format('XCompile-Android.txt'),
25+
'-DHOST={}'.format(self.ctx.toolchain_prefix)
26+
]
27+
if self.ctx.ndk == 'crystax':
28+
# avoids a segfault in libcrystax when calling lrintf
29+
cmake_args += ['-DHAVE_LRINTF=0']
2330
shprint(
2431
sh.cmake, '.',
25-
'-DCMAKE_TOOLCHAIN_FILE={}'.format('XCompile-Android.txt'),
26-
'-DHOST={}'.format(self.ctx.toolchain_prefix),
32+
*cmake_args,
2733
_env=env
2834
)
2935
shprint(sh.make, _env=env)

0 commit comments

Comments
 (0)