The package rpms/american-fuzzy-lop.git has added or updated architecture specific content
in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/american-fuzzy-lop.git/commit/?id....
Change:
+%ifarch %{ix86} x86_64
Thanks.
Full change:
============
commit 7dee587d7a6c783b75df10a211c4e1f4b7b50a44
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Thu Mar 31 17:35:09 2022 +0100
Add upstream patches to commit 285a5cb3.
diff --git a/.gitignore b/.gitignore
index 3da4487..bf54518 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/v2.*b.tar.gz
/3.*c.tar.gz
/4.00c.tar.gz
+/4.00c-git285a5cb3.tar.gz
diff --git a/0001-GNUmakefile.llvm-Avoid-creating-circular-links.patch
b/0001-GNUmakefile.llvm-Avoid-creating-circular-links.patch
new file mode 100644
index 0000000..5c50575
--- /dev/null
+++ b/0001-GNUmakefile.llvm-Avoid-creating-circular-links.patch
@@ -0,0 +1,34 @@
+From 07d5582dca0c9c05e5495519640685180d7dc85f Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones(a)redhat.com>
+Date: Thu, 31 Mar 2022 18:18:16 +0100
+Subject: [PATCH] GNUmakefile.llvm: Avoid creating circular links
+
+Building into a DESTDIR gives circular links such as:
+
+lrwxrwxrwx. 1 rjones rjones 17 Mar 31 18:09
/home/rjones/rpmbuild/BUILDROOT/american-fuzzy-lop-4.00c-3.git285a5cb3.fc37.x86_64/usr/lib64/afl/afl-compiler-rt.o
-> afl-compiler-rt.o
+---
+ GNUmakefile.llvm | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/GNUmakefile.llvm b/GNUmakefile.llvm
+index f91ff0d1..685964b7 100644
+--- a/GNUmakefile.llvm
++++ b/GNUmakefile.llvm
+@@ -474,11 +474,11 @@ install: all
+ @install -d -m 755 $${DESTDIR}$(BIN_PATH) $${DESTDIR}$(HELPER_PATH)
$${DESTDIR}$(DOC_PATH) $${DESTDIR}$(MISC_PATH)
+ @if [ -f ./afl-cc ]; then set -e; install -m 755 ./afl-cc $${DESTDIR}$(BIN_PATH); ln
-sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-c++; fi
+ @rm -f $${DESTDIR}$(HELPER_PATH)/afl-llvm-rt*.o
$${DESTDIR}$(HELPER_PATH)/afl-gcc-rt*.o
+- @if [ -f ./afl-compiler-rt.o ]; then set -e; install -m 755 ./afl-compiler-rt.o
$${DESTDIR}$(HELPER_PATH); ln -sf afl-compiler-rt.o
$${DESTDIR}$(HELPER_PATH)/afl-compiler-rt.o ;fi
++ @if [ -f ./afl-compiler-rt.o ]; then set -e; install -m 755 ./afl-compiler-rt.o
$${DESTDIR}$(HELPER_PATH); fi
+ @if [ -f ./afl-lto ]; then set -e; ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-lto; ln -sf
afl-cc $${DESTDIR}$(BIN_PATH)/afl-lto++; ln -sf afl-cc
$${DESTDIR}$(BIN_PATH)/afl-clang-lto; ln -sf afl-cc
$${DESTDIR}$(BIN_PATH)/afl-clang-lto++; install -m 755 ./afl-llvm-rt-lto*.o
./afl-llvm-lto-instrumentlist.so $${DESTDIR}$(HELPER_PATH); fi
+ @if [ -f ./afl-ld-lto ]; then set -e; install -m 755 ./afl-ld-lto
$${DESTDIR}$(BIN_PATH); fi
+- @if [ -f ./afl-compiler-rt-32.o ]; then set -e; install -m 755 ./afl-compiler-rt-32.o
$${DESTDIR}$(HELPER_PATH); ln -sf afl-compiler-rt-32.o
$${DESTDIR}$(HELPER_PATH)/afl-compiler-rt-32.o ;fi
+- @if [ -f ./afl-compiler-rt-64.o ]; then set -e; install -m 755 ./afl-compiler-rt-64.o
$${DESTDIR}$(HELPER_PATH); ln -sf afl-compiler-rt-64.o
$${DESTDIR}$(HELPER_PATH)/afl-compiler-rt-64.o ; fi
++ @if [ -f ./afl-compiler-rt-32.o ]; then set -e; install -m 755 ./afl-compiler-rt-32.o
$${DESTDIR}$(HELPER_PATH); fi
++ @if [ -f ./afl-compiler-rt-64.o ]; then set -e; install -m 755 ./afl-compiler-rt-64.o
$${DESTDIR}$(HELPER_PATH); fi
+ @if [ -f ./compare-transform-pass.so ]; then set -e; install -m 755 ./*.so
$${DESTDIR}$(HELPER_PATH); fi
+ @if [ -f ./compare-transform-pass.so ]; then set -e; ln -sf afl-cc
$${DESTDIR}$(BIN_PATH)/afl-clang-fast ; ln -sf ./afl-c++
$${DESTDIR}$(BIN_PATH)/afl-clang-fast++ ; ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-clang ;
ln -sf ./afl-c++ $${DESTDIR}$(BIN_PATH)/afl-clang++ ; fi
+ @if [ -f ./SanitizerCoverageLTO.so ]; then set -e; ln -sf afl-cc
$${DESTDIR}$(BIN_PATH)/afl-clang-lto ; ln -sf ./afl-c++
$${DESTDIR}$(BIN_PATH)/afl-clang-lto++ ; fi
+--
+2.35.1
+
diff --git a/american-fuzzy-lop.spec b/american-fuzzy-lop.spec
index 5c5c62a..9e1122b 100644
--- a/american-fuzzy-lop.spec
+++ b/american-fuzzy-lop.spec
@@ -4,18 +4,25 @@
Name: american-fuzzy-lop
Version: 4.00c
-Release: 3%{?dist}
+Release: 3.git285a5cb3%{?dist}
Summary: Practical, instrumentation-driven fuzzer for binary formats
License: ASL 2.0
URL:
https://aflplus.plus/
-Source0:
https://github.com/AFLplusplus/AFLplusplus/archive/%{version}.tar.gz
+#Source0:
https://github.com/AFLplusplus/AFLplusplus/archive/%{version}.tar.gz
+# 4.00c is broken with clang 14, fixed by upstream patches. This
+# tarball contains everything upstream to 285a5cb3.
+Source0: 4.00c-git285a5cb3.tar.gz
# For running the tests:
Source1: hello.c
+# Avoid creating circular links.
+#
https://github.com/AFLplusplus/AFLplusplus/pull/1373
+Patch1: 0001-GNUmakefile.llvm-Avoid-creating-circular-links.patch
+
# Only specific architectures are supported by upstream.
# On non-x86 only afl-clang-fast* are built.
ExclusiveArch: %{ix86} x86_64 s390x
@@ -66,7 +73,7 @@ This subpackage contains clang and clang++ support for
%prep
-%setup -q -n AFLplusplus-%{version}
+%autosetup -p1 -n AFLplusplus-%{version}
%build
@@ -220,13 +227,6 @@ test -n '%{clang_major}'
%endif
%{afl_helper_path}/afl-llvm-pass.so
-%if 0%{?__isa_bits} == 32
-%{afl_helper_path}/afl-llvm-rt-32.o
-%else
-%{afl_helper_path}/afl-llvm-rt-64.o
-%endif
-%{afl_helper_path}/afl-llvm-rt.o
-
%ifarch %{ix86} x86_64
%if 0%{?__isa_bits} == 32
%{afl_helper_path}/afl-llvm-rt-lto-32.o
@@ -265,6 +265,7 @@ test -n '%{clang_major}'
%changelog
* Thu Mar 31 2022 Richard W.M. Jones <rjones(a)redhat.com> - 4.00c-3
- Rebuild for clang 14
+- Add upstream patches to commit 285a5cb3.
* Fri Mar 18 2022 Richard W.M. Jones <rjones(a)redhat.com> - 4.00c-2
- Enable clang-LTO support.
diff --git a/sources b/sources
index dce5123..fd685df 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (4.00c.tar.gz) =
23a7a4260e581f7c212393e1e14704464bbbc3ff5465b3472db31c6c7f2cd25a9ecc5ad81fad8958c775fcd01b22269085e6c69419a07fbbdb9ec317a3e39beb
+SHA512 (4.00c-git285a5cb3.tar.gz) =
61ea1105e786f7571d269c96f8208538c718d469235fd7b32e63e180b199cfb843af18175db4070a916ba482560ab978818771f1a8abb91c773f82a6fa20cb7f
commit c798711242d2564992e1d7d426be0b1f9a7d1320
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Thu Mar 31 16:53:08 2022 +0100
Rebuild for clang 14
diff --git a/american-fuzzy-lop.spec b/american-fuzzy-lop.spec
index cb74c66..5c5c62a 100644
--- a/american-fuzzy-lop.spec
+++ b/american-fuzzy-lop.spec
@@ -4,7 +4,7 @@
Name: american-fuzzy-lop
Version: 4.00c
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Practical, instrumentation-driven fuzzer for binary formats
@@ -263,6 +263,9 @@ test -n '%{clang_major}'
%changelog
+* Thu Mar 31 2022 Richard W.M. Jones <rjones(a)redhat.com> - 4.00c-3
+- Rebuild for clang 14
+
* Fri Mar 18 2022 Richard W.M. Jones <rjones(a)redhat.com> - 4.00c-2
- Enable clang-LTO support.
commit 24405ed520e75005bc8912f02903efdce173f26d
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Fri Mar 18 15:29:19 2022 +0000
Enable clang-LTO support.
diff --git a/american-fuzzy-lop.spec b/american-fuzzy-lop.spec
index d6b9589..cb74c66 100644
--- a/american-fuzzy-lop.spec
+++ b/american-fuzzy-lop.spec
@@ -4,7 +4,7 @@
Name: american-fuzzy-lop
Version: 4.00c
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Practical, instrumentation-driven fuzzer for binary formats
@@ -23,6 +23,9 @@ ExclusiveArch: %{ix86} x86_64 s390x
BuildRequires: clang
BuildRequires: llvm-devel
BuildRequires: make
+%ifarch %{ix86} x86_64
+BuildRequires: lld
+%endif
Requires: gcc
@@ -53,6 +56,9 @@ Requires: %{name} = %{version}-%{release}
%if "%{clang_major}" != ""
Requires: clang(major) = %{clang_major}
%endif
+%ifarch %{ix86} x86_64
+Requires: lld
+%endif
%description clang
This subpackage contains clang and clang++ support for
@@ -115,6 +121,7 @@ chmod -x $RPM_BUILD_ROOT%{afl_helper_path}/*.o
%if 0%{?__isa_bits} == 64
rm -f $RPM_BUILD_ROOT%{afl_helper_path}/afl-compiler-rt-32.o
rm -f $RPM_BUILD_ROOT%{afl_helper_path}/afl-llvm-rt-32.o
+rm -f $RPM_BUILD_ROOT%{afl_helper_path}/afl-llvm-rt-lto-32.o
%endif
# Remove docs since we will package them using %%doc.
@@ -192,20 +199,43 @@ test -n '%{clang_major}'
%files clang
%license docs/COPYING
+
%ifarch %{ix86} x86_64
%{_bindir}/afl-clang
%{_bindir}/afl-clang++
%endif
%{_bindir}/afl-clang-fast
%{_bindir}/afl-clang-fast++
+%ifarch %{ix86} x86_64
+%{_bindir}/afl-clang-lto
+%{_bindir}/afl-clang-lto++
+%{_bindir}/afl-ld-lto
+%{_bindir}/afl-lto
+%{_bindir}/afl-lto++
+%endif
+
+%{afl_helper_path}/afl-llvm-dict2file.so
+%ifarch %{ix86} x86_64
+%{afl_helper_path}/afl-llvm-lto-instrumentlist.so
+%endif
+%{afl_helper_path}/afl-llvm-pass.so
+
%if 0%{?__isa_bits} == 32
%{afl_helper_path}/afl-llvm-rt-32.o
%else
%{afl_helper_path}/afl-llvm-rt-64.o
%endif
%{afl_helper_path}/afl-llvm-rt.o
-%{afl_helper_path}/afl-llvm-dict2file.so
-%{afl_helper_path}/afl-llvm-pass.so
+
+%ifarch %{ix86} x86_64
+%if 0%{?__isa_bits} == 32
+%{afl_helper_path}/afl-llvm-rt-lto-32.o
+%else
+%{afl_helper_path}/afl-llvm-rt-lto-64.o
+%endif
+%{afl_helper_path}/afl-llvm-rt-lto.o
+%endif
+
%{afl_helper_path}/cmplog-instructions-pass.so
%{afl_helper_path}/cmplog-routines-pass.so
%{afl_helper_path}/cmplog-switches-pass.so
@@ -215,14 +245,27 @@ test -n '%{clang_major}'
%{afl_helper_path}/libAFLQemuDriver.a
%{afl_helper_path}/libdislocator.so
%{afl_helper_path}/libtokencap.so
+%ifarch %{ix86} x86_64
+%{afl_helper_path}/SanitizerCoverageLTO.so
+%endif
%{afl_helper_path}/SanitizerCoveragePCGUARD.so
%{afl_helper_path}/split-compares-pass.so
%{afl_helper_path}/split-switches-pass.so
+
%{_mandir}/man8/afl-clang-fast.8*
%{_mandir}/man8/afl-clang-fast++.8*
+%ifarch %{ix86} x86_64
+%{_mandir}/man8/afl-clang-lto.8.gz
+%{_mandir}/man8/afl-clang-lto++.8.gz
+%{_mandir}/man8/afl-lto.8.gz
+%{_mandir}/man8/afl-lto++.8.gz
+%endif
%changelog
+* Fri Mar 18 2022 Richard W.M. Jones <rjones(a)redhat.com> - 4.00c-2
+- Enable clang-LTO support.
+
* Wed Jan 26 2022 Richard W.M. Jones <rjones(a)redhat.com> - 4.00c-1
- New upstream version 4.00c (RHBZ#2046452)