From 182e3d60ff762894407b03c9e87762c75fab7bc3 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 26 May 2020 13:35:13 +0200 Subject: RPM spec: fix "E: lto-no-text-in-archive" Some opensuse versions failed to build the RPM with: libosmo-mtp-devel.x86_64: E: lto-no-text-in-archive (Badness: 10000) /usr/lib64/libmtp.a libosmo-sigtran-devel.x86_64: E: lto-no-text-in-archive (Badness: 10000) /usr/lib64/libosmo-sigtran.a libosmo-sccp-devel.x86_64: E: lto-no-text-in-archive (Badness: 10000) /usr/lib64/libsccp.a libosmo-xua-devel.x86_64: E: lto-no-text-in-archive (Badness: 10000) /usr/lib64/libxua.a This archive does not contain a non-empty .text section. The archive was not created with -ffat-lto-objects option. Fix it as described here: https://en.opensuse.org/openSUSE:LTO#Static_libraries I've verified in my own OBS namespace, that it works as expected. Related: OS#4550 Change-Id: Iaa0be46838f279af8ea87e00809dd3babd4fcad2 --- contrib/libosmo-sccp.spec.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/libosmo-sccp.spec.in b/contrib/libosmo-sccp.spec.in index b4d7722..b195b1f 100644 --- a/contrib/libosmo-sccp.spec.in +++ b/contrib/libosmo-sccp.spec.in @@ -12,6 +12,12 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. +# Avoid "E: lto-no-text-in-archive" +# https://en.opensuse.org/openSUSE:LTO#Static_libraries +%if 0%{?suse_version} +%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects +%endif + Name: libosmo-sccp Version: @VERSION@ Release: 0 -- cgit v1.2.3