diff --git a/1001-rasdaemon-avoid-multiple-definitions.patch b/1001-rasdaemon-avoid-multiple-definitions.patch new file mode 100644 index 0000000000000000000000000000000000000000..109587bbd52f22b1d72102a745d8558398d44d62 --- /dev/null +++ b/1001-rasdaemon-avoid-multiple-definitions.patch @@ -0,0 +1,24 @@ +commit fd982af0a307edc5d3e56011d2e045015b1efd4b +Author: Mauro Carvalho Chehab +Date: Mon Mar 30 01:22:24 2020 +0200 + + ras-record.h: define an external var as such + + Otherwise, newer versions of gcc will produce multiple symbols, + causing link breakages. + + Signed-off-by: Mauro Carvalho Chehab + +diff --git a/ras-record.h b/ras-record.h +index 5311c67caf44..0d2a481c23dd 100644 +--- a/ras-record.h ++++ b/ras-record.h +@@ -25,7 +25,7 @@ + + extern long user_hz; + +-struct ras_events *ras; ++extern struct ras_events *ras; + + struct ras_mc_event { + char timestamp[64]; diff --git a/rasdaemon.spec b/rasdaemon.spec index 06b5a17174bf63589e2bb0855bad8959f128813f..e8b462ea1aa6df6fe4c312ea9c1508dcfbbadcca 100755 --- a/rasdaemon.spec +++ b/rasdaemon.spec @@ -1,6 +1,7 @@ +%define anolis_release .0.1 Name: rasdaemon Version: 0.6.1 -Release: 6%{?dist} +Release: 6%{anolis_release}%{?dist} Summary: Utility to receive RAS error tracings Group: Applications/System License: GPLv2 @@ -32,6 +33,11 @@ Patch6: 8704a85d8dc3483423ec2934fee8132f85f8fdb6.patch Patch7: cc2ce5c65ed5a42eaa97aa3659854add6d808da5.patch Patch8: 854364ba44aee9bc5646f6537fc744b0b54aff37.patch +# Begin: Anolis customized patches +# Backport from fc32 to fix FTBFS on gcc10 +Patch1001: 1001-rasdaemon-avoid-multiple-definitions.patch +# End: Anolis customized patches + %description %{name} is a RAS (Reliability, Availability and Serviceability) logging tool. It currently records memory errors, using the EDAC tracing events. @@ -53,6 +59,8 @@ an utility for reporting current error counts from the EDAC sysfs files. %patch7 -p1 %patch8 -p1 +%patch1001 -p1 + %build %ifarch %{arm} aarch64 %configure --enable-mce --enable-aer --enable-sqlite3 --enable-extlog --enable-abrt-report --enable-non-standard --enable-hisi-ns-decode --enable-arm @@ -78,6 +86,9 @@ rm INSTALL %{buildroot}/usr/include/*.h %{_sysconfdir}/ras/dimm_labels.d %changelog +* Thu Jan 20 2022 Weitao Zhou - 0.6.1-6.0.1 +- use extern in header files when declaring global variables for compatible gcc10 build + * Wed May 26 2021 Aristeu Rozanski 0.6.1-6 - Add support for AMD SMCA [1965011]