public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/
Date: Mon,  4 Jul 2022 23:24:15 +0000 (UTC)	[thread overview]
Message-ID: <1656977041.6c36e7b2994f088b837e6c6bbafba573ecd9ff50.sam@gentoo> (raw)

commit:     6c36e7b2994f088b837e6c6bbafba573ecd9ff50
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Mon Jul  4 16:56:28 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul  4 23:24:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c36e7b2

app-forensics/aflplusplus: Disable LTO for runtime

Runtime files get installed as object files or static archives and
shouldn't contain IR. Otherwise, gcc/clang mismatches can cause failures.

Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/aflplusplus-4.01c-respect-flags.patch           | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
index e4d56c25095e..ebe638f1a86c 100644
--- a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
@@ -1,6 +1,7 @@
 * Respect CFLAGS everywhere when building.
 * Ignore build flags then when testing the CC wrappers (could contain
   incompatible flags).
+* Disable LTO for runtime objects, these shouldn't contain IR.
 
 --- a/GNUmakefile
 +++ b/GNUmakefile
@@ -29,17 +30,17 @@
  
  ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
 -	$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
-+	$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -c $< -o $@
++	$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -fno-lto -c $< -o $@
  
  ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
  	@printf "[*] Building 32-bit variant of the runtime (-m32)... "
 -	@$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
  
  ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
  	@printf "[*] Building 64-bit variant of the runtime (-m64)... "
 -	@$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
  
  ./afl-gcc-pass.so: instrumentation/afl-gcc-pass.so.cc | test_deps
 -	$(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@
@@ -62,17 +63,17 @@
  
  ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
 -	$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
-+	$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -c $< -o $@
++	$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -fno-lto -c $< -o $@
  
  ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
  	@printf "[*] Building 32-bit variant of the runtime (-m32)... "
 -	@$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
  
  ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
  	@printf "[*] Building 64-bit variant of the runtime (-m64)... "
 -	@$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
  
  .PHONY: test_build
  test_build: $(PROGS)
@@ -136,7 +137,7 @@
  
 -CFLAGS := -O3 -funroll-loops -g -fPIC
 +CFLAGS ?= -O3 -funroll-loops -g
-+CFLAGS += -fPIC
++CFLAGS += -fPIC -fno-lto
  
  all:	libAFLDriver.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so
  


             reply	other threads:[~2022-07-04 23:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 23:24 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-21 19:29 [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/ Sam James
2022-07-04 23:24 Sam James
2022-07-04 23:24 Sam James
2022-07-04 23:24 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1656977041.6c36e7b2994f088b837e6c6bbafba573ecd9ff50.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox