Re: NanoBSD: CURRENT unable to compile 13-STABLE : ld: error: args.o: Opaque pointers are only supported in -opaque-pointers mode (Producer: 'LLVM15.0.7' Reader: 'LLVM 14.0.5')

From: Mark Millard <>
Date: Thu, 30 Mar 2023 19:56:53 UTC
Mateusz Guzik <> wrote on
Date: Thu, 30 Mar 2023 14:56:09 UTC :

> On 3/30/23, Mateusz Guzik <> wrote:
> > On 3/30/23, FreeBSD User <> wrote:
> >> . . .
> >
> So I looked into it and landed
> As of that commit I can both buildworld and buildkernel a stable/13
> tree while running main, without any magic to change compilers.

For reference, that patch involves:

+.if ${COMPILER_VERSION} >= 150000
+CWARNFLAGS+= -Wno-error=deprecated-non-prototype
+CWARNFLAGS+= -Wno-error=array-parameter
+CWARNFLAGS+= -Wno-error=strict-prototypes

I'm unclear here. Is the goal that a system clang 15+ toolchain
can build just the bootstrap toolchain and such that are then
used to actually build stable/13?

Otherwise I'm unclear on how compatibility with what a system
clang 14 toolchain would produce is established.

To my knowledge, FreeBSD has not actively supported newer
FreeBSD building older FreeBSD across versions. It has supported
somewhat-older building newer. I'd guess there are various
ways that having newer toolchains build compatible results
for older toolchains is messy and that FreeBSD has generally
avoided systematically dealing with such.

I'll note that even when the toolchain stays at the same LLVM
version, FreeBSD version V to V+1 gets a change in the default
target triple: even that case is a form of "cross-build" between
the older compiler and the bootstrap compiler to be used in
building V+1 (and any later V+1 compiler builds for V+1).

Has the target triple been systematically forced to be correct
for targeting the older FreeBSD?

May be just some more explanation of the context/intent will
clear my confusion(s). But for now using a system clang 15+
toolchain to produce an older FreeBSD that is based on s system
clang 14 toolchain and an older target triple seems odd to me.

Mark Millard
marklmi at