diff options
-rw-r--r-- | app-forensics/aflplusplus/aflplusplus-4.01c.ebuild | 1 | ||||
-rw-r--r-- | app-forensics/aflplusplus/files/aflplusplus-4.01c-lld-detect.patch | 14 |
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 |