summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Miller <alex.miller@gmx.de>2022-07-04 19:21:47 +0200
committerSam James <sam@gentoo.org>2022-07-05 00:24:02 +0100
commit54b1cd46b846e631eff7431ca55bdd73806f110b (patch)
treee69ffb5a98ccc6a70f4bb31aba8aaa8b047b3e83 /app-forensics/aflplusplus
parentapp-forensics/aflplusplus: Respect CC and CPPFLAGS when building aflpp_driver (diff)
downloadgentoo-54b1cd46b846e631eff7431ca55bdd73806f110b.tar.gz
gentoo-54b1cd46b846e631eff7431ca55bdd73806f110b.tar.bz2
gentoo-54b1cd46b846e631eff7431ca55bdd73806f110b.zip
app-forensics/aflplusplus: Fix lld detection
Signed-off-by: Alexander Miller <alex.miller@gmx.de> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-forensics/aflplusplus')
-rw-r--r--app-forensics/aflplusplus/aflplusplus-4.01c.ebuild1
-rw-r--r--app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch14
2 files changed, 15 insertions, 0 deletions
diff --git a/app-forensics/aflplusplus/aflplusplus-4.01c.ebuild b/app-forensics/aflplusplus/aflplusplus-4.01c.ebuild
index b304644ff905..18186168e86e 100644
--- a/app-forensics/aflplusplus/aflplusplus-4.01c.ebuild
+++ b/app-forensics/aflplusplus/aflplusplus-4.01c.ebuild
@@ -40,6 +40,7 @@ QA_PREBUILT="usr/share/afl/testcases/others/elf/small_exec.elf"
PATCHES=(
"${FILESDIR}"/${PN}-4.01c-respect-flags.patch
"${FILESDIR}"/${PN}-4.01c-no-ignore-errors-makefile.patch
+ "${FILESDIR}"/${PN}-4.01c-lld-detect.patch
)
llvm_check_deps() {
diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch
new file mode 100644
index 000000000000..cec2c9d17979
--- /dev/null
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch
@@ -0,0 +1,14 @@
+--- a/GNUmakefile.llvm
++++ b/GNUmakefile.llvm
+@@ -218,9 +218,8 @@ endif
+ ifeq "$(LLVM_LTO)" "1"
+ ifneq "$(AFL_CLANG_FLTO)" ""
+ ifeq "$(AFL_REAL_LD)" ""
+- ifneq "$(shell readlink $(LLVM_BINDIR)/ld.lld 2>&1)" ""
+- AFL_REAL_LD = $(LLVM_BINDIR)/ld.lld
+- else
++ AFL_REAL_LD = "$(shell command -v $(LLVM_BINDIR)/ld.lld 2>/dev/null || command -v ld.lld 2>/dev/null)"
++ ifeq "$(AFL_REAL_LD)" ""
+ $(warning ld.lld not found, cannot enable LTO mode)
+ LLVM_LTO = 0
+ endif