| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,10 +47,6 @@ hostpython () { | |||
| 47 | 47 | ||
| 48 | 48 | make -j$(nproc) | |
| 49 | 49 | make install DESTDIR=$BUILD/hostpython | |
| 50 | - | ||
| 51 | - # emcc should disregard '-fPIC' during non-SIDE_MODULE builds, | ||
| 52 | - # otherwise _sysconfigdata.build_time_vars['CCSHARED'] is the culprit: | ||
| 53 | - # sed -i -e 's/-fPIC//' $BUILD/hostpython/lib/python2.7/_sysconfigdata.py | ||
| 54 | 50 | ) | |
| 55 | 51 | ||
| 56 | 52 | # setuptools for 3rd-party module installers | |
@@ -70,29 +66,29 @@ emscripten () { | |||
| 70 | 66 | # OPT=-Oz: TODO | |
| 71 | 67 | # CONFIG_SITE: deals with cross-compilation https://bugs.python.org/msg136962 | |
| 72 | 68 | # not needed as emcc has a single arch: BASECFLAGS=-m32 LDFLAGS=-m32 | |
| 73 | - # --without-threads: pthreads experimental as of 2019-11 | ||
| 69 | + # --without-threads: pthreads experimental as of 2020-05 | ||
| 74 | 70 | # cf. https://emscripten.org/docs/porting/pthreads.html | |
| 75 | - | ||
| 71 | + # --without-signal-module: no process signals in Emscripten | ||
| 72 | + # --without-pymalloc: ? | ||
| 73 | + # --disable-ipv6: browser-side networking | ||
| 74 | + # --disable-shared: compile statically for Emscripten perfs + incomplete PIC support | ||
| 76 | 75 | if [ ! -e config.status ]; then | |
| 77 | 76 | CONFIG_SITE=../config.site BASECFLAGS='-s USE_ZLIB=1' \ | |
| 77 | + PYTHON_FOR_BUILD=$BUILD/Python-$VERSION/native/python \ | ||
| 78 | 78 | emconfigure ../configure \ | |
| 79 | 79 | --host=asmjs-unknown-emscripten --build=$(../config.guess) \ | |
| 80 | 80 | --prefix='' \ | |
| 81 | 81 | --without-threads --without-pymalloc --without-signal-module --disable-ipv6 \ | |
| 82 | 82 | --disable-shared | |
| 83 | 83 | fi | |
| 84 | + # Fix bad detection | ||
| 84 | 85 | sed -i -e 's,^#define HAVE_GCC_ASM_FOR_X87.*,/* & */,' pyconfig.h | |
| 85 | 86 | ||
| 86 | 87 | # pgen native setup | |
| 87 | 88 | # note: need to build 'pgen' once before overwriting it with the native one | |
| 88 | 89 | # note: PGEN=../native/Parser/pgen doesn't work, make overwrites it | |
| 89 | 90 | emmake make Parser/pgen | |
| 90 | 91 | \cp --preserve=mode ../native/Parser/pgen Parser/ | |
| 91 | - # python native setup | ||
| 92 | - # note: PATH=... doesn't work, it breaks emcc's /usr/bin/env python | ||
| 93 | - # note: PYTHON_FOR_BUILD=../native/python neither, it's a more complex call | ||
| 94 | - #emmake env PATH=../../hostpython/bin:$PATH make -j$(nproc) | ||
| 95 | - sed -i -e 's,\(PYTHON_FOR_BUILD=.*\) python2.7,\1 $(abs_srcdir)/native/python,' Makefile | ||
| 96 | 92 | ||
| 97 | 93 | # Modules/Setup.local | |
| 98 | 94 | echo '*static*' > Modules/Setup.local | |
| Back | FazBrowse Home | New Git URL |
0 commit comments