Download raw body.
Switch octeon to LLD
tech@,
I've tried to switch octeon in -current to LLD as simple as:
Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.own.mk,v
retrieving revision 1.217
diff -u -p -r1.217 bsd.own.mk
--- share/mk/bsd.own.mk 20 Aug 2026 21:23:47 -0000 1.217
+++ share/mk/bsd.own.mk 19 Oct 2026 10:52:15 -0000
@@ -17,7 +17,7 @@ YP?= yes
CLANG_ARCH=aarch64 amd64 arm i386 mips64 mips64el powerpc powerpc64 riscv64 sparc64
GCC4_ARCH=alpha hppa m88k sh
-LLD_ARCH=aarch64 amd64 arm i386 powerpc powerpc64 riscv64 sparc64
+LLD_ARCH=aarch64 amd64 arm i386 mips64 powerpc powerpc64 riscv64 sparc64
LLDB_ARCH=aarch64 amd64
# Can't use ${CLANG_ARCH} ${GCC4_ARCH} below because of sparc64
and it works well to build whole base and kernel.
No additional work is required for LLD at least for this.
The only things which I needed is a bit tricky first build sequence:
1. Rebuild clang / lld as system compiler
cd /usr/src/share/mk
doas make install
cd /usr/src/gnu/usr.bin/clang
doas make clean
doas -u build make CC=clang CXX=clang++ LD=ld.lld -jXX
doas make install
2. Build and install temporary libraries
cd /usr/src/lib
doas make clean
doas -u build make HOSTLDFLAGS=-static -jXX
doas make NOMAN=1 install
doas /sbin/ldconfig -R
3. Rebuild the system itself
cd /usr/src
doas make build -jXX
doas make install
But, here the ports collection.
I have no means to run bulk build for all of them and I'm looking for anyone
who willing to help me to run it on octeons. If anyone can share access to
large octeon machine, I can do it myself.
Obviusly I'm volunteering to fix all discovered LLVM/LLD issues during that bulk.
To switch ports we need something like that:
Index: infrastructure/mk/arch-defines.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/arch-defines.mk,v
retrieving revision 1.120
diff -u -p -r1.120 arch-defines.mk
--- infrastructure/mk/arch-defines.mk 23 Sep 2026 13:45:41 -0000 1.120
+++ infrastructure/mk/arch-defines.mk 19 Oct 2026 10:55:08 -0000
@@ -34,7 +34,7 @@ OCAML_NATIVE_DYNLINK_ARCHS = aarch64 amd
# arches where the base compiler is clang
CLANG_ARCHS = aarch64 amd64 arm i386 mips64 mips64el powerpc powerpc64 riscv64 sparc64
# arches using LLVM's linker (ld.lld); others use binutils' ld.bfd
-LLD_ARCHS = aarch64 amd64 arm i386 powerpc powerpc64 riscv64 sparc64
+LLD_ARCHS = aarch64 amd64 arm i386 mips64 powerpc powerpc64 riscv64 sparc64
# arches where ports devel/llvm builds - populates llvm ONLY_FOR_ARCHS
# as well as available for PROPERTIES checks.
Thoughts?
--
wbr, Kirill
Switch octeon to LLD