Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/, app-forensics/aflplusplus/files/
Date: Mon, 04 Jul 2022 23:24:22
Message-Id: 1656977042.54b1cd46b846e631eff7431ca55bdd73806f110b.sam@gentoo
1 commit: 54b1cd46b846e631eff7431ca55bdd73806f110b
2 Author: Alexander Miller <alex.miller <AT> gmx <DOT> de>
3 AuthorDate: Mon Jul 4 17:21:47 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 4 23:24:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54b1cd46
7
8 app-forensics/aflplusplus: Fix lld detection
9
10 Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 app-forensics/aflplusplus/aflplusplus-4.01c.ebuild | 1 +
14 .../aflplusplus/files/aflplusplus-4.01c-lld-detect.patch | 14 ++++++++++++++
15 2 files changed, 15 insertions(+)
16
17 diff --git a/app-forensics/aflplusplus/aflplusplus-4.01c.ebuild b/app-forensics/aflplusplus/aflplusplus-4.01c.ebuild
18 index b304644ff905..18186168e86e 100644
19 --- a/app-forensics/aflplusplus/aflplusplus-4.01c.ebuild
20 +++ b/app-forensics/aflplusplus/aflplusplus-4.01c.ebuild
21 @@ -40,6 +40,7 @@ QA_PREBUILT="usr/share/afl/testcases/others/elf/small_exec.elf"
22 PATCHES=(
23 "${FILESDIR}"/${PN}-4.01c-respect-flags.patch
24 "${FILESDIR}"/${PN}-4.01c-no-ignore-errors-makefile.patch
25 + "${FILESDIR}"/${PN}-4.01c-lld-detect.patch
26 )
27
28 llvm_check_deps() {
29
30 diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch
31 new file mode 100644
32 index 000000000000..cec2c9d17979
33 --- /dev/null
34 +++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch
35 @@ -0,0 +1,14 @@
36 +--- a/GNUmakefile.llvm
37 ++++ b/GNUmakefile.llvm
38 +@@ -218,9 +218,8 @@ endif
39 + ifeq "$(LLVM_LTO)" "1"
40 + ifneq "$(AFL_CLANG_FLTO)" ""
41 + ifeq "$(AFL_REAL_LD)" ""
42 +- ifneq "$(shell readlink $(LLVM_BINDIR)/ld.lld 2>&1)" ""
43 +- AFL_REAL_LD = $(LLVM_BINDIR)/ld.lld
44 +- else
45 ++ AFL_REAL_LD = "$(shell command -v $(LLVM_BINDIR)/ld.lld 2>/dev/null || command -v ld.lld 2>/dev/null)"
46 ++ ifeq "$(AFL_REAL_LD)" ""
47 + $(warning ld.lld not found, cannot enable LTO mode)
48 + LLVM_LTO = 0
49 + endif