From 7f2244e30cb4683b35190a437633fa7819844266 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Fri, 18 Sep 2026 23:39:23 -0300
Subject: RPM avahi-tqt/libart-lgpl: fix openSUSE static LTO archives
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add -ffat-lto-objects to the openSUSE LTO flags for packages that ship static archives.

Recent openSUSE Tumbleweed rpmlint rejects LTO-only static archives because they contain no regular .text section. This affected both libavahi-tqt.a and libart_lgpl_2.a.

Both packages build successfully on current openSUSE Tumbleweed with this change.

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 redhat/dependencies/avahi-tqt/avahi-tqt.spec     | 4 ++++
 redhat/dependencies/libart-lgpl/libart-lgpl.spec | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/redhat/dependencies/avahi-tqt/avahi-tqt.spec b/redhat/dependencies/avahi-tqt/avahi-tqt.spec
index 94e0955f1..c5d94cd44 100644
--- a/redhat/dependencies/avahi-tqt/avahi-tqt.spec
+++ b/redhat/dependencies/avahi-tqt/avahi-tqt.spec
@@ -28,6 +28,10 @@
 %endif
 
 
+%if 0%{?suse_version}
+%global _lto_cflags %{expand:%{?_lto_cflags} -ffat-lto-objects}
+%endif
+
 Name:		trinity-avahi-tqt
 Epoch:		%{tde_epoch}
 Version:	0.6.30
diff --git a/redhat/dependencies/libart-lgpl/libart-lgpl.spec b/redhat/dependencies/libart-lgpl/libart-lgpl.spec
index 63c6772d4..f13d6bdf9 100644
--- a/redhat/dependencies/libart-lgpl/libart-lgpl.spec
+++ b/redhat/dependencies/libart-lgpl/libart-lgpl.spec
@@ -29,6 +29,10 @@
 %endif
 
 
+%if 0%{?suse_version}
+%global _lto_cflags %{expand:%{?_lto_cflags} -ffat-lto-objects}
+%endif
+
 Name:		trinity-libart-lgpl
 Epoch:		%{tde_epoch}
 Version:	2.3.22
-- 
cgit v1.2.3

