forked from ports/contrib
29 lines
776 B
Plaintext
29 lines
776 B
Plaintext
# Description: WASI libc implementation for WebAssembly
|
|
# URL: https://github.com/WebAssembly/wasi-libc
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: clang
|
|
|
|
name=wasi-libc
|
|
version=0.20230621
|
|
_commit=7018e24d8fe248596819d2e884761676f3542a04
|
|
release=1
|
|
source=(https://github.com/WebAssembly/wasi-libc/archive/$_commit/$name-$version.tar.gz
|
|
no-double-build.patch)
|
|
|
|
build() {
|
|
cd $name-$_commit
|
|
|
|
patch -p1 -i $SRC/no-double-build.patch
|
|
|
|
# Remove bulk memory support
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1773200#c4
|
|
make CC=clang BULK_MEMORY_SOURCES=
|
|
make INSTALL_DIR="$PKG"/usr/share/wasi-sysroot install
|
|
|
|
cd $PKG/usr/share/wasi-sysroot/lib/wasm32-wasi
|
|
for f in *.a; do
|
|
/usr/bin/llvm-ranlib $f
|
|
/usr/bin/llvm-strip --strip-debug $f
|
|
done
|
|
}
|