Set the MK_LLVM_LINK_STATIC_LIBRARIES knob to yes for the native-xtools
build target.
This addresses a build failure that occurs otherwise.
PR: 286710, 291409
MFC after: 3 days
Differential D54815
native-xtools: use static LLVM libraries Authored by mhorne on Wed, Jan 21, 6:21 PM. Tags None Referenced Files
Details Set the MK_LLVM_LINK_STATIC_LIBRARIES knob to yes for the native-xtools This addresses a build failure that occurs otherwise. PR: 286710, 291409 build failure snippit from the PR, and I saw the same error locally: --- llvm-ar --- c++ -target x86_64-unknown-freebsd15.0 --sysroot=/usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/tmp -B/usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/tmp/usr/bin -O2 -pipe -fno-common -I/usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/lib/clang/libllvm -I/usr/src/lib/clang/include -I/usr/src/contrib/llvm-project/llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_VCS_VERSION_INC -DNDEBUG -DLLVM_DEFAULT_TARGET_TRIPLE=\"aarch64-unknown-freebsd15.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd15.0\" -DDEFAULT_SYSROOT=\"\" -DLLVM_TARGET_ENABLE_AARCH64 -DLLVM_TARGET_ENABLE_ARM -DLLVM_TARGET_ENABLE_POWERPC -DLLVM_TARGET_ENABLE_RISCV -DLLVM_TARGET_ENABLE_X86 -DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser -DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter -DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler -DLLVM_NATIVE_TARGET=LLVMInitializeX86Target -DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo -DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC -ffunction-sections -fdata-sections -ffile-prefix-map=/usr/src=/usr/src -ffile-prefix-map=/usr/obj/aarch64/usr/src/amd64.amd64/nxb=/usr/obj -Wno-format-zero-length -Wdate-time -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-parameter -Wno-error=cast-function-type-mismatch -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -fno-exceptions -fno-rtti -ffile-prefix-map=/usr/src=/usr/src -ffile-prefix-map=/usr/obj/aarch64/usr/src/amd64.amd64/nxb=/usr/obj -std=c++17 -stdlib=libc++ -Wl,--gc-sections -Wl,-zrelro -static -o llvm-ar llvm-ar-driver.o llvm-ar.o /usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/lib/clang/libllvm/libprivatellvm.so -lz -lprivatezstd -lcompiler_rt -lcompiler_rt -lcompiler_rt -lexecinfo -lelf -ltinfow -lcompiler_rt -lcompiler_rt -lcompiler_rt -lpthread -lc -lsys c++: error: no such file or directory: '/usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/lib/clang/libllvm/libprivatellvm.so' *** [llvm-ar] Error code 1 make[5]: stopped making "all" in /usr/src/usr.bin/clang/llvm-ar make[5]: 1 error make[5]: stopped making "all" in /usr/src/usr.bin/clang/llvm-ar make[4]: stopped making "all" in /usr/src/usr.bin/clang --- all_subdir_usr.bin/clang/llvm-nm --- make[4]: stopped making "all" in /usr/src/usr.bin/clang --- all_subdir_usr.bin/clang/clang --- make[4]: stopped making "all" in /usr/src/usr.bin/clang --- all_subdir_usr.bin/clang/clang-scan-deps --- make[4]: stopped making "all" in /usr/src/usr.bin/clang
Diff Detail
Event TimelineComment Actions On the one hand we should be able to just bring along the necessary libraries for LLVM tools in whatever use case we have. On the other hand this is a simple and straightforward change to fix this case, which needs to work so fine with me.
Comment Actions I confirm this change allows me to cross-build arm64 poudriere jails (from 13 to 15) on stable/15/amd64 which were broken otherwise since approx 202509 could you please commit and MFC this? | ||||||||||||||||||||||||||||||||||||||