On 09/04/2025 8:28 pm, Andriy Gapon wrote:
What's interesting is that I saw this during the build (make with -s option):
--------------------------------------------------------------
 >>> stage 3: cross tools
--------------------------------------------------------------
===> lib/clang (obj,all,install)
===> lib/clang/libllvm (all)
===> lib/clang/libllvm (install)
===> usr.bin/clang (obj,all,install)
> ===> usr.bin/clang/lld (obj,all,install)

When I compared this to other builds, I noticed a missing bit:
===> usr.bin/clang/clang (all)
===> usr.bin/clang/clang (install)

usr.bin/clang/Makefile has this near the top:
.if ${MK_CLANG} != "no"
SUBDIR+=        clang
.endif

If I read this right, it means that the actual clang is not built/installed if WITHOUT_CLANG is configured.
Even in the cross-tools stage!

I am not sure how it worked before as I do not see any recent changes in that direct area. Not sure when and what went wrong. Maybe it's something in one of .mk include files, maybe something in my environment.

As hack I tried this change and it seems to have helped:
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -787,6 +787,7 @@
 # TOOLS_PREFIX set in BMAKE
 XMAKE=         ${BMAKE} \
                TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
+               MK_CLANG=${MK_CLANG_BOOTSTRAP} \
                MK_LLDB=no \
                MK_LLVM_BINUTILS=no \
                MK_TESTS=no

I hope that more knowledgeable people can see what the problem could be, wherever it is.

===> lib/libelftc (obj,all,install)
===> lib/libpe (obj,all,install)
===> usr.bin/elfctl (obj,all,install)
===> usr.bin/elfdump (obj,all,install)
===> usr.bin/objcopy (obj,all,install)
===> usr.bin/nm (obj,all,install)
===> usr.bin/size (obj,all,install)
===> usr.bin/strings (obj,all,install)
===> usr.bin/addr2line (obj,all,install)
===> cddl/lib/libctf (obj,all,install)
===> cddl/lib/libspl (obj,all,install)
===> cddl/usr.bin/ctfconvert (obj,all,install)
===> cddl/usr.bin/ctfmerge (obj,all,install)
===> stand/usb/tools (obj,all,install)


--
Andriy Gapon

Reply via email to