From 9a19a094d87f02e447adf58c31132ac2c7eedbe7 Mon Sep 17 00:00:00 2001
From: msmeissn <>
Date: Mar 31 2022 15:32:06 +0000
Subject: Update afl to version 4.00c / rev 68 via SR 966170
https://build.opensuse.org/request/show/966170
by user msmeissn + dimstar_suse
---
diff --git a/.files b/.files
index 8194457..da50c96 100644
Binary files a/.files and b/.files differ
diff --git a/.rev b/.rev
index ee94526..167ba84 100644
--- a/.rev
+++ b/.rev
@@ -1057,4 +1057,12 @@
- fix -n dumb mode (nobody should use this mode though) (forwarded request 950196 from msmeissn)
950197
+
+ 41f14a22723c16a75da3f426eb0b7626
+ 4.00c
+
+ dimstar_suse
+
+ 966170
+
diff --git a/afl.changes b/afl.changes
index 4a6e19c..4bc460b 100644
--- a/afl.changes
+++ b/afl.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Feb 23 22:21:07 UTC 2022 - Aaron Puchert
+
+- Fix build with armv7l on Leap: we have afl-llvm-rt-lto{,-32}.o.
+- Fix build with ppc64le: we don't seem to have the 32-bit object
+ files available there and there is also no gcc-32bit.
+
+-------------------------------------------------------------------
Mon Jan 31 12:45:45 UTC 2022 - Marcus Meissner
- updated to 4.00c
diff --git a/afl.spec b/afl.spec
index 9af5024..730ba35 100644
--- a/afl.spec
+++ b/afl.spec
@@ -16,6 +16,25 @@
#
+%ifarch riscv64
+%define afl_rt compiler-rt,llvm-rt
+%else
+%define afl_rt compiler-rt,llvm-rt,llvm-rt-lto
+%endif
+
+%ifarch %{arm} %ix86 s390x x86_64
+%define afl_32 1
+%endif
+%ifarch ppc64le
+%if %{pkg_vcmp clang < 12}
+%define afl_32 1
+%endif
+%endif
+
+%ifarch aarch64 ppc64 ppc64le riscv64 s390x x86_64
+%define afl_64 1
+%endif
+
Name: afl
Version: 4.00c
Release: 0
@@ -82,25 +101,16 @@ chmod -x %{buildroot}/%{_libexecdir}/%{name}/*.o
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/%{name}-as
%{_libexecdir}/%{name}/as
-%ifarch x86_64 aarch64 ppc64 ppc64le s390x riscv64
-%{_libexecdir}/%{name}/afl-compiler-rt-64.o
-%{_libexecdir}/%{name}/afl-llvm-rt-64.o
-%ifnarch riscv64
-%{_libexecdir}/%{name}/afl-llvm-rt-lto-64.o
+%if 0%{?afl_64}
+%{_libexecdir}/%{name}/afl-{%{afl_rt}}-64.o
%endif
+%if 0%{?afl_32}
+%{_libexecdir}/%{name}/afl-{%{afl_rt}}-32.o
%endif
-%ifarch %ix86 %{arm} s390x ppc64le x86_64
-%{_libexecdir}/%{name}/afl-compiler-rt-32.o
-%{_libexecdir}/%{name}/afl-llvm-rt-32.o
-%endif
-%ifarch %ix86 aarch64 s390x ppc64le x86_64
+%ifarch aarch64
%{_libexecdir}/%{name}/afl-llvm-rt-lto-32.o
%endif
-%{_libexecdir}/%{name}/afl-compiler-rt.o
-%{_libexecdir}/%{name}/afl-llvm-rt.o
-%ifnarch %{arm} riscv64
-%{_libexecdir}/%{name}/afl-llvm-rt-lto.o
-%endif
+%{_libexecdir}/%{name}/afl-{%{afl_rt}}.o
%{_libexecdir}/%{name}/dynamic_list.txt
%{_libexecdir}/%{name}/*.so
%{_libexecdir}/%{name}/*.a