From 58083d1531a80204b7c77e9fcb08ce0ddda0496041d7d869af3a3d3301a98762 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 3 Mar 2021 11:15:52 +0000 Subject: [PATCH] - reenabled LTO (boo#1133294) * u_no-lto-for-tests.patch disables LTO in test/ subtree, since "-Wl,-wrap" is not supported by LTO * added "%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects" OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=787 --- u_no-lto-for-tests.patch | 10 ++++++++++ xorg-x11-server.changes | 8 ++++++++ xorg-x11-server.spec | 9 ++++++--- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 u_no-lto-for-tests.patch diff --git a/u_no-lto-for-tests.patch b/u_no-lto-for-tests.patch new file mode 100644 index 0000000..1d1b84b --- /dev/null +++ b/u_no-lto-for-tests.patch @@ -0,0 +1,10 @@ +--- xserver-1.20.10/test/Makefile.am.orig 2021-03-02 23:46:49.137916000 +0100 ++++ xserver-1.20.10/test/Makefile.am 2021-03-02 23:47:48.691663000 +0100 +@@ -105,6 +105,7 @@ tests_LDFLAGS = \ + -Wl,-wrap,XISetEventMask \ + -Wl,-wrap,AddResource \ + -Wl,-wrap,GrabButton \ ++ -fno-lto \ + $() + endif XORG + diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 5ffe2e9..087f2b5 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Mar 3 09:24:59 UTC 2021 - Stefan Dirsch + +- reenabled LTO (boo#1133294) + * u_no-lto-for-tests.patch + disables LTO in test/ subtree, since "-Wl,-wrap" is not supported by LTO + * added "%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects" + ------------------------------------------------------------------- Mon Dec 07 13:48:26 UTC 2020 - tobias.klausmann@freenet.de diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index f0ba1a9..ccc5b5c 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -1,7 +1,7 @@ # # spec file for package xorg-x11-server # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -254,6 +254,8 @@ Patch1600: U_glamor_egl-Reject-OpenGL-2.1-early-on.patch Patch1801: U_Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch +Patch1900: u_no-lto-for-tests.patch + %description This package contains the X.Org Server. @@ -404,9 +406,10 @@ sh %{SOURCE92} --verify . %{SOURCE91} %patch1505 -p1 %patch1600 -p1 %patch1801 -p1 +%patch1900 -p1 %build -%define _lto_cflags %{nil} +%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects test -e source-file-list || \ find -L . -type f \! -name '*.orig' \! -path ./source-file-list > \ source-file-list @@ -470,7 +473,7 @@ export PCI_TXT_IDS_DIR=%{pci_ids_dir} /usr/share/fonts/cyrillic:unscaled,\ /usr/share/fonts/misc/sgi:unscaled,\ /usr/share/fonts/truetype/,built-ins" -make %{?_smp_mflags} +make %{?_smp_mflags} V=1 make -C hw/kdrive %{?_smp_mflags} %install