From b6d8b5b611cbf791b65524d8bdf0e31f88fd6193 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 21 Aug 2020 16:41:46 -0600 Subject: [PATCH] Re-enable LTO --- librdkafka.spec | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/librdkafka.spec b/librdkafka.spec index 4cb1f14..b63da4f 100644 --- a/librdkafka.spec +++ b/librdkafka.spec @@ -1,6 +1,6 @@ Name: librdkafka Version: 1.3.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Apache Kafka C library License: BSD @@ -35,11 +35,14 @@ using librdkafka. %setup -q %build -# configure tests try to compile code containing ASMs to a .o file -# In an LTO world, that always works as compilation does not happen until -# link time. As a result we get the wrong results from configure. -# Disable LTO. -%define _lto_cflags %{nil} +# This package has a configure test which uses ASMs, but does not link the +# resultant .o files. As such the ASM test is always successful, even on +# architectures were the ASM is not valid when compiling with LTO. +# +# -ffat-lto-objects is sufficient to address this issue. It is the default +# for F33, but is expected to only be enabled for packages that need it in +# F34, so we use it here explicitly +%define _lto_cflags -flto=auto -ffat-lto-objects %configure --enable-lz4 \ --enable-ssl \ @@ -74,11 +77,14 @@ find %{buildroot} -name '*.a' -delete -print %changelog +* Fri Aug 21 2020 Jeff Law - 1.3.0-5 +- Re-enable LTO + * Tue Jul 28 2020 Fedora Release Engineering - 1.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jun 30 2020 Jeff Law - 1.3.0-3 -Disable LTO +- Disable LTO * Wed Jan 29 2020 Fedora Release Engineering - 1.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild