wasi-libc: 232.3eb02a7 -> 0.20220525

This commit is contained in:
Danny Rawlins 2022-09-19 08:36:09 +10:00
parent 0a7ce3aa01
commit 1da168feda
4 changed files with 23 additions and 45 deletions

View File

@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3xmtMYsjBwA4MEBMYJZXSMuhwNg3ktRmUfWunSFf6ltRdzuNa2twqOTwf6onneRcOgssA0U7tS3iLlSEkNrvJAU=
SHA256 (Pkgfile) = d4e162ca88b9153044a6d5f2dafd17edc0770358c0700a604ad25a4558a2a96d
RWSagIOpLGJF3zyWJkTqoWzawjyDieVtxZtyU3fdDVjkcifuMCc9o1lmx3wK4TzKWFIID3CMk/KG7aRfcGOmvG7bFoAk5CUZkAE=
SHA256 (Pkgfile) = 43d00c4e3ed67ce09e86dfca5d7b8d8096357c1dc8bfd8c1d340ee515f569aeb
SHA256 (.footprint) = c0628cc7294ebe05a3a7f4c43cffc9aa31ac513281cccbd92ba96f4f9c9ea87b
SHA256 (wasi-libc-232.3eb02a7.tar.gz) = 198ac245d9053d4fb62d8ffeffd34cbf7ecd3d7991fcefbbf2883e4ec6fcda64
SHA256 (llvm-14.patch) = d058fc91994e3c2a7bde544e356a39acb132fdbc75c9dbfc3c7f245b89f379c8
SHA256 (wasi-libc-0.20220525.tar.gz) = d6496bf32e60edb355dd0a7c6aabfc67012e1e93d14fb0e94a33d3a30e20fe3d
SHA256 (no-double-build.patch) = 875fd0131997dfdec737ba7a2df93d6d243def5ad0b60aac6d48fab9c902b464

View File

@ -4,24 +4,21 @@
# Depends on: clang
name=wasi-libc
version=232.3eb02a7
_commit=3eb02a798b3ec0048c39d2ab8b97a70575892a5a
version=0.20220525
_commit=30094b6ed05f19cee102115215863d185f2db4f0
release=1
source=(https://github.com/WebAssembly/wasi-libc/archive/$_commit/$name-$version.tar.gz
llvm-14.patch)
no-double-build.patch)
build() {
cd $name-$_commit
patch -p1 -i $SRC/llvm-14.patch
patch -p1 -i $SRC/no-double-build.patch
make \
WASM_CC=/usr/bin/clang \
WASM_AR=/usr/bin/llvm-ar \
WASM_NM=/usr/bin/llvm-nm
install -dm755 $PKG/usr/share
cp -dr --preserve=mode,timestamp sysroot $PKG/usr/share/wasi-sysroot
# 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

View File

@ -1,30 +0,0 @@
From c06cecb74c8b7662305235aac10921e81efd602d Mon Sep 17 00:00:00 2001
From: Mike Hommey <mh@glandium.org>
Date: Fri, 8 Apr 2022 10:38:53 +0900
Subject: [PATCH] Adjust the Makefile for LLVM 14
Rebased by Danny Rawlins, crux at romster dot me
diff -pruN wasi-libc-3eb02a798b3ec0048c39d2ab8b97a70575892a5a.orig/Makefile wasi-libc-3eb02a798b3ec0048c39d2ab8b97a70575892a5a/Makefile
--- wasi-libc-3eb02a798b3ec0048c39d2ab8b97a70575892a5a.orig/Makefile 2022-04-09 09:44:41.031980458 +0000
+++ wasi-libc-3eb02a798b3ec0048c39d2ab8b97a70575892a5a/Makefile 2022-04-09 09:48:10.370241521 +0000
@@ -530,6 +530,7 @@ check-symbols: startup_files libc
@#
@# TODO: Undefine __FLOAT128__ for now since it's not in clang 8.0.
@# TODO: Filter out __FLT16_* for now, as not all versions of clang have these.
+ @# TODO: Filter out __NO_MATH_ERRNO_ and a few __*WIDTH__ that are new to clang 14.
$(WASM_CC) $(CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \
-isystem $(SYSROOT_INC) \
-std=gnu17 \
@@ -548,8 +549,11 @@ check-symbols: startup_files libc
-U__GNUC_PATCHLEVEL__ \
-U__VERSION__ \
-U__FLOAT128__ \
+ -U__NO_MATH_ERRNO__ \
+ -U__BITINT_MAXWIDTH__ \
| sed -e 's/__[[:upper:][:digit:]]*_ATOMIC_\([[:upper:][:digit:]_]*\)_LOCK_FREE/__compiler_ATOMIC_\1_LOCK_FREE/' \
| grep -v '^#define __FLT16_' \
+ | grep -v '^#define __\(BOOL\|INT_\(LEAST\|FAST\)\(8\|16\|32\|64\)\|INT\|LONG\|LLONG\|SHRT\)_WIDTH__' \
> "$(SYSROOT_SHARE)/predefined-macros.txt"
# Check that the computed metadata matches the expected metadata.

View File

@ -0,0 +1,11 @@
--- a/Makefile
+++ b/Makefile
@@ -547,7 +547,7 @@
# This ignores whitespace because on Windows the output has CRLF line endings.
diff -wur "$(CURDIR)/expected/$(MULTIARCH_TRIPLE)" "$(SYSROOT_SHARE)"
-install: finish
+install:
mkdir -p "$(INSTALL_DIR)"
cp -r "$(SYSROOT)/lib" "$(SYSROOT)/share" "$(SYSROOT)/include" "$(INSTALL_DIR)"