From ad4dd5aef4cc29b27bf119ef979c6ee8e17f8638 Mon Sep 17 00:00:00 2001 From: liyancheng <412998149@qq.com> Date: Sun, 9 Mar 2025 17:33:48 +0800 Subject: [PATCH] [Bugfix] Change fatal to error when argc not equal 2 --- ...fatal-to-error-when-argc-not-equal-2.patch | 25 +++++++++++++++++++ autofdo.spec | 7 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 0003-DUMP_GCOV-Change-fatal-to-error-when-argc-not-equal-2.patch diff --git a/0003-DUMP_GCOV-Change-fatal-to-error-when-argc-not-equal-2.patch b/0003-DUMP_GCOV-Change-fatal-to-error-when-argc-not-equal-2.patch new file mode 100644 index 0000000..5d401ce --- /dev/null +++ b/0003-DUMP_GCOV-Change-fatal-to-error-when-argc-not-equal-2.patch @@ -0,0 +1,25 @@ +From 7df1845234f8ac47a825f1f783a1130ad4627122 Mon Sep 17 00:00:00 2001 +From: liyancheng <412998149@qq.com> +Date: Thu, 28 Nov 2024 15:52:34 +0800 +Subject: [PATCH] [DUMP_GCOV] Change fatal to error when argc not equal 2 + +--- + dump_gcov.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dump_gcov.cc b/dump_gcov.cc +index 49a2ba6..ce55143 100644 +--- a/dump_gcov.cc ++++ b/dump_gcov.cc +@@ -25,7 +25,7 @@ int main(int argc, char **argv) { + absl::ParseCommandLine(argc, argv); + + if (argc != 2) { +- LOG(FATAL) << "Please use: dump_gcov file_path\n"; ++ LOG(ERROR) << "Please use: dump_gcov file_path\n"; + return -1; + } + devtools_crosstool_autofdo::SymbolMap symbol_map; +-- +2.33.0 + diff --git a/autofdo.spec b/autofdo.spec index 7b3e34b..dfd5634 100644 --- a/autofdo.spec +++ b/autofdo.spec @@ -1,6 +1,6 @@ Name: autofdo Version: 0.30.1 -Release: 4 +Release: 5 Summary: A tool to convert perf.data profile to AutoFDO profile License: Apache-2.0 URL: https://github.com/google/autofdo @@ -11,6 +11,7 @@ Source1: abseil.tar.xz Patch1: 0001-adjust-the-link-method-of-dependency-libraries.patch Patch2: 0002-unscaledcycleclock-remove-RISC-V-support.patch Patch3: backport-autofdo-third_party-glog-eliminate-deprecation-warning.patch +Patch4: 0003-DUMP_GCOV-Change-fatal-to-error-when-argc-not-equal-2.patch BuildRequires: gcc gcc-c++ cmake elfutils-libelf-devel openssl-devel pkg-config ninja-build libunwind-devel protobuf-devel %description @@ -37,6 +38,10 @@ install -m0755 %{__cmake_builddir}/profile_merger %{buildroot}%{_bindir} %{_bindir}/profile_merger %changelog +* Sun Mar 09 2025 liyancheng <412998149@qq.com> - 0.30.1-5 +- Type: Bugfix +- DESC: Change fatal to error when argc not equal 2. + * Sun Mar 02 2025 Funda Wang - 0.30.1-4 - try build with cmake 4.0 -- Gitee