Commit b67c63dd authored by Jason Madden's avatar Jason Madden

got linking on OS X working, tested on a Pi too. lets see about travis.

parent 807d15d6
......@@ -71,6 +71,7 @@ test_prelim:
${PYTHON} --version
${PYTHON} -c 'import greenlet; print(greenlet, greenlet.__version__)'
${PYTHON} -c 'import gevent.core; print(gevent.core.loop)'
${PYTHON} -c 'import gevent.libuv.corecffi; print(dir(gevent.libuv.corecffi.libuv))'
make bench
toxtest: test_prelim
......
......@@ -119,6 +119,13 @@ def configure_libuv(_bext, _ext):
cflags = '-fPIC'
env = os.environ.copy()
env['CFLAGS'] = ' '.join(x for x in (cflags, env.get('CFLAGS', None), env.get('ARCHFLAGS', None)) if x)
# Since we're building a static library, if link-time-optimization is requested, it
# results in failure to properly create the library archive. This goes unnoticed on
# OS X until import time because of '-undefined dynamic_lookup'. On the raspberry
# pi, it causes the linker to crash
if '-flto' in env['CFLAGS']:
log.info("Removing LTO")
env['CFLAGS'] = env['CFLAGS'].replace('-flto', '')
log.info('Building libuv...')
if WIN:
prepare_windows_env(env)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment