From 52f98f63d8efd8db1db268850efa3371d9feb504 Mon Sep 17 00:00:00 2001 From: pmp-p Date: Sat, 23 Sep 2023 02:12:50 +0200 Subject: [PATCH] fix _ctypes obj dir for static linking --- scripts/cpython-build-emsdk.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/cpython-build-emsdk.sh b/scripts/cpython-build-emsdk.sh index d428e3c..5cf1ae2 100755 --- a/scripts/cpython-build-emsdk.sh +++ b/scripts/cpython-build-emsdk.sh @@ -241,11 +241,12 @@ END if pushd ${SDKROOT}/build/cpython-wasm then mkdir -p ${SDKROOT}/prebuilt/emsdk - OBJS="build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/_ctypes.o \ - build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/callbacks.o \ - build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/callproc.o \ - build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/cfield.o \ - build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.11.5/Modules/_ctypes/stgdict.o" + OBJDIR=$(echo -n build/temp.emscripten-wasm32-${PYBUILD}/opt/python-wasm-sdk/src/Python-3.*) + OBJS="${OBJDIR}/Modules/_ctypes/_ctypes.o \ + ${OBJDIR}/Modules/_ctypes/callbacks.o \ + ${OBJDIR}/Modules/_ctypes/callproc.o \ + ${OBJDIR}/Modules/_ctypes/cfield.o \ + ${OBJDIR}/Modules/_ctypes/stgdict.o" $SDKROOT/emsdk/upstream/emscripten/emar rcs ${SDKROOT}/prebuilt/emsdk/lib_ctypes${PYBUILD}.a $OBJS popd