diff --git a/.gitignore b/.gitignore index b22cac9..5ea4ca2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,5 @@ /.eric6project /demos /tests/code -/support/sim.links /scratchbook/ -ATTIC +/ATTIC diff --git a/config b/config index a89aa31..1710160 100644 --- a/config +++ b/config @@ -20,7 +20,7 @@ export PYTHONPYCACHEPREFIX=${PYTHONPYCACHEPREFIX:-$(realpath ${SDKROOT}/build/py export HOME=${SDKROOT} export HPY=${HOST_PREFIX}/bin/python${PYBUILD} -export HPIP=${HOST_PREFIX}/bin/pip${PYBUILD} +export HPIP="${HPY} -mpip" # cpython build opts export CPOPTS="-Os -g0 -fPIC" diff --git a/scripts/cpython-build-host-deps.sh b/scripts/cpython-build-host-deps.sh index 5677fc5..fd0ca88 100755 --- a/scripts/cpython-build-host-deps.sh +++ b/scripts/cpython-build-host-deps.sh @@ -13,3 +13,4 @@ $HPIP install --upgrade pip # 3.12 and git deprecated setuptools bundling. $HPIP install --upgrade setuptools + diff --git a/scripts/cpython-fetch.sh b/scripts/cpython-fetch.sh index 85899e0..e4d6399 100755 --- a/scripts/cpython-fetch.sh +++ b/scripts/cpython-fetch.sh @@ -75,9 +75,9 @@ fi if echo $PYBUILD | grep -q 11$ then - wget -q -c https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tar.xz - tar xf Python-3.11.5.tar.xz - ln -s Python-3.11.5 cpython${PYBUILD} + wget -q -c https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tar.xz + tar xf Python-3.11.6.tar.xz + ln -s Python-3.11.6 cpython${PYBUILD} export REBUILD=true fi diff --git a/scripts/wasisdk-fetch.sh b/scripts/wasisdk-fetch.sh new file mode 100755 index 0000000..6f7d3b5 --- /dev/null +++ b/scripts/wasisdk-fetch.sh @@ -0,0 +1,62 @@ +#!/bin/bash + + +if [[ -z ${WASISDK+z} ]] +then + . ${CONFIG:-config} + + export WASISDK="${SDKROOT}/wasisdk" + export WASI_SDK_PREFIX="${WASISDK}/upstream" + + + + if [ -d ${WASI_SDK_PREFIX} ] + then + echo " + * using wasisdk from $(realpath wasisdk/upstream) + with sys python $SYS_PYTHON +" 1>&2 + else + pushd wasisdk + if [ -f /pp ] + then + wget -c http://192.168.1.66/cfake/wasi-sdk-20.0-linux.tar.gz + else + wget -c https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz + fi + tar xfz wasi-sdk-20.0-linux.tar.gz + mv wasi-sdk-20.0 upstream && rm wasi-sdk-20.0-linux.tar.gz + ln ${SDKROOT}/wasisdk/bin/wasi ${SDKROOT}/wasisdk/bin/wasi-c + ln ${SDKROOT}/wasisdk/bin/wasi ${SDKROOT}/wasisdk/bin/wasi-cpp + ln ${SDKROOT}/wasisdk/bin/wasi ${SDKROOT}/wasisdk/bin/wasi-c++ + popd + + fi + + export PATH="${WASISDK}/bin:${WASI_SDK_PREFIX}/bin:$PATH" + + export WASI_SYSROOT="${WASI_SDK_PREFIX}/share/wasi-sysroot" + + export CC="${WASISDK}/bin/wasi-c" + export CPP="${WASISDK}/bin/wasi-cpp" + export CXX="${WASISDK}/bin/wasi++" + + + export LDSHARED="${WASI_SDK_PREFIX}/bin/wasm-ld" + export AR="${WASI_SDK_PREFIX}/bin/llvm-ar" + export RANLIB="${WASI_SDK_PREFIX}/bin/ranlib" + + + # instruct pkg-config to use wasi target root + export PKG_CONFIG_PATH="${SDKROOT}/devices/wasi/usr/lib/pkgconfig" + + # for thirparty prebuilts .pc in sdk + export PKG_CONFIG_LIBDIR="${WASI_SYSROOT}/lib/pkgconfig:${WASI_SYSROOT}/share/pkgconfig" + export PKG_CONFIG_SYSROOT_DIR="${WASI_SYSROOT}" + + + + +else + echo "wasidk: config already set !" 1>&2 +fi