diff --git a/lang/wasi-libc/Makefile b/lang/wasi-libc/Makefile index e72c8b8c72b7..cd547a2d734f 100644 --- a/lang/wasi-libc/Makefile +++ b/lang/wasi-libc/Makefile @@ -2,9 +2,8 @@ COMMENT = C standard library for WebAssembly System Interface GH_ACCOUNT = WebAssembly GH_PROJECT = wasi-libc -GH_COMMIT = 05cd0af0af4b5a191117d47a182adff1d6546b87 -DISTNAME = wasi-libc-0.20220413 -REVISION = 0 +GH_COMMIT = 9c17f5235c7977cb2a000990eb8c605a25a80adf +DISTNAME = wasi-libc-0.20231121 DISTFILES = ${GH_DISTFILE} DISTFILES.h = wasi-libc-llvm13-std-headers.tar.gz @@ -19,8 +18,7 @@ COMPILER = ports-clang USE_GMAKE = yes ALL_TARGET = finish -# The entire wasi stack needs some work to be able to build with llvm 16 -MODCLANG_VERSION = 13 +MODCLANG_VERSION = 16 MAKE_ENV += AR=${LOCALBASE}/bin/llvm-ar-${MODCLANG_VERSION} \ NM=${LOCALBASE}/bin/llvm-nm-${MODCLANG_VERSION} \ INSTALL_DIR=${WRKINST}${PREFIX}/share/wasi-sysroot diff --git a/lang/wasi-libc/distinfo b/lang/wasi-libc/distinfo index 2aaa14b09e8a..166aa4fbd487 100644 --- a/lang/wasi-libc/distinfo +++ b/lang/wasi-libc/distinfo @@ -1,4 +1,4 @@ -SHA256 (wasi-libc-0.20220413-05cd0af0.tar.gz) = vgKb3dSRO5d5BYZjhUKPJBx+yeCRlteONLe2s2xUOmc= +SHA256 (wasi-libc-0.20231121-9c17f523.tar.gz) = dRUaojjr1lnbuJytlZFIC+oM2mfWoEeo5Qd3SoJ4mOk= SHA256 (wasi-libc-llvm13-std-headers.tar.gz) = YTble8uIDTmeki+GTWKcGnO5JHK6p/educ3h/T+tIE4= -SIZE (wasi-libc-0.20220413-05cd0af0.tar.gz) = 1251259 +SIZE (wasi-libc-0.20231121-9c17f523.tar.gz) = 1313030 SIZE (wasi-libc-llvm13-std-headers.tar.gz) = 1795 diff --git a/lang/wasi-libc/patches/patch-Makefile b/lang/wasi-libc/patches/patch-Makefile index ec9c78ecace1..c65fe44c5509 100644 --- a/lang/wasi-libc/patches/patch-Makefile +++ b/lang/wasi-libc/patches/patch-Makefile @@ -4,10 +4,11 @@ avoid rebuilding everything in fake wasi-libc requires some compiler headers that we remove from our llvm ports so we include them here instead +chunk 2: adapt regex for our grep Index: Makefile --- Makefile.orig +++ Makefile -@@ -224,7 +224,7 @@ endif +@@ -346,7 +346,7 @@ endif # should come earlier in the search path, so they can "override" # and/or `#include_next` the public headers. `-isystem` (like # `-idirafter`) comes later in the search path than `-I`. @@ -16,9 +17,20 @@ Index: Makefile # These variables describe the locations of various files and directories in # the build tree. -@@ -565,7 +565,7 @@ check-symbols: startup_files libc +@@ -789,8 +789,8 @@ check-symbols: startup_files libc + -U__FLT_EVAL_METHOD__ -Wno-builtin-macro-redefined \ + | sed -e 's/__[[:upper:][:digit:]]*_ATOMIC_\([[:upper:][:digit:]_]*\)_LOCK_FREE/__compiler_ATOMIC_\1_LOCK_FREE/' \ + | sed -e 's/__GNUC_VA_LIST $$/__GNUC_VA_LIST 1/' \ +- | grep -v '^#define __\(BOOL\|INT_\(LEAST\|FAST\)\(8\|16\|32\|64\)\|INT\|LONG\|LLONG\|SHRT\)_WIDTH__' \ +- | grep -v '^#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_\(1\|2\|4\|8\)' \ ++ | egrep -v '^#define __(BOOL|INT_(LEAST|FAST)(8|16|32|64)|INT|LONG|LLONG|SHRT)_WIDTH__' \ ++ | egrep -v '^#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_(1|2|4|8)' \ + | grep -v '^#define __FPCLASS_' \ + | grep -v '^#define __FLT128_' \ + | grep -v '^#define NDEBUG' \ +@@ -803,7 +803,7 @@ check-symbols: startup_files libc # This ignores whitespace because on Windows the output has CRLF line endings. - diff -wur "$(CURDIR)/expected/$(MULTIARCH_TRIPLE)" "$(SYSROOT_SHARE)" + diff -wur "expected/$(TARGET_TRIPLE)" "$(SYSROOT_SHARE)" -install: finish +install: diff --git a/lang/wasi-libc/pkg/PLIST b/lang/wasi-libc/pkg/PLIST index 71d8b8edd1bf..0f6969f83b88 100644 --- a/lang/wasi-libc/pkg/PLIST +++ b/lang/wasi-libc/pkg/PLIST @@ -99,6 +99,7 @@ share/wasi-sysroot/include/cpio.h share/wasi-sysroot/include/crypt.h share/wasi-sysroot/include/ctype.h share/wasi-sysroot/include/dirent.h +share/wasi-sysroot/include/dlfcn.h share/wasi-sysroot/include/endian.h share/wasi-sysroot/include/err.h share/wasi-sysroot/include/errno.h