From owner-svn-src-all@freebsd.org Tue Nov 3 19:57:30 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 79E0D462823; Tue, 3 Nov 2020 19:57:30 +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 4CQgYQ2g8xz4MvB; Tue, 3 Nov 2020 19:57:30 +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 3FEBD201A8; Tue, 3 Nov 2020 19:57:30 +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 0A3JvUSJ038319; Tue, 3 Nov 2020 19:57:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A3JvSJ4038311; Tue, 3 Nov 2020 19:57:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202011031957.0A3JvSJ4038311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Nov 2020 19:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367304 - in head: share/man/man5 share/mk tools/build/options usr.bin usr.bin/clang usr.bin/clang/llvm-cxxfilt X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: share/man/man5 share/mk tools/build/options usr.bin usr.bin/clang usr.bin/clang/llvm-cxxfilt X-SVN-Commit-Revision: 367304 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.33 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: Tue, 03 Nov 2020 19:57:30 -0000 Author: dim Date: Tue Nov 3 19:57:28 2020 New Revision: 367304 URL: https://svnweb.freebsd.org/changeset/base/367304 Log: 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 after: 2 weeks Added: head/tools/build/options/WITHOUT_LLVM_CXXFILT (contents, props changed) head/tools/build/options/WITH_LLVM_CXXFILT (contents, props changed) Modified: head/share/man/man5/src.conf.5 head/share/mk/src.opts.mk head/usr.bin/Makefile head/usr.bin/clang/Makefile head/usr.bin/clang/llvm-cxxfilt/Makefile Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Nov 3 19:50:42 2020 (r367303) +++ head/share/man/man5/src.conf.5 Tue Nov 3 19:57:28 2020 (r367304) @@ -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 disable debugging assertions in LLVM. 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 Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Nov 3 19:50:42 2020 (r367303) +++ head/share/mk/src.opts.mk Tue Nov 3 19:57:28 2020 (r367304) @@ -210,6 +210,7 @@ __DEFAULT_NO_OPTIONS = \ GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ + LLVM_CXXFILT \ LOADER_FIREWIRE \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ Added: head/tools/build/options/WITHOUT_LLVM_CXXFILT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LLVM_CXXFILT Tue Nov 3 19:57:28 2020 (r367304) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt. Added: head/tools/build/options/WITH_LLVM_CXXFILT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LLVM_CXXFILT Tue Nov 3 19:57:28 2020 (r367304) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt. Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Nov 3 19:50:42 2020 (r367303) +++ head/usr.bin/Makefile Tue Nov 3 19:57:28 2020 (r367304) @@ -260,7 +260,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 SUBDIR.${MK_TOOLCHAIN}+= gprof Modified: head/usr.bin/clang/Makefile ============================================================================== --- head/usr.bin/clang/Makefile Tue Nov 3 19:50:42 2020 (r367303) +++ head/usr.bin/clang/Makefile Tue Nov 3 19:57:28 2020 (r367304) @@ -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: head/usr.bin/clang/llvm-cxxfilt/Makefile ============================================================================== --- head/usr.bin/clang/llvm-cxxfilt/Makefile Tue Nov 3 19:50:42 2020 (r367303) +++ head/usr.bin/clang/llvm-cxxfilt/Makefile Tue Nov 3 19:57:28 2020 (r367304) @@ -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"