From 71447f440795252a47c0caf21042f3ed9a9c5f65 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Feb 28 2021 10:29:16 +0000 Subject: Disable LTO to fix self test failures LTO appears to break hotkey tests in GuiManager test suite (we had a patch that disabled the failing tests). I don't know if LTO is breaking the self test, or if the self tests are catching an actual issue in LTO'd 0ad. This commit disables LTO to be on the safe side, and re-enables self tests. --- diff --git a/0ad-check.patch b/0ad-check.patch deleted file mode 100644 index 89534fb..0000000 --- a/0ad-check.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up source/gui/tests/test_GuiManager.h.orig source/gui/tests/test_GuiManager.h ---- source/gui/tests/test_GuiManager.h.orig 2021-02-23 13:49:05.427275704 -0300 -+++ source/gui/tests/test_GuiManager.h 2021-02-23 13:50:11.625669521 -0300 -@@ -151,12 +151,12 @@ public: - - pageScriptInterface.GetProperty(global, "state_before", &js_hotkey_pressed_value); - ScriptInterface::FromJSVal(prq, js_hotkey_pressed_value, hotkey_pressed_value); -- TS_ASSERT_EQUALS(hotkey_pressed_value, true); -+ //TS_ASSERT_EQUALS(hotkey_pressed_value, true); - - hotkey_pressed_value = false; - pageScriptInterface.GetProperty(global, "state_after", &js_hotkey_pressed_value); - ScriptInterface::FromJSVal(prq, js_hotkey_pressed_value, hotkey_pressed_value); -- TS_ASSERT_EQUALS(hotkey_pressed_value, true); -+ //TS_ASSERT_EQUALS(hotkey_pressed_value, true); - - // We are listening to KeyDown events, so repeat shouldn't matter. - hotkeyNotification.ev.key.repeat = 1; -@@ -167,12 +167,12 @@ public: - hotkey_pressed_value = false; - pageScriptInterface.GetProperty(global, "state_before", &js_hotkey_pressed_value); - ScriptInterface::FromJSVal(prq, js_hotkey_pressed_value, hotkey_pressed_value); -- TS_ASSERT_EQUALS(hotkey_pressed_value, true); -+ //TS_ASSERT_EQUALS(hotkey_pressed_value, true); - - hotkey_pressed_value = false; - pageScriptInterface.GetProperty(global, "state_after", &js_hotkey_pressed_value); - ScriptInterface::FromJSVal(prq, js_hotkey_pressed_value, hotkey_pressed_value); -- TS_ASSERT_EQUALS(hotkey_pressed_value, true); -+ //TS_ASSERT_EQUALS(hotkey_pressed_value, true); - - hotkeyNotification.ev.type = SDL_KEYUP; - in_push_priority_event(&hotkeyNotification); diff --git a/0ad.spec b/0ad.spec index 8d07867..1dc27b5 100644 --- a/0ad.spec +++ b/0ad.spec @@ -137,7 +137,6 @@ Patch1: %{name}-debug.patch Patch2: %{name}-valgrind.patch # Fix build on ppc64le with patches from https://wiki.raptorcs.com/wiki/Porting/0ad Patch3: %{name}-ppc64.patch -Patch4: %{name}-check.patch Patch5: %{name}-rust.patch %description @@ -162,7 +161,6 @@ hobbyist game developers, since 2001. %endif %patch2 -p0 %patch3 -p0 -%patch4 -p0 %if %{without system_mozjs78} %patch5 -p0 %endif @@ -175,11 +173,9 @@ rm -fr libraries/source/valgrind #----------------------------------------------------------------------- %build -# This package appears to get a multiply defined symbol during the LTO -# link, but only on i686. Disable LTO on that platform for now -%ifarch i686 +# LTO appears to break hotkey tests in GuiManager test suite. +# Disable LTO to fix the failing tests. %define _lto_cflags %{nil} -%endif %set_build_flags build/workspaces/update-workspaces.sh \ @@ -275,6 +271,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/0ad.desktop %changelog * Sat Feb 27 2021 Kalev Lember - 0.0.24b-2 - Use set_build_flags macro to set CFLAGS/CXXFLAGS/LDFLAGS +- Disable LTO to fix self test failures * Mon Feb 22 2021 pcpa - 0.0.24b-1 - Update to 0.0.24b