From a7fb9ae16c07c2151dd584ca6f8ce346acf7fdac Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Aug 27 2016 17:59:36 +0000 Subject: Modify patch allowing CFLAGS to be appended. --- diff --git a/afl-2.16b-override-cflags.patch b/afl-2.16b-override-cflags.patch deleted file mode 100644 index dbc09c4..0000000 --- a/afl-2.16b-override-cflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ur afl-2.16b.old/Makefile afl-2.16b/Makefile ---- afl-2.16b.old/Makefile 2016-06-24 03:35:35.000000000 +0100 -+++ afl-2.16b/Makefile 2016-06-24 08:37:03.571052772 +0100 -@@ -28,7 +28,7 @@ - SH_PROGS = afl-plot afl-cmin afl-whatsup - - CFLAGS ?= -O3 -funroll-loops --CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \ -+override CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \ - -DAFL_PATH=\"$(HELPER_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\" \ - -DBIN_PATH=\"$(BIN_PATH)\" - -Only in afl-2.16b: Makefile.orig diff --git a/afl-2.33b-extra-cflags.patch b/afl-2.33b-extra-cflags.patch new file mode 100644 index 0000000..58f43df --- /dev/null +++ b/afl-2.33b-extra-cflags.patch @@ -0,0 +1,12 @@ +--- afl-2.33b.old/Makefile 2016-08-07 08:03:02.000000000 +0100 ++++ afl-2.33b/Makefile 2016-08-27 18:57:14.948950093 +0100 +@@ -30,7 +30,8 @@ + CFLAGS ?= -O3 -funroll-loops + CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \ + -DAFL_PATH=\"$(HELPER_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\" \ +- -DBIN_PATH=\"$(BIN_PATH)\" ++ -DBIN_PATH=\"$(BIN_PATH)\" \ ++ $(EXTRA_CFLAGS) + + ifneq "$(filter Linux GNU%,$(shell uname))" "" + LDFLAGS += -ldl diff --git a/american-fuzzy-lop.spec b/american-fuzzy-lop.spec index 06c4d54..9008a22 100644 --- a/american-fuzzy-lop.spec +++ b/american-fuzzy-lop.spec @@ -1,6 +1,6 @@ Name: american-fuzzy-lop Version: 2.33b -Release: 1%{?dist} +Release: 2%{?dist} Summary: Practical, instrumentation-driven fuzzer for binary formats @@ -11,7 +11,7 @@ URL: http://lcamtuf.coredump.cx/afl/ Source0: afl-%{version}.tgz # Allow CFLAGS to be appended. -Patch1: afl-2.16b-override-cflags.patch +Patch1: afl-2.33b-extra-cflags.patch # Upstream includes armv7hl support as some non-integrated 'contrib' # files, so I have not enabled it here. No other arch is supported @@ -61,7 +61,7 @@ This subpackage contains clang and clang++ support for %build %{__make} %{?_smp_mflags} \ - CFLAGS="%{optflags}" \ + EXTRA_CFLAGS="%{optflags}" \ PREFIX=%{_prefix} \ HELPER_PATH=%{afl_helper_path} \ DOC_PATH=%{_pkgdocdir} @@ -102,8 +102,9 @@ This subpackage contains clang and clang++ support for %changelog -* Sat Aug 27 2016 Richard W.M. Jones - 2.33b-1 +* Sat Aug 27 2016 Richard W.M. Jones - 2.33b-2 - New upstream version 2.33b (RHBZ#1350795). +- Modify patch allowing CFLAGS to be appended. * Fri Jun 24 2016 Richard W.M. Jones - 2.16b-1 - New upstream version 2.16b (RHBZ#1336154).