2021-12-11 22:27:57 +11:00
|
|
|
# Description: WASI libc implementation for WebAssembly
|
|
|
|
# URL: https://github.com/WebAssembly/wasi-libc
|
2023-08-10 12:06:44 -04:00
|
|
|
# Maintainer: John McQuah, jmcquah at disroot dot org
|
2021-12-11 22:27:57 +11:00
|
|
|
# Depends on: clang
|
|
|
|
|
|
|
|
name=wasi-libc
|
2023-11-15 12:33:51 +00:00
|
|
|
version=0.20231115
|
|
|
|
_commit=b85d65528d6e17ae1874c6cc6a6a3ac02e83021a
|
2021-12-11 22:27:57 +11:00
|
|
|
release=1
|
2023-09-22 22:13:28 -04:00
|
|
|
source=(https://github.com/WebAssembly/$name/archive/$_commit/$name-$version.tar.gz
|
|
|
|
no-double-build.patch)
|
2022-02-16 21:06:09 +01:00
|
|
|
|
2021-12-11 22:27:57 +11:00
|
|
|
build() {
|
2023-09-22 22:13:28 -04:00
|
|
|
cd $name-$_commit
|
2021-12-11 22:27:57 +11:00
|
|
|
|
2023-09-22 22:13:28 -04:00
|
|
|
patch -p1 -i $SRC/no-double-build.patch
|
2022-04-10 12:25:50 +10:00
|
|
|
|
2023-09-22 22:13:28 -04:00
|
|
|
# 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
|
2021-12-11 22:27:57 +11:00
|
|
|
|
2023-09-22 22:13:28 -04:00
|
|
|
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
|
2021-12-11 22:27:57 +11:00
|
|
|
}
|