diff --git a/lzo-2.08-rhbz1309225.patch b/lzo-2.08-rhbz1309225.patch new file mode 100644 index 0000000..a4b9de8 --- /dev/null +++ b/lzo-2.08-rhbz1309225.patch @@ -0,0 +1,14 @@ +diff -up lzo-2.08/include/lzo/lzodefs.h.rhbz1309225 lzo-2.08/include/lzo/lzodefs.h +--- lzo-2.08/include/lzo/lzodefs.h.rhbz1309225 2016-02-19 13:38:02.604220910 +0100 ++++ lzo-2.08/include/lzo/lzodefs.h 2016-02-19 13:37:30.619073085 +0100 +@@ -1686,6 +1686,10 @@ extern "C" { + # define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__)); + #endif + #endif ++#if (LZO_CC_GNUC >= 0x060000ul) && defined(__lzo_byte_struct_ma) ++# undef __lzo_byte_struct ++# define __lzo_byte_struct(s,n) __lzo_byte_struct_ma(s,n) ++#endif + #if defined(__lzo_byte_struct) && !defined(__lzo_byte_struct_ma) + # define __lzo_byte_struct_ma(s,n) __lzo_byte_struct(s,n) + #endif diff --git a/lzo.spec b/lzo.spec index 83129a7..4939ef7 100644 --- a/lzo.spec +++ b/lzo.spec @@ -1,12 +1,13 @@ Name: lzo Version: 2.08 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Data compression library with very fast (de)compression Group: System Environment/Libraries License: GPLv2+ URL: http://www.oberhumer.com/opensource/lzo/ Source0: http://www.oberhumer.com/opensource/lzo/download/%{name}-%{version}.tar.gz Patch0: lzo-2.08-configure.patch +Patch1: lzo-2.08-rhbz1309225.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel @@ -43,6 +44,7 @@ This package contains development files needed for lzo. %prep %setup -q %patch0 -p1 -z .configure +%patch1 -p1 -z .rhbz1309225 # mark asm files as NOT needing execstack for i in asm/i386/src_gas/*.S; do echo '.section .note.GNU-stack,"",@progbits' >> $i @@ -50,14 +52,6 @@ done %build -# Workaround for ppc64le bug #1309225 -%ifarch ppc64le -CFLAGS="-O1 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mcpu=power8 -mtune=power8" ; export CFLAGS ; -CXXFLAGS="-O1 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mcpu=power8 -mtune=power8" ; export CXXFLAGS ; -FFLAGS="-O1 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mcpu=power8 -mtune=power8 -I/usr/lib64/gfortran/modules" ; export FFLAGS ; -FCFLAGS="-O1 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mcpu=power8 -mtune=power8 -I/usr/lib64/gfortran/modules" ; export FCFLAGS ; -%endif - %configure --disable-dependency-tracking --disable-static --enable-shared make %{?_smp_mflags} # build minilzo too (bz 439979) @@ -115,6 +109,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 19 2016 Karsten Hopp - 2.08-8 +- remove -O1 workaround, add patch by Jakub Jelinek instead (bug #1309225) + * Wed Feb 17 2016 Karsten Hopp - 2.08-7 - use -O1 compiler optimizations on ppc64le (bug #1309225)