aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-05-26 13:35:13 +0200
committerlaforge <laforge@osmocom.org>2020-05-28 09:55:36 +0000
commit182e3d60ff762894407b03c9e87762c75fab7bc3 (patch)
tree94d6078f2d620907300ef6bc056d717bd527916e
parentd25ba11eef6400ebef2e18fcb7def1df87e31d92 (diff)
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
-rw-r--r--contrib/libosmo-sccp.spec.in6
1 files changed, 6 insertions, 0 deletions
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