From 7b0628f037dcbf85cfb381d5e05dea39a2059d33 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 25 May 2022 22:50:03 +0100 Subject: fixed various broken dependencies --- skip/rust-wasm.xibuild | 8 +++ skip/wasi-compiler-rt.xibuild | 45 ------------ skip/wasi-compiler-rt/wasi-compiler-rt.xibuild | 45 ++++++++++++ skip/wasi-libc.xibuild | 21 ------ skip/wasi-libc/wasi-libc.xibuild | 21 ++++++ skip/wasi-libcxx.xibuild | 98 -------------------------- skip/wasi-libcxx/wasi-libcxx.xibuild | 96 +++++++++++++++++++++++++ skip/wasi-sdk.xibuild | 13 ---- skip/wasi-sdk/wasi-sdk.xibuild | 13 ++++ 9 files changed, 183 insertions(+), 177 deletions(-) create mode 100644 skip/rust-wasm.xibuild delete mode 100644 skip/wasi-compiler-rt.xibuild create mode 100644 skip/wasi-compiler-rt/wasi-compiler-rt.xibuild delete mode 100644 skip/wasi-libc.xibuild create mode 100644 skip/wasi-libc/wasi-libc.xibuild delete mode 100644 skip/wasi-libcxx.xibuild create mode 100644 skip/wasi-libcxx/wasi-libcxx.xibuild delete mode 100644 skip/wasi-sdk.xibuild create mode 100644 skip/wasi-sdk/wasi-sdk.xibuild (limited to 'skip') diff --git a/skip/rust-wasm.xibuild b/skip/rust-wasm.xibuild new file mode 100644 index 0000000..39c7e7f --- /dev/null +++ b/skip/rust-wasm.xibuild @@ -0,0 +1,8 @@ +#!/bin/sh + +DEPS="rust lld wasi-sdk" +DESC="WebAssembly targets for rust" + +package () { + add_from_main "usr/lib/rustlib/wasm32-*" +} diff --git a/skip/wasi-compiler-rt.xibuild b/skip/wasi-compiler-rt.xibuild deleted file mode 100644 index c3959dd..0000000 --- a/skip/wasi-compiler-rt.xibuild +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -NAME="wasi-compiler-rt" -DESC="WASI LLVM compiler runtime" - -MAKEDEPS="cmake " -DEPS="musl " - -PKG_VER=13.0.1 -wasi_sdk_ver=14 - -SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" -ADDITIONAL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/compiler-rt-$PKG_VER.src.tar.xz" - -prepare () { - tar xf compiler-rt-$PKG_VER.src.tar.xz - mkdir -p wasi-compiler-rt - mv compiler-rt-$PKG_VER.src wasi-compiler-rt/compiler-rt - mv wasi-sdk.cmake wasi-compiler-rt - mv cmake wasi-compiler-rt - -} - -build () { - cd wasi-compiler-rt - mkdir build - cmake -B build \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DCMAKE_MODULE_PATH=$BUILD_ROOT/wasi-compiler-rt/cmake \ - -DCMAKE_TOOLCHAIN_FILE=$BUILD_ROOT/wasi-compiler-rt/wasi-sdk.cmake \ - -DCMAKE_C_COMPILER_WORKS=ON \ - -DCOMPILER_RT_BAREMETAL_BUILD=ON \ - -DCOMPILER_RT_INCLUDE_TESTS=OFF \ - -DCOMPILER_RT_HAS_FPIC_FLAG=OFF \ - -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ - -DCOMPILER_RT_OS_DIR=wasi \ - -DWASI_SDK_PREFIX=/usr \ - -DCMAKE_INSTALL_PREFIX=/usr/lib/clang/$PKG_VER/ \ - compiler-rt/lib/builtins - cmake --build build -} - -package () { - DESTDIR="$PKG_DEST" cmake --install build -} diff --git a/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild b/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild new file mode 100644 index 0000000..c3959dd --- /dev/null +++ b/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild @@ -0,0 +1,45 @@ +#!/bin/sh + +NAME="wasi-compiler-rt" +DESC="WASI LLVM compiler runtime" + +MAKEDEPS="cmake " +DEPS="musl " + +PKG_VER=13.0.1 +wasi_sdk_ver=14 + +SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" +ADDITIONAL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/compiler-rt-$PKG_VER.src.tar.xz" + +prepare () { + tar xf compiler-rt-$PKG_VER.src.tar.xz + mkdir -p wasi-compiler-rt + mv compiler-rt-$PKG_VER.src wasi-compiler-rt/compiler-rt + mv wasi-sdk.cmake wasi-compiler-rt + mv cmake wasi-compiler-rt + +} + +build () { + cd wasi-compiler-rt + mkdir build + cmake -B build \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_MODULE_PATH=$BUILD_ROOT/wasi-compiler-rt/cmake \ + -DCMAKE_TOOLCHAIN_FILE=$BUILD_ROOT/wasi-compiler-rt/wasi-sdk.cmake \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCOMPILER_RT_BAREMETAL_BUILD=ON \ + -DCOMPILER_RT_INCLUDE_TESTS=OFF \ + -DCOMPILER_RT_HAS_FPIC_FLAG=OFF \ + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ + -DCOMPILER_RT_OS_DIR=wasi \ + -DWASI_SDK_PREFIX=/usr \ + -DCMAKE_INSTALL_PREFIX=/usr/lib/clang/$PKG_VER/ \ + compiler-rt/lib/builtins + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} diff --git a/skip/wasi-libc.xibuild b/skip/wasi-libc.xibuild deleted file mode 100644 index a314eb9..0000000 --- a/skip/wasi-libc.xibuild +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -NAME="wasi-libc" -DESC="WASI libc implementation for WebAssembly" - -MAKEDEPS="cmake " -DEPS="musl " - -PKG_VER=13.0.1 -PKG_VER=0_git20220310 - -BRANCH=079adff840032c3455eb1cb34dc9ceaa0b2bfc0c -SOURCE="ssh://github.com/WebAssembly/wasi-libc" - -build () { - make WASM_CC=/usr/bin/clang -} - -package () { - make INSTALL_DIR=$PKG_DEST/usr/share/wasi-sysroot install -} diff --git a/skip/wasi-libc/wasi-libc.xibuild b/skip/wasi-libc/wasi-libc.xibuild new file mode 100644 index 0000000..4658d50 --- /dev/null +++ b/skip/wasi-libc/wasi-libc.xibuild @@ -0,0 +1,21 @@ +#!/bin/sh + +NAME="wasi-libc" +DESC="WASI libc implementation for WebAssembly" + +MAKEDEPS="cmake " +DEPS="musl " + +PKG_VER=13.0.1 +PKG_VER=0_git20220310 + +BRANCH=079adff840032c3455eb1cb34dc9ceaa0b2bfc0c +SOURCE="ssh://github.com/WebAssembly/wasi-libc" + +build () { + make +} + +package () { + make INSTALL_DIR=$PKG_DEST/usr/share/wasi-sysroot install +} diff --git a/skip/wasi-libcxx.xibuild b/skip/wasi-libcxx.xibuild deleted file mode 100644 index 1425877..0000000 --- a/skip/wasi-libcxx.xibuild +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh - -NAME="wasi-libcxx" -DESC="WASI LLVM C++ standard library" - -MAKEDEPS="cmake " -DEPS="musl " - -PKG_VER=13.0.1 -wasi_sdk_ver=14 - -SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" -ADDITIONAL=" -https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxx-$PKG_VER.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxxabi-$PKG_VER.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/llvm-$PKG_VER.src.tar.xz -" - -builddir="$BUILD_ROOT/wasi-libcxx" - -prepare () { - mkdir -p $builddir/ - - for s in libcxx libcxxabi llvm; do - tar xf $s-$PKG_VER.src.tar.xz - mv $s-$PKG_VER.src $builddir/$s - done - - mv wasi-sdk.cmake "$builddir" - mv cmake "$builddir" -} - -build () { - export CC="clang" - export CXX="clang++" - export CFLAGS="$CFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot" - export CXXFLAGS="$CXXFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot" - - cd $builddir - cmake -B build-libcxx -G Ninja \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DCMAKE_MODULE_PATH="$builddir"/cmake \ - -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \ - -DCMAKE_C_COMPILER_WORKS=ON \ - -DCMAKE_CXX_COMPILER_WORKS=ON \ - -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \ - -DLIBCXX_INCLUDE_TESTS=ON \ - -DLIBCXX_ENABLE_EXCEPTIONS=OFF \ - -DLIBCXX_ENABLE_SHARED=OFF \ - -DLIBCXX_ENABLE_THREADS=OFF \ - -DLIBCXX_HAS_PTHREAD_API=OFF \ - -DLIBCXX_HAS_EXTERNAL_THREAD_API=OFF \ - -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \ - -DLIBCXX_HAS_WIN32_THREAD_API=OFF \ - -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \ - -DLIBCXX_ENABLE_FILESYSTEM=OFF \ - -DLIBCXX_CXX_ABI=libcxxabi \ - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=libcxxabi/include \ - -DLIBCXX_HAS_MUSL_LIBC=ON \ - -DLIBCXX_ABI_VERSION=2 \ - -DWASI_SDK_PREFIX=/usr \ - -DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi \ - libcxx - - cmake -B build-libcxxabi -G Ninja \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DCMAKE_MODULE_PATH="$builddir"/cmake \ - -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \ - -DCMAKE_C_COMPILER_WORKS=ON \ - -DCMAKE_CXX_COMPILER_WORKS=ON \ - -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \ - -DLIBCXXABI_INCLUDE_TESTS=ON \ - -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF \ - -DLIBCXXABI_ENABLE_SHARED=OFF \ - -DLIBCXXABI_ENABLE_THREADS=OFF \ - -DLIBCXXABI_HAS_PTHREAD_API=OFF \ - -DLIBCXXABI_HAS_EXTERNAL_THREAD_API=OFF \ - -DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \ - -DLIBCXXABI_HAS_WIN32_THREAD_API=OFF \ - -DLIBCXXABI_SILENT_TERMINATE:BOOL=ON \ - -DLIBCXXABI_ENABLE_PIC=OFF \ - -DUNIX=ON \ - -DCXX_SUPPORTS_CXX11=ON \ - -DLIBCXXABI_LIBCXX_PATH=libcxx \ - -DLIBCXXABI_LIBCXX_INCLUDES="$builddir"/build-libcxx/include/c++/v1 \ - -DWASI_SDK_PREFIX=/usr \ - -DLIBCXXABI_LIBDIR_SUFFIX=/wasm32-wasi \ - libcxxabi - - cmake --build build-libcxx - cmake --build build-libcxxabi - -} - -package () { - DESTDIR="$PKG_DEST" cmake --install build-libcxx - DESTDIR="$PKG_DEST" cmake --install build-libcxxabi -} diff --git a/skip/wasi-libcxx/wasi-libcxx.xibuild b/skip/wasi-libcxx/wasi-libcxx.xibuild new file mode 100644 index 0000000..45f3772 --- /dev/null +++ b/skip/wasi-libcxx/wasi-libcxx.xibuild @@ -0,0 +1,96 @@ +#!/bin/sh + +NAME="wasi-libcxx" +DESC="WASI LLVM C++ standard library" + +MAKEDEPS="cmake " +DEPS="musl " + +PKG_VER=13.0.1 +wasi_sdk_ver=14 + +SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" +ADDITIONAL=" +https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxx-$PKG_VER.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxxabi-$PKG_VER.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/llvm-$PKG_VER.src.tar.xz +" + +builddir="$BUILD_ROOT/wasi-libcxx" + +prepare () { + mkdir -p $builddir/ + + for s in libcxx libcxxabi llvm; do + tar xf $s-$PKG_VER.src.tar.xz + mv $s-$PKG_VER.src $builddir/$s + done + + mv wasi-sdk.cmake "$builddir" + mv cmake "$builddir" +} + +build () { + export CFLAGS="$CFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot" + export CXXFLAGS="$CXXFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot" + + cd $builddir + cmake -B build-libcxx -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_MODULE_PATH="$builddir"/cmake \ + -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCMAKE_CXX_COMPILER_WORKS=ON \ + -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \ + -DLIBCXX_INCLUDE_TESTS=ON \ + -DLIBCXX_ENABLE_EXCEPTIONS=OFF \ + -DLIBCXX_ENABLE_SHARED=OFF \ + -DLIBCXX_ENABLE_THREADS=OFF \ + -DLIBCXX_HAS_PTHREAD_API=OFF \ + -DLIBCXX_HAS_EXTERNAL_THREAD_API=OFF \ + -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \ + -DLIBCXX_HAS_WIN32_THREAD_API=OFF \ + -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \ + -DLIBCXX_ENABLE_FILESYSTEM=OFF \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DLIBCXX_CXX_ABI_INCLUDE_PATHS=libcxxabi/include \ + -DLIBCXX_HAS_MUSL_LIBC=ON \ + -DLIBCXX_ABI_VERSION=2 \ + -DWASI_SDK_PREFIX=/usr \ + -DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi \ + libcxx + + cmake -B build-libcxxabi -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_MODULE_PATH="$builddir"/cmake \ + -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCMAKE_CXX_COMPILER_WORKS=ON \ + -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \ + -DLIBCXXABI_INCLUDE_TESTS=ON \ + -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF \ + -DLIBCXXABI_ENABLE_SHARED=OFF \ + -DLIBCXXABI_ENABLE_THREADS=OFF \ + -DLIBCXXABI_HAS_PTHREAD_API=OFF \ + -DLIBCXXABI_HAS_EXTERNAL_THREAD_API=OFF \ + -DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \ + -DLIBCXXABI_HAS_WIN32_THREAD_API=OFF \ + -DLIBCXXABI_SILENT_TERMINATE:BOOL=ON \ + -DLIBCXXABI_ENABLE_PIC=OFF \ + -DUNIX=ON \ + -DCXX_SUPPORTS_CXX11=ON \ + -DLIBCXXABI_LIBCXX_PATH=libcxx \ + -DLIBCXXABI_LIBCXX_INCLUDES="$builddir"/build-libcxx/include/c++/v1 \ + -DWASI_SDK_PREFIX=/usr \ + -DLIBCXXABI_LIBDIR_SUFFIX=/wasm32-wasi \ + libcxxabi + + cmake --build build-libcxx + cmake --build build-libcxxabi + +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build-libcxx + DESTDIR="$PKG_DEST" cmake --install build-libcxxabi +} diff --git a/skip/wasi-sdk.xibuild b/skip/wasi-sdk.xibuild deleted file mode 100644 index 0cd76f9..0000000 --- a/skip/wasi-sdk.xibuild +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -NAME="wasi-sdk" -DESC="WASI-enabled WebAssembly C/C++ toolchain" - -MAKEDEPS="cmake " -DEPS="wasi-compiler-rt wasi-libc wasi-libcxx" - -PKG_VER=14.0 - -package () { - mkdir $PKG_DEST -} diff --git a/skip/wasi-sdk/wasi-sdk.xibuild b/skip/wasi-sdk/wasi-sdk.xibuild new file mode 100644 index 0000000..0cd76f9 --- /dev/null +++ b/skip/wasi-sdk/wasi-sdk.xibuild @@ -0,0 +1,13 @@ +#!/bin/sh + +NAME="wasi-sdk" +DESC="WASI-enabled WebAssembly C/C++ toolchain" + +MAKEDEPS="cmake " +DEPS="wasi-compiler-rt wasi-libc wasi-libcxx" + +PKG_VER=14.0 + +package () { + mkdir $PKG_DEST +} -- cgit v1.2.1