From 67e2fa2f0b66e9aeb6256fe22df151efde41de8f Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 23 May 2020 08:49:35 +0200 Subject: [PATCH] Backport workaround for Ryzen 3000 CPU support https://bugzilla.redhat.com/show_bug.cgi?id=1822835 https://trac.wildfiregames.com/changeset/23262 --- 0ad-ryzen-3000.patch | 12 ++++++++++++ 0ad.spec | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 0ad-ryzen-3000.patch diff --git a/0ad-ryzen-3000.patch b/0ad-ryzen-3000.patch new file mode 100644 index 0000000..bf84ff2 --- /dev/null +++ b/0ad-ryzen-3000.patch @@ -0,0 +1,12 @@ +Index: trunk/source/lib/sysdep/arch/x86_x64/cache.cpp +=================================================================== +--- trunk/source/lib/sysdep/arch/x86_x64/cache.cpp (revision 23261) ++++ trunk/source/lib/sysdep/arch/x86_x64/cache.cpp (revision 23262) +@@ -90,5 +90,6 @@ + { + 0, 1, 2, 0, 4, 0, 8, 0, +- 16, 0, 32, 48, 64, 96, 128, x86_x64::Cache::fullyAssociative ++ // TODO: The second '16' does not obey to the specifications and is only a workaround. For a correct implementation please look here: https://community.amd.com/thread/244207 ++ 16, 16, 32, 48, 64, 96, 128, x86_x64::Cache::fullyAssociative + }; + diff --git a/0ad.spec b/0ad.spec index d57da29..ccd9287 100644 --- a/0ad.spec +++ b/0ad.spec @@ -25,7 +25,7 @@ Name: 0ad Version: 0.0.23b -Release: 14%{?dist} +Release: 15%{?dist} # BSD License: # build/premake/* # libraries/source/miniupnpc/* (not built/used) @@ -147,6 +147,11 @@ Patch6: %{name}-mozjs38.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1799112 Patch7: %{name}-fcollada.patch +# Workaround for Ryzen 3000 CPU support +# https://bugzilla.redhat.com/show_bug.cgi?id=1822835 +# https://trac.wildfiregames.com/changeset/23262 +Patch8: 0ad-ryzen-3000.patch + %description 0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform real-time strategy (RTS) game of ancient warfare. In short, it is a @@ -177,6 +182,7 @@ sed -i "s/\(-fno-delete-null-pointer-checks\)/\1 -O0/" \ #end Related to 0ad-mozjs38.patch %patch7 -p1 +%patch8 -p1 %if %{with system_nvtt} rm -fr libraries/source/nvtt @@ -279,6 +285,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/0ad.desktop %{_mandir}/man6/*.6* %changelog +* Sat May 23 2020 Kalev Lember - 0.0.23b-15 +- Backport workaround for Ryzen 3000 CPU support (#1822835) + * Sun May 17 2020 Pete Walter - 0.0.23b-14 - Rebuild for ICU 67