From ef23b6845873ae15de514ee285e557ca4aacdbdae9a4c609f16c23f4a6ef83e3 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 26 Jan 2021 08:34:17 +0000 Subject: [PATCH] - add lzo-2.08-rhbz1309225.patch to avoid aliasing issues OBS-URL: https://build.opensuse.org/package/show/Base:System/lzo?expand=0&rev=42 --- lzo-2.08-rhbz1309225.patch | 14 ++++++++++++++ lzo.changes | 5 +++++ lzo.spec | 10 ++++++---- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 lzo-2.08-rhbz1309225.patch diff --git a/lzo-2.08-rhbz1309225.patch b/lzo-2.08-rhbz1309225.patch new file mode 100644 index 0000000..faeb589 --- /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.changes b/lzo.changes index 040b604..15f5717 100644 --- a/lzo.changes +++ b/lzo.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 26 08:33:22 UTC 2021 - Dirk Müller + +- add lzo-2.08-rhbz1309225.patch to avoid aliasing issues + ------------------------------------------------------------------- Wed Nov 20 09:04:53 UTC 2019 - Martin Liška diff --git a/lzo.spec b/lzo.spec index 55ee370..6e242b1 100644 --- a/lzo.spec +++ b/lzo.spec @@ -1,7 +1,7 @@ # # spec file for package lzo # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,9 +23,10 @@ Release: 0 Summary: A Real-Time Data Compression Library License: GPL-2.0-or-later Group: Development/Libraries/C and C++ -URL: http://www.oberhumer.com/opensource/lzo/ -Source: http://www.oberhumer.com/opensource/%{name}/download/%{name}-%{version}.tar.gz +URL: https://www.oberhumer.com/opensource/lzo/ +Source: https://www.oberhumer.com/opensource/%{name}/download/%{name}-%{version}.tar.gz Source2: baselibs.conf +Patch1: https://src.fedoraproject.org/rpms/lzo/raw/master/f/lzo-2.08-rhbz1309225.patch BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -72,10 +73,11 @@ compression ratio. %prep %setup -q +%patch1 -p1 %build %global _lto_cflags %{_lto_cflags} -ffat-lto-objects -export CFLAGS="%{optflags} -fvisibility=hidden -fno-strict-aliasing" +export CFLAGS="%{optflags} -fvisibility=hidden" %configure --enable-shared \ --enable-static \ --disable-silent-rules \