On Tue, 30 Jun 2026 at 16:17, Wolfram Schneider <[email protected]> wrote: > > After running buildworld, I now see stale symlinks: > > ./tools/build/stale-symlink-buildworld.sh > stale symlink detected: lrwxrwxr-x 1 wosch wheel 12 Jun 16 03:36 > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src-dev/amd64.amd64/tmp/usr/bin/c++filt > -> llvm-cxxfilt > stale symlink detected: lrwxrwxr-x 1 wosch wheel 8 Jun 16 03:36 > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src-dev/amd64.amd64/tmp/usr/bin/gcov > -> llvm-cov > stale symlink detected: lrwxrwxr-x 1 wosch wheel 12 Jun 16 03:36 > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src-dev/amd64.amd64/tmp/usr/bin/objdump > -> llvm-objdump > stale symlink detected: lrwxrwxr-x 1 wosch wheel 12 Jun 16 03:36 > /scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src-dev/amd64.amd64/tmp/usr/bin/readelf > -> llvm-readelf > > any idea why this happens?
I still see the stale symlinks after running buildworld... -Wolfram > -Wolfram > > On Sat, 2 May 2026 at 01:34, Ed Maste <[email protected]> wrote: > > > > The branch main has been updated by emaste: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=c4f08d46c7f717cc8c66bf702c006765a5b6b1a9 > > > > commit c4f08d46c7f717cc8c66bf702c006765a5b6b1a9 > > Author: Ed Maste <[email protected]> > > AuthorDate: 2026-03-06 14:46:18 +0000 > > Commit: Ed Maste <[email protected]> > > CommitDate: 2026-05-01 23:33:51 +0000 > > > > llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package > > > > Some of the LLVM binary utilities were included in the Clang package > > (because they did not set an explicit PACKAGE). > > > > Add a new Makefile under clang/toolchain to create the symlinks and man > > links for ar, c++filt, nm, and so on (without the llvm-* prefix) when > > LLVM_BINUTILS is enabled (as it is by default). > > > > PR: 293610 > > Reviewed by: bapt, ivy, brooks > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D55692 > > --- > > Makefile.inc1 | 3 ++- > > packages/toolchain/Makefile | 6 ++++++ > > usr.bin/clang/Makefile | 2 ++ > > usr.bin/clang/llvm-ar/Makefile | 7 ------- > > usr.bin/clang/llvm-cxxfilt/Makefile | 5 ----- > > usr.bin/clang/llvm-nm/Makefile | 6 ------ > > usr.bin/clang/llvm-objcopy/Makefile | 7 ------- > > usr.bin/clang/llvm-readobj/Makefile | 5 ----- > > usr.bin/clang/llvm-size/Makefile | 6 ------ > > usr.bin/clang/llvm-symbolizer/Makefile | 5 ----- > > usr.bin/clang/toolchain/Makefile | 35 > > ++++++++++++++++++++++++++++++++++ > > 11 files changed, 45 insertions(+), 42 deletions(-) > > > > diff --git a/Makefile.inc1 b/Makefile.inc1 > > index 3c93159645fd..b07b5f9c1a65 100644 > > --- a/Makefile.inc1 > > +++ b/Makefile.inc1 > > @@ -3052,7 +3052,8 @@ _clang_libs= lib/clang > > _llvm_binutils= usr.bin/clang/llvm-ar \ > > usr.bin/clang/llvm-nm \ > > usr.bin/clang/llvm-objcopy \ > > - usr.bin/clang/llvm-size > > + usr.bin/clang/llvm-size \ > > + usr.bin/clang/toolchain > > .endif > > .if ${MK_USB} != "no" > > _usb_tools= stand/usb/tools > > diff --git a/packages/toolchain/Makefile b/packages/toolchain/Makefile > > index 344f0d250b79..b47d931c2c10 100644 > > --- a/packages/toolchain/Makefile > > +++ b/packages/toolchain/Makefile > > @@ -1,7 +1,13 @@ > > +.include <src.opts.mk> > > + > > WORLDPACKAGE= toolchain > > SUBPACKAGES= dbg dev man > > COMPAT_PKGS= dev > > > > PKG_SETS= devel > > > > +.if ${MK_LLVM_BINUTILS} != "no" > > +PKG_DEPS.toolchain+= llvm > > +.endif > > + > > .include <bsd.pkg.mk> > > diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile > > index ac92b08a54cb..d86508829533 100644 > > --- a/usr.bin/clang/Makefile > > +++ b/usr.bin/clang/Makefile > > @@ -22,6 +22,8 @@ SUBDIR+= llvm-readobj > > SUBDIR+= llvm-size > > SUBDIR+= llvm-strings > > SUBDIR+= llvm-symbolizer > > +SUBDIR+= .WAIT > > +SUBDIR+= toolchain > > .endif > > > > .if ${MK_CLANG_EXTRAS} != "no" > > diff --git a/usr.bin/clang/llvm-ar/Makefile b/usr.bin/clang/llvm-ar/Makefile > > index ee776a7c0d9e..10cd46bad4dc 100644 > > --- a/usr.bin/clang/llvm-ar/Makefile > > +++ b/usr.bin/clang/llvm-ar/Makefile > > @@ -1,6 +1,5 @@ > > .include <src.opts.mk> > > > > -PACKAGE= toolchain > > PROG_CXX= llvm-ar > > MAN= llvm-ar.1 llvm-ranlib.1 > > > > @@ -10,10 +9,4 @@ SRCS+= llvm-ar.cpp > > > > LINKS+= ${BINDIR}/llvm-ar ${BINDIR}/llvm-ranlib > > > > -.if ${MK_LLVM_BINUTILS} != "no" > > -SYMLINKS+= llvm-ar ${BINDIR}/ar > > -SYMLINKS+= llvm-ranlib ${BINDIR}/ranlib > > -MLINKS+= llvm-ar.1 ar.1 llvm-ar.1 ranlib.1 > > -.endif > > - > > .include "../llvm.prog.mk" > > diff --git a/usr.bin/clang/llvm-cxxfilt/Makefile > > b/usr.bin/clang/llvm-cxxfilt/Makefile > > index 26a5d9e8975d..7d49ccb0a8d0 100644 > > --- a/usr.bin/clang/llvm-cxxfilt/Makefile > > +++ b/usr.bin/clang/llvm-cxxfilt/Makefile > > @@ -22,9 +22,4 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/} > > DPSRCS+= ${TGHDRS} > > CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} > > > > -.if ${MK_LLVM_BINUTILS} != "no" > > -SYMLINKS= llvm-cxxfilt ${BINDIR}/c++filt > > -MLINKS= llvm-cxxfilt.1 c++filt.1 > > -.endif > > - > > .include "../llvm.prog.mk" > > diff --git a/usr.bin/clang/llvm-nm/Makefile b/usr.bin/clang/llvm-nm/Makefile > > index 333513246cb6..68033ce3874f 100644 > > --- a/usr.bin/clang/llvm-nm/Makefile > > +++ b/usr.bin/clang/llvm-nm/Makefile > > @@ -1,6 +1,5 @@ > > .include <src.opts.mk> > > > > -PACKAGE= toolchain > > PROG_CXX= llvm-nm > > > > SRCDIR= llvm/tools/llvm-nm > > @@ -23,9 +22,4 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/} > > DPSRCS+= ${TGHDRS} > > CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} > > > > -.if ${MK_LLVM_BINUTILS} != "no" > > -SYMLINKS+= llvm-nm ${BINDIR}/nm > > -MLINKS+= llvm-nm.1 nm.1 > > -.endif > > - > > .include "../llvm.prog.mk" > > diff --git a/usr.bin/clang/llvm-objcopy/Makefile > > b/usr.bin/clang/llvm-objcopy/Makefile > > index 13bbab97899f..ee9b13b18f13 100644 > > --- a/usr.bin/clang/llvm-objcopy/Makefile > > +++ b/usr.bin/clang/llvm-objcopy/Makefile > > @@ -26,11 +26,4 @@ CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} > > > > LINKS= ${BINDIR}/llvm-objcopy ${BINDIR}/llvm-strip > > > > -.if ${MK_LLVM_BINUTILS} != "no" > > -SYMLINKS+= llvm-objcopy ${BINDIR}/objcopy \ > > - llvm-strip ${BINDIR}/strip > > -MLINKS= llvm-objcopy.1 objcopy.1 \ > > - llvm-objcopy.1 strip.1 > > -.endif > > - > > .include "../llvm.prog.mk" > > diff --git a/usr.bin/clang/llvm-readobj/Makefile > > b/usr.bin/clang/llvm-readobj/Makefile > > index 3f705431e509..b669e4398fc3 100644 > > --- a/usr.bin/clang/llvm-readobj/Makefile > > +++ b/usr.bin/clang/llvm-readobj/Makefile > > @@ -35,9 +35,4 @@ CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} > > > > LINKS+= ${BINDIR}/llvm-readobj ${BINDIR}/llvm-readelf > > > > -.if ${MK_LLVM_BINUTILS} != "no" > > -SYMLINKS+= llvm-readelf ${BINDIR}/readelf > > -MLINKS+= llvm-readelf.1 readelf.1 > > -.endif > > - > > .include "../llvm.prog.mk" > > diff --git a/usr.bin/clang/llvm-size/Makefile > > b/usr.bin/clang/llvm-size/Makefile > > index 1991065b61b2..c1b7c770acfb 100644 > > --- a/usr.bin/clang/llvm-size/Makefile > > +++ b/usr.bin/clang/llvm-size/Makefile > > @@ -1,6 +1,5 @@ > > .include <src.opts.mk> > > > > -PACKAGE= toolchain > > PROG_CXX= llvm-size > > > > SRCDIR= llvm/tools/llvm-size > > @@ -23,9 +22,4 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/} > > DPSRCS+= ${TGHDRS} > > CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} > > > > -.if ${MK_LLVM_BINUTILS} != "no" > > -SYMLINKS+= llvm-size ${BINDIR}/size > > -MLINKS+= llvm-size.1 size.1 > > -.endif > > - > > .include "../llvm.prog.mk" > > diff --git a/usr.bin/clang/llvm-symbolizer/Makefile > > b/usr.bin/clang/llvm-symbolizer/Makefile > > index 1a3a65c774c9..231aeec849c2 100644 > > --- a/usr.bin/clang/llvm-symbolizer/Makefile > > +++ b/usr.bin/clang/llvm-symbolizer/Makefile > > @@ -25,9 +25,4 @@ CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} > > > > LINKS+= ${BINDIR}/llvm-symbolizer ${BINDIR}/llvm-addr2line > > > > -.if ${MK_LLVM_BINUTILS} != "no" > > -SYMLINKS+= llvm-addr2line ${BINDIR}/addr2line > > -MLINKS+= llvm-addr2line.1 addr2line.1 > > -.endif > > - > > .include "../llvm.prog.mk" > > diff --git a/usr.bin/clang/toolchain/Makefile > > b/usr.bin/clang/toolchain/Makefile > > new file mode 100644 > > index 000000000000..1a7db32274e3 > > --- /dev/null > > +++ b/usr.bin/clang/toolchain/Makefile > > @@ -0,0 +1,35 @@ > > +.include <src.opts.mk> > > + > > +.if ${MK_LLVM_BINUTILS} == yes > > +PACKAGE= toolchain > > + > > +SYMLINKS+= llvm-ar ${BINDIR}/ar > > +SYMLINKS+= llvm-ranlib ${BINDIR}/ranlib > > +MLINKS+= llvm-ar.1 ar.1 llvm-ar.1 ranlib.1 > > + > > +SYMLINKS+= llvm-cov ${BINDIR}/gcov > > + > > +SYMLINKS+= llvm-cxxfilt ${BINDIR}/c++filt > > +MLINKS+= llvm-cxxfilt.1 c++filt.1 > > + > > +SYMLINKS+= llvm-nm ${BINDIR}/nm > > +MLINKS+= llvm-nm.1 nm.1 > > + > > +SYMLINKS+= llvm-objcopy ${BINDIR}/objcopy > > +SYMLINKS+= llvm-strip ${BINDIR}/strip > > +MLINKS+= llvm-objcopy.1 objcopy.1 > > +MLINKS+= llvm-objcopy.1 strip.1 > > + > > +SYMLINKS+= llvm-objdump ${BINDIR}/objdump > > + > > +SYMLINKS+= llvm-readelf ${BINDIR}/readelf > > +MLINKS+= llvm-readelf.1 readelf.1 > > + > > +SYMLINKS+= llvm-size ${BINDIR}/size > > +MLINKS+= llvm-size.1 size.1 > > + > > +SYMLINKS+= llvm-addr2line ${BINDIR}/addr2line > > +MLINKS+= llvm-addr2line.1 addr2line.1 > > +.endif > > + > > +.include <bsd.prog.mk> > > > > > -- > Wolfram Schneider <[email protected]> https://wolfram.schneider.org -- Wolfram Schneider <[email protected]> https://wolfram.schneider.org
