Date: Wed, 9 Apr 2025 20:28:05 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: Dimitry Andric <dim@FreeBSD.org> Cc: toolchain@freebsd.org Subject: Re: c++ error when trying to build releng/14.2 on 'main' host Message-ID: <c0188a88-2cb2-4df8-b14e-e205729dfe9a@FreeBSD.org> In-Reply-To: <1f477096-9f1f-442c-8165-733e0f2f5b4f@FreeBSD.org> References: <c92f6024-15d2-4b8f-88c5-0009da03d2f7@FreeBSD.org> <CALH631=19GcN0fED8hJswiXTKwyyJJJHHbeufNbkvF%2BHHU56Pw@mail.gmail.com> <32668b30-726c-4d38-aaab-bba480558e57@freebsd.org> <08C3C7A9-5378-4B72-8F30-C253CF6D4B55@FreeBSD.org> <954033b4-3f8d-4683-97c2-f0ce75eecf47@FreeBSD.org> <1f477096-9f1f-442c-8165-733e0f2f5b4f@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
On 09/04/2025 2:54 pm, Andriy Gapon wrote: > Host clang: > $ clang --version > FreeBSD clang version 19.1.4 (https://github.com/llvm/llvm-project.git > llvmorg-19.1.4-0-gaadaa00de76e) > Target: x86_64-unknown-freebsd15.0 > Thread model: posix > InstalledDir: /usr/bin > Build config: +assertions > > Oh, and probably something that I should have mentioned (and recalled myself) > from the start. This is a build for a disk-constrained system, so it have these > in its src.conf: > > WITHOUT_CLANG=yes > WITH_LLVM_TARGET_X86=yes # to undo effect of WITHOUT_CLANG > > I am not sure where i picked up those, but I suspect that this kind of muckery > with the toolchain can result in problems. Okay, WITHOUT_WERROR did help, obviously. But then I got another problem related to the use of -flto in usr.bin/gh-bc. It caused .o files to be LLVM IR bitcode instead of "normal" object files. My best guess now is that my combination of WITHOUT_CLANG and WITH_LLVM_TARGET_X86 causes a wrong (host) compiler to be used in the build. My goal with those flags was to not build clang/llvm for the target, but to have them for the correct cross-build. But apparently the flags do not do that (any longer). 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) ===> 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) 2.15 real 1.64 user 0.50 sys 0.05 real 0.00 user 0.04 sys Trying now a build with WITHOUT_CLANG (as before) but without WITH_LLVM_TARGET_X86. -- Andriy Gaponhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c0188a88-2cb2-4df8-b14e-e205729dfe9a>
