Skip to content

Commit 2d5c41a

Browse files
AndreMirasmkg20001
authored andcommitted
Improves gevent recipe robustness
Tries to match and replace patterns to be moved from one environment variable to another rather than hard coding it. That way unexpected flags added to parent recipes hierarchy also get handled. This issue popped when testing kivy#793
1 parent a247632 commit 2d5c41a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pythonforandroid/recipes/gevent/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def get_recipe_env(self, arch=None, with_flags_in_cc=True):
2626
env['LIBS'] = ''.join(re.findall(regex, env['LDFLAGS'])).strip()
2727
env['LDFLAGS'] = re.sub(regex, '', env['LDFLAGS'])
2828
info('Moved "{}" from LDFLAGS to LIBS.'.format(env['LIBS']))
29+
# linker to use the correct gcc (cross compiler) plus additional libs
30+
env['LDSHARED'] = '{} -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions {}'.format(env['CC'], env['LIBS'])
2931
return env
3032

3133

0 commit comments

Comments
 (0)