Index: head/share/man/man5/src.conf.5 =================================================================== --- head/share/man/man5/src.conf.5 +++ head/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd September 15, 2020 +.Dd November 3, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -919,6 +919,8 @@ Set to not build the .Xr llvm-cov 1 tool. +.It Va WITH_LLVM_CXXFILT +Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt. .It Va WITHOUT_LLVM_TARGET_AARCH64 Set to not build LLVM target support for AArch64. The Index: head/share/mk/src.opts.mk =================================================================== --- head/share/mk/src.opts.mk +++ head/share/mk/src.opts.mk @@ -210,6 +210,7 @@ GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ + LLVM_CXXFILT \ LOADER_FIREWIRE \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ Index: head/tools/build/options/WITHOUT_LLVM_CXXFILT =================================================================== --- head/tools/build/options/WITHOUT_LLVM_CXXFILT +++ head/tools/build/options/WITHOUT_LLVM_CXXFILT @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt. Index: head/tools/build/options/WITH_LLVM_CXXFILT =================================================================== --- head/tools/build/options/WITH_LLVM_CXXFILT +++ head/tools/build/options/WITH_LLVM_CXXFILT @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt. Index: head/usr.bin/Makefile =================================================================== --- head/usr.bin/Makefile +++ head/usr.bin/Makefile @@ -260,7 +260,9 @@ SUBDIR.${MK_TOOLCHAIN}+= c89 SUBDIR.${MK_TOOLCHAIN}+= c99 SUBDIR.${MK_TOOLCHAIN}+= ctags +.if ${MK_LLVM_CXXFILT} == "no" SUBDIR.${MK_TOOLCHAIN}+= cxxfilt +.endif SUBDIR.${MK_TOOLCHAIN}+= objcopy SUBDIR.${MK_TOOLCHAIN}+= file2c SUBDIR.${MK_TOOLCHAIN}+= gprof Index: head/usr.bin/clang/Makefile =================================================================== --- head/usr.bin/clang/Makefile +++ head/usr.bin/clang/Makefile @@ -16,6 +16,10 @@ SUBDIR+= llvm-objdump SUBDIR+= llvm-symbolizer +.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLVM_CXXFILT} != "no" +SUBDIR+= llvm-cxxfilt +.endif + .if ${MK_CLANG_EXTRAS} != "no" SUBDIR+= bugpoint SUBDIR+= llc @@ -23,7 +27,6 @@ SUBDIR+= llvm-as SUBDIR+= llvm-bcanalyzer SUBDIR+= llvm-cxxdump -SUBDIR+= llvm-cxxfilt SUBDIR+= llvm-diff SUBDIR+= llvm-dis SUBDIR+= llvm-dwarfdump Index: head/usr.bin/clang/llvm-cxxfilt/Makefile =================================================================== --- head/usr.bin/clang/llvm-cxxfilt/Makefile +++ head/usr.bin/clang/llvm-cxxfilt/Makefile @@ -1,8 +1,15 @@ # $FreeBSD$ +.include + PROG_CXX= llvm-cxxfilt SRCDIR= llvm/tools/llvm-cxxfilt SRCS+= llvm-cxxfilt.cpp + +.if ${MK_LLVM_CXXFILT} != "no" +LINKS= ${BINDIR}/llvm-cxxfilt ${BINDIR}/c++filt +MLINKS= llvm-cxxfilt.1 c++filt.1 +.endif .include "../llvm.prog.mk"