8.0 fix symbol versions, enable LTO

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
This commit is contained in:
Kaleb S. KEITHLEY 2020-07-04 08:09:47 -04:00
parent 4186cb9be2
commit a2a88a7c6e
2 changed files with 2239 additions and 12 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,3 @@
# This package depends on automagic byte compilation
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
%global _python_bytecompile_extra 1
%global _hardened_build 1 %global _hardened_build 1
@ -186,7 +183,7 @@ Summary: Distributed File System
%if ( 0%{_for_fedora_koji_builds} ) %if ( 0%{_for_fedora_koji_builds} )
Name: glusterfs Name: glusterfs
Version: 8.0 Version: 8.0
Release: 0.2%{?dev:%{dev}}%{?dist} Release: 0.3%{?dev:%{dev}}%{?dist}
%else %else
Name: @PACKAGE_NAME@ Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
@ -203,6 +200,7 @@ Source8: glusterfsd.init
%else %else
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
%endif %endif
Patch0001: 0001-api-libgfapi-symbol-versions-break-LTO-in-Fedora-raw.patch
Requires(pre): shadow-utils Requires(pre): shadow-utils
BuildRequires: systemd BuildRequires: systemd
@ -662,6 +660,7 @@ This package provides the glusterfs thin-arbiter translator.
%prep %prep
%setup -q -n %{name}-%{version}%{?dev} %setup -q -n %{name}-%{version}%{?dev}
%patch0001 -p1
%if ( ! %{_usepython3} ) %if ( ! %{_usepython3} )
echo "fixing python shebangs..." echo "fixing python shebangs..."
for f in api events extras geo-replication libglusterfs tools xlators; do for f in api events extras geo-replication libglusterfs tools xlators; do
@ -670,14 +669,6 @@ done
%endif %endif
%build %build
# This package uses top level ASM constructs which are incompatible with LTO.
# Top level ASMs are often used to implement symbol versioning. gcc-10
# introduces a new mechanism for symbol versioning which works with LTO.
# Converting packages to use that mechanism instead of toplevel ASMs is
# recommended.
# Disable LTO
%define _lto_cflags %{nil}
sed -i -e 's/--quiet//' configure.ac sed -i -e 's/--quiet//' configure.ac
./autogen.sh && %configure \ ./autogen.sh && %configure \
%{?_with_asan} \ %{?_with_asan} \
@ -1443,6 +1434,9 @@ exit 0
%{_unitdir}/gluster-ta-volume.service %{_unitdir}/gluster-ta-volume.service
%changelog %changelog
* Sat Jul 4 2020 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 8.0-0.3rc0
- 8.0 fix symbol versions, enable LTO
* Wed Jul 1 2020 Jeff Law <law@redhat.com> - 8.0-0.2rc0 * Wed Jul 1 2020 Jeff Law <law@redhat.com> - 8.0-0.2rc0
- Disable LTO - Disable LTO