From owner-svn-src-all@freebsd.org Wed Dec 2 21:39:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBEF04A70CB; Wed, 2 Dec 2020 21:39:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CmXSD6J36z3r0y; Wed, 2 Dec 2020 21:39:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C68A463B9; Wed, 2 Dec 2020 21:39:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B2Lduf9082037; Wed, 2 Dec 2020 21:39:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B2LdtOS082029; Wed, 2 Dec 2020 21:39:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202012022139.0B2LdtOS082029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 2 Dec 2020 21:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368285 - in stable: 11/share/man/man5 11/share/mk 11/tools/build/mk 11/tools/build/options 11/usr.bin 11/usr.bin/clang 11/usr.bin/clang/llvm-cxxfilt 12/share/man/man5 12/share/mk 12/to... X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/share/man/man5 11/share/mk 11/tools/build/mk 11/tools/build/options 11/usr.bin 11/usr.bin/clang 11/usr.bin/clang/llvm-cxxfilt 12/share/man/man5 12/share/mk 12/tools/build/mk 12/tools/bui... X-SVN-Commit-Revision: 368285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2020 21:39:57 -0000 Author: dim Date: Wed Dec 2 21:39:54 2020 New Revision: 368285 URL: https://svnweb.freebsd.org/changeset/base/368285 Log: MFC r367304: Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt Since elftoolchain's cxxfilt is rather far behind on features, and we ran into several bugs, add an option to use llvm-cxxfilt as an drop-in replacement. It supports the same options as elftoolchain cxxfilt, though it doesn't have support for old ARM (C++ Annotated Reference Manual, not the CPU) and GNU v2 manglings. But these are irrelevant in 2020. Note: as we already compile the required libraries as part of libllvm, this will not add any significant build time either. PR: 250702 Reviewed by: emaste, yuri Differential Revision: https://reviews.freebsd.org/D27071 MFC r367712: Ensure make delete-old does not unlink the llvm-cxxfilt and its manpage, after r367304 and r367324, when WITH_LLVM_CXXFILT is enabled. Noticed by: "Herbert J. Skuhra" Added: stable/12/tools/build/options/WITHOUT_LLVM_CXXFILT - copied unchanged from r367304, head/tools/build/options/WITHOUT_LLVM_CXXFILT stable/12/tools/build/options/WITH_LLVM_CXXFILT - copied unchanged from r367304, head/tools/build/options/WITH_LLVM_CXXFILT Modified: stable/12/share/man/man5/src.conf.5 stable/12/share/mk/src.opts.mk stable/12/tools/build/mk/OptionalObsoleteFiles.inc stable/12/usr.bin/Makefile stable/12/usr.bin/clang/Makefile stable/12/usr.bin/clang/llvm-cxxfilt/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/tools/build/options/WITHOUT_LLVM_CXXFILT - copied unchanged from r367304, head/tools/build/options/WITHOUT_LLVM_CXXFILT stable/11/tools/build/options/WITH_LLVM_CXXFILT - copied unchanged from r367304, head/tools/build/options/WITH_LLVM_CXXFILT Modified: stable/11/share/man/man5/src.conf.5 stable/11/share/mk/src.opts.mk stable/11/tools/build/mk/OptionalObsoleteFiles.inc stable/11/usr.bin/Makefile stable/11/usr.bin/clang/Makefile stable/11/usr.bin/clang/llvm-cxxfilt/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/share/man/man5/src.conf.5 ============================================================================== --- stable/12/share/man/man5/src.conf.5 Wed Dec 2 21:01:52 2020 (r368284) +++ stable/12/share/man/man5/src.conf.5 Wed Dec 2 21:39:54 2020 (r368285) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd September 28, 2020 +.Dd December 2, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -464,6 +464,8 @@ When set, it enforces these options: .It .Va WITHOUT_KERBEROS .It +.Va WITHOUT_KERBEROS_SUPPORT +.It .Va WITHOUT_LDNS .It .Va WITHOUT_LDNS_UTILS @@ -701,6 +703,12 @@ This includes the device tree compiler (dtc) and libfd Set to not build .Xr file 1 and related programs. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_SVNLITE +.El .It Va WITHOUT_FINGER Set to not build or install .Xr finger 1 @@ -1090,6 +1098,8 @@ tool. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. +.It Va WITH_LLVM_CXXFILT +Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt. .It Va WITHOUT_LLVM_LIBUNWIND Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp @@ -1243,8 +1253,8 @@ Enable building with support for verification based on certificates obtained from UEFI. .Pp .It Va WITH_LOADER_FIREWIRE -Enable firewire support in /boot/loader on x86. This option is a nop -on all other platforms. +Enable firewire support in /boot/loader on x86. +This option is a nop on all other platforms. .It Va WITH_LOADER_FORCE_LE Set to force the powerpc boot loader to launch the kernel in little endian mode. @@ -1531,7 +1541,6 @@ This is a default setting on arm/arm, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_NVME Set to build nvme related tools and kernel modules. - .Pp This is a default setting on amd64/amd64, i386/i386 and powerpc/powerpc64. @@ -1566,6 +1575,8 @@ When set, it enforces these options: .Va WITHOUT_DMAGENT .It .Va WITHOUT_KERBEROS +.It +.Va WITHOUT_KERBEROS_SUPPORT .It .Va WITHOUT_LDNS .It Modified: stable/12/share/mk/src.opts.mk ============================================================================== --- stable/12/share/mk/src.opts.mk Wed Dec 2 21:01:52 2020 (r368284) +++ stable/12/share/mk/src.opts.mk Wed Dec 2 21:39:54 2020 (r368285) @@ -206,6 +206,7 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ LIBSOFT \ LLVM_ASSERTIONS \ + LLVM_CXXFILT \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ LOADER_VERIEXEC_PASS_MANIFEST \ Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Dec 2 21:01:52 2020 (r368284) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Dec 2 21:39:54 2020 (r368285) @@ -1746,7 +1746,6 @@ OLD_FILES+=usr/bin/lli OLD_FILES+=usr/bin/llvm-as OLD_FILES+=usr/bin/llvm-bcanalyzer OLD_FILES+=usr/bin/llvm-cxxdump -OLD_FILES+=usr/bin/llvm-cxxfilt OLD_FILES+=usr/bin/llvm-diff OLD_FILES+=usr/bin/llvm-dis OLD_FILES+=usr/bin/llvm-dwarfdump @@ -1770,7 +1769,6 @@ OLD_FILES+=usr/share/man/man1/llc.1.gz OLD_FILES+=usr/share/man/man1/lli.1.gz OLD_FILES+=usr/share/man/man1/llvm-as.1.gz OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz -OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1 @@ -1785,6 +1783,11 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz .if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no OLD_FILES+=usr/bin/clang-format +.endif + +.if ${MK_CLANG_EXTRAS} == no && ${MK_LLVM_CXXFILT} == no +OLD_FILES+=usr/bin/llvm-cxxfilt +OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz .endif .if ${MK_CPP} == no Copied: stable/12/tools/build/options/WITHOUT_LLVM_CXXFILT (from r367304, head/tools/build/options/WITHOUT_LLVM_CXXFILT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tools/build/options/WITHOUT_LLVM_CXXFILT Wed Dec 2 21:39:54 2020 (r368285, copy of r367304, 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. Copied: stable/12/tools/build/options/WITH_LLVM_CXXFILT (from r367304, head/tools/build/options/WITH_LLVM_CXXFILT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tools/build/options/WITH_LLVM_CXXFILT Wed Dec 2 21:39:54 2020 (r368285, copy of r367304, 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. Modified: stable/12/usr.bin/Makefile ============================================================================== --- stable/12/usr.bin/Makefile Wed Dec 2 21:01:52 2020 (r368284) +++ stable/12/usr.bin/Makefile Wed Dec 2 21:39:54 2020 (r368285) @@ -262,7 +262,9 @@ SUBDIR.${MK_TOOLCHAIN}+= ar 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 # ARM64TODO gprof does not build Modified: stable/12/usr.bin/clang/Makefile ============================================================================== --- stable/12/usr.bin/clang/Makefile Wed Dec 2 21:01:52 2020 (r368284) +++ stable/12/usr.bin/clang/Makefile Wed Dec 2 21:39:54 2020 (r368285) @@ -16,6 +16,10 @@ SUBDIR+= llvm-nm 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+= lli SUBDIR+= llvm-as SUBDIR+= llvm-bcanalyzer SUBDIR+= llvm-cxxdump -SUBDIR+= llvm-cxxfilt SUBDIR+= llvm-diff SUBDIR+= llvm-dis SUBDIR+= llvm-dwarfdump Modified: stable/12/usr.bin/clang/llvm-cxxfilt/Makefile ============================================================================== --- stable/12/usr.bin/clang/llvm-cxxfilt/Makefile Wed Dec 2 21:01:52 2020 (r368284) +++ stable/12/usr.bin/clang/llvm-cxxfilt/Makefile Wed Dec 2 21:39:54 2020 (r368285) @@ -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"