llvm: Don't install /usr/bin/{gcov,objdump} twice

Commit c4f08d46c7 moved the symlinks for the LLVM binutils from LLVM
itself to the toolchain (usr.bin/clang/toolchain), but did not remove
the links for /usr/bin/gcov and /usr/bin/objdump from the llvm version,
meaning we installed them twice, once in the clang package and once in
the toolchain package.

Remove the links from the llvm version and move the MLINKs to toolchain,
which is where the other MLINKs dwell.

While here, fix toolchain to use the correct build option for llvm-cov,
MK_LLVM_COV.

Fixes: c4f08d46c7 ("llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package")
Reported by:	jrm
Reviewed by:	jrm, dim, emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D56788
This commit is contained in:
Lexi Winter
2026-05-04 14:49:20 +01:00
parent 8acc4c16c6
commit 045a9ef829
4 changed files with 5 additions and 5 deletions
+1
View File
@@ -65,6 +65,7 @@ SUBDIR+= lldb-server
.if ${MK_LLVM_COV} != "no"
SUBDIR+= llvm-cov
SUBDIR+= llvm-profdata
SUBDIR_DEPEND_toolchain= llvm-cov
.endif
.endif # TOOLS_PREFIX
-2
View File
@@ -1,8 +1,6 @@
.include <src.opts.mk>
PROG_CXX= llvm-cov
SYMLINKS= llvm-cov ${BINDIR}/gcov
MLINKS= llvm-cov.1 gcov.1
SRCDIR= llvm/tools/llvm-cov
SRCS+= CodeCoverage.cpp
-3
View File
@@ -29,7 +29,4 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}
SYMLINKS= llvm-objdump ${BINDIR}/objdump
MLINKS= llvm-objdump.1 objdump.1
.include "../llvm.prog.mk"
+4
View File
@@ -7,7 +7,10 @@ SYMLINKS+= llvm-ar ${BINDIR}/ar
SYMLINKS+= llvm-ranlib ${BINDIR}/ranlib
MLINKS+= llvm-ar.1 ar.1 llvm-ar.1 ranlib.1
.if ${MK_LLVM_COV} != "no"
SYMLINKS+= llvm-cov ${BINDIR}/gcov
MLINKS= llvm-cov.1 gcov.1
.endif
SYMLINKS+= llvm-cxxfilt ${BINDIR}/c++filt
MLINKS+= llvm-cxxfilt.1 c++filt.1
@@ -21,6 +24,7 @@ MLINKS+= llvm-objcopy.1 objcopy.1
MLINKS+= llvm-objcopy.1 strip.1
SYMLINKS+= llvm-objdump ${BINDIR}/objdump
MLINKS= llvm-objdump.1 objdump.1
SYMLINKS+= llvm-readelf ${BINDIR}/readelf
MLINKS+= llvm-readelf.1 readelf.1