@@ -171,13 +171,15 @@ ac_cv_func_dlopen=yes
171171ac_cv_lib_ffi_ffi_call=yes
172172py_cv_module__ctypes=yes
173173py_cv_module__ctypes_test=yes
174- ax_cv_c_float_words_bigendian=no
175174ac_cv_func_sem_clockwait=no
176175
177176ac_cv_file__dev_ptmx=no
178177ac_cv_file__dev_ptc=no
179- END
178+ ac_cv_func_memfd_create=no
180179
180+ ax_cv_c_float_words_bigendian=no
181+ # ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2=no
182+ END
181183
182184
183185# _ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -ldl -lffi -DHAVE_FFI_PREP_CIF_VAR -DHAVE_FFI_PREP_CLOSURE_LOC -DHAVE_FFI_CLOSURE_ALLOC
@@ -222,11 +224,14 @@ END
222224
223225 if [ ${PYMINOR} -ge 14 ]
224226 then
225-
226227 cp Tools/wasm/config.host-wasm32-emscripten Tools/wasm/config.site-wasm32-emscripten
227228
228229 sed -i ' s|wasm32-unknown-emscripten|wasm32-bi-emscripten|g' Makefile.pre.in
229230 EXTRA_PYOPTS=" $EXTRA_PYOPTS --disable-ipv6"
231+ # no PY_CALL_TRAMPOLINE
232+ sed -i ' s|,__PyEM_EMSCRIPTEN_COUNT_ARGS_OFFSET||g' configure
233+ sed -i ' s|,__PyEM_EMSCRIPTEN_COUNT_ARGS_OFFSET||g' configure.ac
234+
230235 else
231236 EXTRA_PYOPTS=" $EXTRA_PYOPTS --with-emscripten-target=browser"
232237 fi
258263 sed -i ' s|-lpthread|-lcrypto|g' Makefile
259264
260265
261- echo " =========== cpython build ================" 1>&2
266+ echo " =========== cpython${PYMAJOR} . ${PYMINOR} build ================" 1>&2
262267 if emmake make -j$( nproc) WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/
263268 then
264269 echo -n
@@ -274,22 +279,36 @@ END
274279 fi
275280 # emmake make -j1 Modules/_ctypes/_ctypes.o
276281
277- echo " =========== cpython install ================" 1>&2
278- if emmake make WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/ install
282+ echo " ================ cpython${PYMAJOR} .${PYMINOR} install ================" 1>&2
283+ if [ ${PYMINOR} -ge 14 ]
284+ then
285+ if emmake make WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/ build-details.json install
286+ then
287+ pushd Modules/_hacl
288+ $SDKROOT /emsdk/upstream/emscripten/emar rcs ${SDKROOT} /prebuilt/emsdk/lib_hacl${PYBUILD} .a * .o
289+ popd
290+ touch $PREFIX /python${PYMAJOR} .${PYMINOR}
291+ fi
292+ else
293+ if emmake make WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/ install
294+ then
295+ touch $PREFIX /python${PYMAJOR} .${PYMINOR}
296+ fi
297+ fi
298+
299+
300+ if [ -f $PREFIX /python${PYMAJOR} .${PYMINOR} ]
279301 then
280- echo " ok"
281- # cp -rf ${PREFIX}/usr/lib/python${PYMAJOR}.${PYMINOR}/* ${ROOT}/devices/$(arch)/usr/lib/python${PYMAJOR}.${PYMINOR}/
282- # rm -rf ${PREFIX}/lib/python${PYMAJOR}.${PYMINOR}
283- # ln -sf ${ROOT}/devices/$(arch)/usr/lib/python${PYMAJOR}.${PYMINOR} ${PREFIX}/lib/python${PYMAJOR}.${PYMINOR}
302+ echo " cpython${PYMAJOR} .${PYMINOR} install success"
284303 else
285304 echo "
286305
287- **** cpython wasm install failed ***
306+ **** cpython${PYMAJOR} . ${PYMINOR} - wasm install failed ***
288307
289- emmake make WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/ install
308+ emmake make WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/ build-details.json install
290309
291310 " 1>&2
292- exit 263
311+ exit 308
293312
294313 fi
295314
@@ -353,7 +372,7 @@ MODSYSCONFIG="${SDKROOT}/prebuilt/emsdk/${PYBUILD}/_sysconfigdata__emscripten_de
353372cp $PREFIX /lib/python${PYBUILD} /_sysconfigdata__emscripten_wasm32-emscripten.py \
354373 ${MODSYSCONFIG}
355374
356- sed -i ' s|-Os|-O0 |g' ${MODSYSCONFIG}
375+ sed -i ' s|-Os|-O2 |g' ${MODSYSCONFIG}
357376sed -i ' s|-g0|-g3|g' ${MODSYSCONFIG}
358377
359378# this one is required for `python3-wasm -mbuild` venv
0 commit comments