Re: git: 1b85b68da0b2 - main - llvm-readobj: Attach to buildsystem

From: Shawn Webb <shawn.webb_at_hardenedbsd.org>
Date: Fri, 15 Oct 2021 13:34:19 UTC
On Thu, Oct 14, 2021 at 04:19:38PM +0000, Alex Richardson wrote:
> The branch main has been updated by arichardson:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=1b85b68da0b2de80e0e3aefb1ade226bcf3951cb
> 
> commit 1b85b68da0b2de80e0e3aefb1ade226bcf3951cb
> Author:     Cameron Katri <me@cameronkatri.com>
> AuthorDate: 2021-10-14 16:00:27 +0000
> Commit:     Alex Richardson <arichardson@FreeBSD.org>
> CommitDate: 2021-10-14 16:18:05 +0000
> 
>     llvm-readobj: Attach to buildsystem
>     
>     Also install it as readelf when MK_LLVM_BINUTILS is set.
>     
>     Reviewed By:    dim, arichardson
>     Differential Revision: https://reviews.freebsd.org/D32058
> ---
>  lib/clang/libllvm/Makefile                |  21 +-
>  tools/build/mk/OptionalObsoleteFiles.inc  |   4 +
>  usr.bin/clang/Makefile                    |   1 +
>  usr.bin/clang/llvm-readobj/Makefile       |  31 +++
>  usr.bin/clang/llvm-readobj/llvm-readelf.1 | 272 ++++++++++++++++++++
>  usr.bin/clang/llvm-readobj/llvm-readobj.1 | 403 ++++++++++++++++++++++++++++++
>  6 files changed, 724 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile
> index 7eaedf65dcb3..cb9ab974abc5 100644
> --- a/lib/clang/libllvm/Makefile
> +++ b/lib/clang/libllvm/Makefile
> @@ -148,9 +148,13 @@ SRCS_MIN+=	Analysis/VectorUtils.cpp
>  SRCS_MIN+=	AsmParser/LLLexer.cpp
>  SRCS_MIN+=	AsmParser/LLParser.cpp
>  SRCS_MIN+=	AsmParser/Parser.cpp
> +SRCS_MIN+=	BinaryFormat/AMDGPUMetadataVerifier.cpp
>  SRCS_MIN+=	BinaryFormat/Dwarf.cpp
>  SRCS_MIN+=	BinaryFormat/Magic.cpp
>  SRCS_MIN+=	BinaryFormat/MachO.cpp
> +SRCS_MIN+=	BinaryFormat/MsgPackDocument.cpp
> +SRCS_MIN+=	BinaryFormat/MsgPackDocumentYAML.cpp
> +SRCS_MIN+=	BinaryFormat/MsgPackReader.cpp

Hey Alex,

You'll also want to add BinaryFormat/MsgPackWriter.cpp. Adding that
file fixes the build for HardenedBSD, since we use LTO, CFI, and
SafeStack in base.

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc