8000 Merge pull request #1361 from JonasT/fix-ldshared-and-cflags · bb33bb/python-for-android@b9ae628 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9ae628

Browse files
authored
Merge pull request kivy#1361 from JonasT/fix-ldshared-and-cflags
Fix LDSHARED and missing CFLAGS include path for python3crystax sources
2 parents 180fcec + 91c25fa commit b9ae628

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)
0