Skip to content

Commit 91c25fa

Browse files
author
Jonas Thiem
committed
Fix LDSHARED and missing CFLAGS include path for python3crystax sources
1 parent 0dc7664 commit 91c25fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pythonforandroid/archs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,12 @@ def get_env(self, with_flags_in_cc=True):
112112
env['AR'] = '{}-ar'.format(command_prefix)
113113
env['RANLIB'] = '{}-ranlib'.format(command_prefix)
114114
env['LD'] = '{}-ld'.format(command_prefix)
115-
# env['LDSHARED'] = join(self.ctx.root_dir, 'tools', 'liblink')
116-
# env['LDSHARED'] = env['LD']
115+
env['LDSHARED'] = env["CC"] + " -pthread -shared " +\
116+
"-Wl,-O1 -Wl,-Bsymbolic-functions "
117+
if self.ctx.python_recipe and self.ctx.python_recipe.from_crystax:
118+
# For crystax python, we can't use the host python headers:
119+
env["CFLAGS"] += ' -I{}/sources/python/{}/include/python/'.\
120+
format(self.ctx.ndk_dir, self.ctx.python_recipe.version[0:3])
117121
env['STRIP'] = '{}-strip --strip-unneeded'.format(command_prefix)
118122
env['MAKE'] = 'make -j5'
119123
env['READELF'] = '{}-readelf'.format(command_prefix)

0 commit comments

Comments
 (0)