-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Gevent Crystax/Python3 support #1251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gevent Crystax/Python3 support #1251
Conversation
Makes sure the arm cross linker is being used for LDSHARED. Fixes configure script complaining about CFLAGS and LDFLAGS and simplified `gevent.patch` (less is more), since flags are now sanitized during `get_recipe_env()` call. Also depends on kivy#1249 (symlink system Python to hostpython3crystax).
def get_recipe_env(self, arch=None, with_flags_in_cc=True): | ||
env = super(GeventRecipe, self).get_recipe_env(arch, with_flags_in_cc) | ||
# sets linker to use the correct gcc (cross compiler) | ||
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise the default host linker was picked up rather than the ARM cross compiler.
@@ -15,7 +15,7 @@ diff -Naur gevent-1.1.1/setup.py gevent-1.1.1_diff/setup.py | |||
ares_configure_command = ' '.join(["(cd ", _quoted_abspath('c-ares/'), | |||
" && if [ -r ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi ", | |||
- " && /bin/sh ./configure " + _m32 + "CONFIG_COMMANDS= CONFIG_FILES= ", | |||
+ " && /bin/sh ./configure --host={} ".format(os.environ['TOOLCHAIN_PREFIX']) + "CFLAGS= LDFLAGS= CONFIG_COMMANDS= CONFIG_FILES= ", | |||
+ " && /bin/sh ./configure --host={} ".format(os.environ['TOOLCHAIN_PREFIX']) + "CONFIG_COMMANDS= CONFIG_FILES= ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanitizing CFLAGS
and LDFLAGS
is now handled in get_recipe_env()
.
env['LIBS'] = ' -lm' | ||
if self.ctx.ndk == 'crystax': | ||
env['LIBS'] += ' -lcrystax -lpython{}m'.format(self.ctx.python_recipe.version[0:3]) | ||
env['LDSHARED'] += env['LIBS'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that we don't get run time cannot locate symbol errors.
Thanks! |
Makes sure the arm cross linker is being used for LDSHARED.
Fixes configure script complaining about CFLAGS and LDFLAGS and
simplified
gevent.patch
(less is more), since flags are nowsanitized during
get_recipe_env()
call.Also depends on #1249 (symlink system Python to hostpython3crystax).