build: fix annocheck warnings on i686

Failures found:
Hardened: ./usr/lib/liblzma.so.5.2.4: FAIL: Gaps were detected in the annobin coverage.
Hardened: ./usr/lib/liblzma.so.5.2.4: FAIL: Gaps were detected in the annobin

Resolves: rhbz#1630650
Version: 5.2.4-3
This commit is contained in:
Pavel Raiskup 2018-11-22 14:39:09 +01:00
parent e696b32305
commit 6d2e813558
1 changed files with 15 additions and 2 deletions

17
xz.spec
View File

@ -4,7 +4,7 @@
Summary: LZMA compression utilities
Name: xz
Version: 5.2.4
Release: 2%{?dist}
Release: 3%{?dist}
# Scripts xz{grep,diff,less,more} and symlinks (copied from gzip) are
# GPLv2+, binaries are Public Domain (linked against LGPL getopt_long but its
@ -24,6 +24,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
# have grepconf, but we're only concerned with F22 here.
Requires: grep >= 2.20-5
BuildRequires: gcc
BuildRequires: perl-interpreter
@ -83,9 +84,18 @@ commands that deal with the older LZMA format.
%build
export CFLAGS="%optflags"
%ifarch %{power64}
export CFLAGS="%{optflags} -O3"
CFLAGS="$CFLAGS -O3"
%endif
%ifarch %ix86
# rhbz#1630650, annocheck reports the following message because liblzma uses
# crc*_x86.S asm code on i686:
CFLAGS="$CFLAGS -Wa,--generate-missing-build-notes=yes"
%endif
%configure
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
@ -145,6 +155,9 @@ LD_LIBRARY_PATH=$PWD/src/liblzma/.libs make check
%changelog
* Thu Nov 22 2018 Pavel Raiskup <praiskup@redhat.com> - 5.2.4-3
- fix annocheck failures on i686 (rhbz#1630650)
* Wed May 09 2018 Pavel Raiskup <praiskup@redhat.com> - 5.2.4-2
- drop ppc64p7 hack, per fedora devel list discussion:
https://lists.fedoraproject.org/archives/list/