tech-pkg archive

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

Re: 2025Q2 branch status; wasi-libc



Benny Siegert <bsiegert%gmail.com@localhost> writes:

> 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.

Does it need to be 14?  NetBSD 9 in general needs to build gcc10, and if
that works, that's much nicer.

I would expect it to work the same way in Makefile, after the existing
GCC_REQD.

or is version.mk used as a Makefile.common?


Home | Main Index | Thread Index | Old Index