toolchains/llvm-project/build-brintos.sh builds only clang lld opt llvm-config (its ninja line), but the kernel build rig requires llvm-objcopy in build/bin — distros/common/linux-6.12/Makefile:80 (LLVMOBJCOPY := $(PINBIN)/llvm-objcopy), passed as OBJCOPY= at line 112. A fresh-clone kernel build therefore dies at the vmlinux_o stage:
OBJCOPY modules.builtin.modinfo
/bin/sh: .../toolchains/llvm-project/build/bin/llvm-objcopy: No such file or directory
make[5]: *** [scripts/Makefile.vmlinux_o:76: modules.builtin.modinfo] Error 127
A plain make llvm never builds llvm-objcopy, so this is not a build-tree-reuse artifact; Kbuild with LLVM=1 also expects llvm-objdump/llvm-strip/llvm-readelf.
Reproduction
- Fresh super-repo at
ea2c034(llvm-project pin31e14b7). make toolchainmake kernel->Error 127onllvm-objcopyat theOBJCOPY modules.builtin.modinfostep.
Environment: super-repo ea2c034, llvm-project 31e14b7, Ubuntu 20.04.6 / gcc 9.
Proposed fix
Branch: brintos.io/brintos/llvm-project/tree/fix/build-brintos-binutils (commit e0a86e73) — the reviewable/mergeable fix (forge PRs are disabled, so the branch is the review surface).
For quick review, the whole change is one hunk:
--- a/build-brintos.sh
+++ b/build-brintos.sh
@@ -44,8 +44,13 @@
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
-echo "brintOS LLVM: building clang lld opt llvm-config (+ libLLVM dylib)"
-ninja -C "$BUILD_DIR" ${JOBS:+-j "$JOBS"} clang lld opt llvm-config
+echo "brintOS LLVM: building clang lld opt llvm-config + binutils (+ libLLVM dylib)"
+# llvm-objcopy/objdump/strip/readelf are required by the kernel rig, which
+# passes them as OBJCOPY=/OBJDUMP=/STRIP=/READELF= (LLVM=1 build); without them
+# `make kernel` dies at the vmlinux_o stage with Error 127 (llvm-objcopy: No
+# such file or directory).
+ninja -C "$BUILD_DIR" ${JOBS:+-j "$JOBS"} clang lld opt llvm-config \
+ llvm-objcopy llvm-objdump llvm-strip llvm-readelf
Verified: building those extra targets against the existing build tree let make kernel proceed past vmlinux_o to a fully linked vmlinux.wasm (10.9 MB).
Proposed fix targets brintos/llvm-project only — no distro submodule pins moved. All distros share one lineage, so pin bumps are coordinated on merge, not per-engineer.
↳ Migrated from brintos/llvm-project-archived#1 — originally opened by @sasha on 2026-07-04T20:46:50.535Z. Repo re-created to store git objects compressed (see brintos/git-edge#1).