From a05354fd6f55ea154e93a8bd8d20065e1ce24428 Mon Sep 17 00:00:00 2001 From: yueyuankun Date: Wed, 29 May 2024 09:26:14 +0800 Subject: [PATCH 1/2] Fix build error on loongarch64 (cherry picked from commit 6504bbe2adc56164ca144197c50f1ffffcf13b3b) --- AFLplusplus.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/AFLplusplus.spec b/AFLplusplus.spec index 38ffd4d..efc53be 100644 --- a/AFLplusplus.spec +++ b/AFLplusplus.spec @@ -2,7 +2,7 @@ Name: AFLplusplus Version: 4.10c Summary: Practical, instrumentation-driven fuzzer for binary formats License: Apache 2.0 -Release: 2 +Release: 3 URL: https://github.com/AFLplusplus/AFLplusplus Source0: https://github.com/AFLplusplus/AFLplusplus/archive/refs/tags/v%{version}.tar.gz @@ -112,6 +112,11 @@ mv $RPM_BUILD_ROOT%{_pkgdocdir} pkg-docs %else %{afl_helper_path}/afl-compiler-rt-64.o %endif +# LoongArch64 clang compiler can compile afl-compiler-rt-32.o on 64_bit platform. +# For details, see compile log. +%ifarch loongarch64 +%exclude %{afl_helper_path}/afl-compiler-rt-32.o +%endif %{afl_helper_path}/afl-compiler-rt.o %{afl_helper_path}/afl-gcc-cmplog-pass.so %{afl_helper_path}/afl-gcc-cmptrs-pass.so @@ -198,6 +203,12 @@ mv $RPM_BUILD_ROOT%{_pkgdocdir} pkg-docs %changelog +* Wed May 29 2024 yueyuankun - 4.10c-3 +- Type: compile +- ID:T NA +- SUG: NA +- DESC: Fix build error on loongarch64 + * Thu Apr 25 2024 liyancheng <412998149@qq.com> - 4.10c-2 - Type: Update - ID: NA -- Gitee From 76319710ae624467cee1a32e8d87c1b068005a81 Mon Sep 17 00:00:00 2001 From: liyancheng <412998149@qq.com> Date: Fri, 7 Feb 2025 10:53:51 +0800 Subject: [PATCH 2/2] Fix build error with lto --- AFLplusplus.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/AFLplusplus.spec b/AFLplusplus.spec index efc53be..87ffae8 100644 --- a/AFLplusplus.spec +++ b/AFLplusplus.spec @@ -2,7 +2,7 @@ Name: AFLplusplus Version: 4.10c Summary: Practical, instrumentation-driven fuzzer for binary formats License: Apache 2.0 -Release: 3 +Release: 4 URL: https://github.com/AFLplusplus/AFLplusplus Source0: https://github.com/AFLplusplus/AFLplusplus/archive/refs/tags/v%{version}.tar.gz @@ -14,6 +14,7 @@ BuildRequires: make chrpath Requires: gcc gcc-c++ %global afl_helper_path %{_libdir}/afl +%define _lto_cflags %{nil} %description American fuzzy lop uses a novel type of compile-time instrumentation @@ -203,9 +204,15 @@ mv $RPM_BUILD_ROOT%{_pkgdocdir} pkg-docs %changelog +* Fri Feb 7 2025 liyancheng <412998149@qq.com> - 4.10c-4 +- Type: Bugfix +- ID: NA +- SUG: NA +- DESC: Fix build error with lto. + * Wed May 29 2024 yueyuankun - 4.10c-3 - Type: compile -- ID:T NA +- ID: NA - SUG: NA - DESC: Fix build error on loongarch64 -- Gitee