tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 2025Q2 branch status; wasi-libc



On Fri, Jun 27, 2025 at 2:34 PM Benny Siegert <bsiegert%gmail.com@localhost> wrote:
> > why this would only appear in NetBSD 9 is bizarre, and I *suspect*
> > is related to the compiler used to build llvm itself; I'd be
> > interested to see what would happen if llvm were built using a later
> > version of gcc.
>
> I can do a test run of this. I will try with gcc 14.

With this simple patch, wasi-libc successfully builds for me on NetBSD 9/amd64:

diff --git a/lang/llvm/version.mk b/lang/llvm/version.mk
index 4c8a94971c71..ee306760b17a 100644
--- a/lang/llvm/version.mk
+++ b/lang/llvm/version.mk
@@ -32,6 +32,14 @@ SITES.${RUNTIMES_DIST}${EXTRACT_SUFX}=       \

${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
 DISTFILES=     ${DEFAULT_DISTFILES} ${EXTRA_DIST}

+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "NetBSD"
+.  if ${OPSYS_VERSION} < 099900
+# Use a newer gcc to avoid crashes when building wasi-libc.
+GCC_REQD+=     14
+.  endif
+.endif
+
 .PHONY: llvm-cmake-modules
 post-extract: llvm-cmake-modules
 llvm-cmake-modules:

What do folks think? Should I commit it? This is obviously terrible --
if you have suggestions, please tell me where to put the condition
instead.




-- 
Benny


Home | Main Index | Thread Index | Old Index