mirror of https://gitee.com/openkylin/lzo2.git
Import Debian changes 2.10-ok1
lzo2 (2.10-ok1) yangtze; urgency=medium * Build for openKylin.
This commit is contained in:
parent
f40ad87deb
commit
21641b6b3a
|
@ -0,0 +1,5 @@
|
|||
lzo2 (2.10-ok1) yangtze; urgency=medium
|
||||
|
||||
* Build for openKylin.
|
||||
|
||||
-- openKylinBot <openKylinBot@openkylin.com> Mon, 25 Apr 2022 22:03:04 +0800
|
|
@ -0,0 +1,40 @@
|
|||
Source: lzo2
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Stephen Kitt <skitt@debian.org>
|
||||
Standards-Version: 4.5.0
|
||||
Build-Depends: debhelper-compat (= 12), pkg-config
|
||||
Homepage: https://www.oberhumer.com/opensource/lzo/
|
||||
Vcs-Browser: https://salsa.debian.org/debian/lzo2
|
||||
Vcs-Git: https://salsa.debian.org/debian/lzo2.git
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: liblzo2-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Depends: liblzo2-2 (= ${binary:Version}), ${misc:Depends}
|
||||
Replaces: liblzo-dev
|
||||
Multi-Arch: same
|
||||
Description: data compression library (development files)
|
||||
LZO is a portable, lossless data compression library.
|
||||
This package contains the header files and static libraries for the
|
||||
LZO data compression library.
|
||||
|
||||
Package: liblzo2-2
|
||||
Architecture: any
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Multi-Arch: same
|
||||
Description: data compression library
|
||||
LZO is a portable, lossless data compression library.
|
||||
It offers pretty fast compression and very fast decompression.
|
||||
Decompression requires no memory. In addition there are slower
|
||||
compression levels achieving a quite competitive compression ratio
|
||||
while still decompressing at this very high speed.
|
||||
|
||||
Package: liblzo2-2-udeb
|
||||
Package-Type: udeb
|
||||
Section: debian-installer
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: data compression library
|
|
@ -0,0 +1,32 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: lzo
|
||||
Source: https://www.oberhumer.com/opensource/lzo/
|
||||
|
||||
Files: *
|
||||
Copyright: 1996-2017 Markus Franz Xaver Johannes Oberhumer
|
||||
License: GPL-2+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 1998, 2000-2001, 2003 Paolo Molaro
|
||||
2004, 2006-2009, 2011, 2014 Peter Eisentraut
|
||||
2018, 2020 Stephen Kitt <skitt@debian.org>
|
||||
License: GPL-2+
|
||||
|
||||
License: GPL-2+
|
||||
lzop and the LZO library are free software; you can redistribute them
|
||||
and/or modify them under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License version 2 can be found in /usr/share/common-licenses/GPL-2
|
|
@ -0,0 +1 @@
|
|||
lib/*/*.so.*
|
|
@ -0,0 +1,3 @@
|
|||
AUTHORS
|
||||
THANKS
|
||||
doc/LZO.TXT
|
|
@ -0,0 +1 @@
|
|||
lib/*/*.so.*
|
|
@ -0,0 +1,119 @@
|
|||
liblzo2.so.2 liblzo2-2 #MINVER#
|
||||
* Build-Depends-Package: liblzo2-dev
|
||||
__lzo_align_gap@Base 2.02
|
||||
__lzo_init_v2@Base 2.02
|
||||
__lzo_ptr_linear@Base 2.02
|
||||
_lzo1b_1_compress_func@Base 2.02
|
||||
_lzo1b_2_compress_func@Base 2.02
|
||||
_lzo1b_3_compress_func@Base 2.02
|
||||
_lzo1b_4_compress_func@Base 2.02
|
||||
_lzo1b_5_compress_func@Base 2.02
|
||||
_lzo1b_6_compress_func@Base 2.02
|
||||
_lzo1b_7_compress_func@Base 2.02
|
||||
_lzo1b_8_compress_func@Base 2.02
|
||||
_lzo1b_99_compress_func@Base 2.02
|
||||
_lzo1b_9_compress_func@Base 2.02
|
||||
_lzo1b_do_compress@Base 2.02
|
||||
_lzo1b_store_run@Base 2.02
|
||||
_lzo1c_1_compress_func@Base 2.02
|
||||
_lzo1c_2_compress_func@Base 2.02
|
||||
_lzo1c_3_compress_func@Base 2.02
|
||||
_lzo1c_4_compress_func@Base 2.02
|
||||
_lzo1c_5_compress_func@Base 2.02
|
||||
_lzo1c_6_compress_func@Base 2.02
|
||||
_lzo1c_7_compress_func@Base 2.02
|
||||
_lzo1c_8_compress_func@Base 2.02
|
||||
_lzo1c_99_compress_func@Base 2.02
|
||||
_lzo1c_9_compress_func@Base 2.02
|
||||
_lzo1c_do_compress@Base 2.02
|
||||
_lzo1c_store_run@Base 2.02
|
||||
_lzo_config_check@Base 2.02
|
||||
_lzo_version_date@Base 2.02
|
||||
_lzo_version_string@Base 2.02
|
||||
lzo1_99_compress@Base 2.02
|
||||
lzo1_compress@Base 2.02
|
||||
lzo1_decompress@Base 2.02
|
||||
lzo1_info@Base 2.02
|
||||
lzo1a_99_compress@Base 2.02
|
||||
lzo1a_compress@Base 2.02
|
||||
lzo1a_decompress@Base 2.02
|
||||
lzo1a_info@Base 2.02
|
||||
lzo1b_1_compress@Base 2.02
|
||||
lzo1b_2_compress@Base 2.02
|
||||
lzo1b_3_compress@Base 2.02
|
||||
lzo1b_4_compress@Base 2.02
|
||||
lzo1b_5_compress@Base 2.02
|
||||
lzo1b_6_compress@Base 2.02
|
||||
lzo1b_7_compress@Base 2.02
|
||||
lzo1b_8_compress@Base 2.02
|
||||
lzo1b_999_compress@Base 2.02
|
||||
lzo1b_999_compress_callback@Base 2.02
|
||||
lzo1b_99_compress@Base 2.02
|
||||
lzo1b_9_compress@Base 2.02
|
||||
lzo1b_compress@Base 2.02
|
||||
lzo1b_decompress@Base 2.02
|
||||
lzo1b_decompress_safe@Base 2.02
|
||||
lzo1c_1_compress@Base 2.02
|
||||
lzo1c_2_compress@Base 2.02
|
||||
lzo1c_3_compress@Base 2.02
|
||||
lzo1c_4_compress@Base 2.02
|
||||
lzo1c_5_compress@Base 2.02
|
||||
lzo1c_6_compress@Base 2.02
|
||||
lzo1c_7_compress@Base 2.02
|
||||
lzo1c_8_compress@Base 2.02
|
||||
lzo1c_999_compress@Base 2.02
|
||||
lzo1c_999_compress_callback@Base 2.02
|
||||
lzo1c_99_compress@Base 2.02
|
||||
lzo1c_9_compress@Base 2.02
|
||||
lzo1c_compress@Base 2.02
|
||||
lzo1c_decompress@Base 2.02
|
||||
lzo1c_decompress_safe@Base 2.02
|
||||
lzo1f_1_compress@Base 2.02
|
||||
lzo1f_999_compress@Base 2.02
|
||||
lzo1f_999_compress_callback@Base 2.02
|
||||
lzo1f_decompress@Base 2.02
|
||||
lzo1f_decompress_safe@Base 2.02
|
||||
lzo1x_1_11_compress@Base 2.02
|
||||
lzo1x_1_12_compress@Base 2.02
|
||||
lzo1x_1_15_compress@Base 2.02
|
||||
lzo1x_1_compress@Base 2.02
|
||||
lzo1x_999_compress@Base 2.02
|
||||
lzo1x_999_compress_dict@Base 2.02
|
||||
lzo1x_999_compress_internal@Base 2.02
|
||||
lzo1x_999_compress_level@Base 2.02
|
||||
lzo1x_decompress@Base 2.02
|
||||
lzo1x_decompress_dict_safe@Base 2.02
|
||||
lzo1x_decompress_safe@Base 2.02
|
||||
lzo1x_optimize@Base 2.02
|
||||
lzo1y_1_compress@Base 2.02
|
||||
lzo1y_999_compress@Base 2.02
|
||||
lzo1y_999_compress_dict@Base 2.02
|
||||
lzo1y_999_compress_internal@Base 2.02
|
||||
lzo1y_999_compress_level@Base 2.02
|
||||
lzo1y_decompress@Base 2.02
|
||||
lzo1y_decompress_dict_safe@Base 2.02
|
||||
lzo1y_decompress_safe@Base 2.02
|
||||
lzo1y_optimize@Base 2.02
|
||||
lzo1z_999_compress@Base 2.02
|
||||
lzo1z_999_compress_dict@Base 2.02
|
||||
lzo1z_999_compress_internal@Base 2.02
|
||||
lzo1z_999_compress_level@Base 2.02
|
||||
lzo1z_decompress@Base 2.02
|
||||
lzo1z_decompress_dict_safe@Base 2.02
|
||||
lzo1z_decompress_safe@Base 2.02
|
||||
lzo2a_999_compress@Base 2.02
|
||||
lzo2a_999_compress_callback@Base 2.02
|
||||
lzo2a_decompress@Base 2.02
|
||||
lzo2a_decompress_safe@Base 2.02
|
||||
lzo_adler32@Base 2.02
|
||||
lzo_copyright@Base 2.02
|
||||
lzo_crc32@Base 2.02
|
||||
lzo_get_crc32_table@Base 2.02
|
||||
lzo_memcmp@Base 2.02
|
||||
lzo_memcpy@Base 2.02
|
||||
lzo_memmove@Base 2.02
|
||||
lzo_memset@Base 2.02
|
||||
lzo_version@Base 2.02
|
||||
lzo_version_date@Base 2.02
|
||||
lzo_version_string@Base 2.02
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
AUTHORS
|
||||
THANKS
|
||||
doc/LZOAPI.TXT
|
||||
doc/LZO.FAQ
|
||||
doc/LZO.TXT
|
|
@ -0,0 +1,2 @@
|
|||
examples/*.c
|
||||
examples/*.h
|
|
@ -0,0 +1,5 @@
|
|||
usr/lib/*/*.a
|
||||
usr/lib/*/pkgconfig/*.pc
|
||||
usr/lib/*/*.so
|
||||
usr/include/
|
||||
usr/share/lzo/minilzo
|
364
debian/patches/0001-Conditionally-replace-reinvention-of-memcpy-with-cal.patch
vendored
Normal file
364
debian/patches/0001-Conditionally-replace-reinvention-of-memcpy-with-cal.patch
vendored
Normal file
|
@ -0,0 +1,364 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Sat, 20 Dec 2014 17:50:27 +0000
|
||||
Subject: Conditionally replace reinvention of memcpy() with calls to memcpy()
|
||||
|
||||
gcc already knows how to inline memcpy calls with constant n,
|
||||
and also gets the alignment constraints right, avoiding incorrect
|
||||
unaligned accesses on armel.
|
||||
|
||||
Unconditionally define LZO_MEMOPS_GET_NE64 since it's trivial
|
||||
to do in terms of LZO_MEMOPS_COPY8.
|
||||
|
||||
I've made the "modern C" version conditional since lzo seems to aim
|
||||
to be portable to anything and everything, but it would probably
|
||||
be better off just requiring a compiler from this century and
|
||||
a set of correctly working memwhatever() implementations.
|
||||
|
||||
Bug-Debian: https://bugs.debian.org/757037
|
||||
---
|
||||
minilzo/minilzo.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++---------
|
||||
src/lzo_conf.h | 2 --
|
||||
src/lzo_func.h | 71 +++++++++++++++++++++++++++++++++++++++++++--------
|
||||
3 files changed, 125 insertions(+), 24 deletions(-)
|
||||
|
||||
--- a/minilzo/minilzo.c
|
||||
+++ b/minilzo/minilzo.c
|
||||
@@ -3661,6 +3661,49 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
+/* Modern compilers know that memcpy() and memset() with constant n can be
|
||||
+ * inlined, and do so without violating alignment constraints on e.g. ARMv5,
|
||||
+ * unlike the macros below. */
|
||||
+#if LZO_CFG_MODERN_C+0
|
||||
+
|
||||
+/* ISO C says char pointers of any signedness can alias anything
|
||||
+ * (C11 draft 1570, paragraph 6.5.7) so they are safe for this use */
|
||||
+typedef unsigned char *lzo_memops_TU1p;
|
||||
+
|
||||
+/* Used by powerpc assembler implementations of byteswapping */
|
||||
+#if (LZO_OPT_UNALIGNED16)
|
||||
+typedef lzo_uint16_t __lzo_may_alias lzo_memops_TU2;
|
||||
+typedef lzo_memops_TU2 *lzo_memops_TU2p;
|
||||
+#endif
|
||||
+
|
||||
+/* Used by powerpc assembler implementations of byteswapping */
|
||||
+#if (LZO_OPT_UNALIGNED32)
|
||||
+typedef lzo_uint32_t __lzo_may_alias lzo_memops_TU4;
|
||||
+typedef lzo_memops_TU4 *lzo_memops_TU4p;
|
||||
+#endif
|
||||
+
|
||||
+#define LZO_MEMOPS_SET1(dd,cc) memset(dd, cc, 1)
|
||||
+#define LZO_MEMOPS_SET2(dd,cc) memset(dd, cc, 2)
|
||||
+#define LZO_MEMOPS_SET3(dd,cc) memset(dd, cc, 3)
|
||||
+#define LZO_MEMOPS_SET4(dd,cc) memset(dd, cc, 4)
|
||||
+/* lzo does not appear to use these macros between overlapping buffers
|
||||
+ * in practice, so memmove() (which is not inlined by gcc) is unnecessary. */
|
||||
+#define LZO_MEMOPS_MOVE1(dd,ss) memcpy(dd, ss, 1)
|
||||
+#define LZO_MEMOPS_MOVE2(dd,ss) memcpy(dd, ss, 2)
|
||||
+#define LZO_MEMOPS_MOVE3(dd,ss) memcpy(dd, ss, 3)
|
||||
+#define LZO_MEMOPS_MOVE4(dd,ss) memcpy(dd, ss, 4)
|
||||
+#define LZO_MEMOPS_MOVE8(dd,ss) memcpy(dd, ss, 8)
|
||||
+#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
|
||||
+#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
|
||||
+#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
|
||||
+#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
|
||||
+#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
|
||||
+
|
||||
+#else /* !LZO_CFG_MODERN_C */
|
||||
+
|
||||
+/* Standard C says a lot of this is undefined behaviour; maybe
|
||||
+ * you can get away with it in older compilers. */
|
||||
+
|
||||
#if defined(__lzo_alignof) && !(LZO_CFG_NO_UNALIGNED)
|
||||
#if !defined(lzo_memops_tcheck__) && 0
|
||||
#define lzo_memops_tcheck__(t,a,b) ((void)0, sizeof(t) == (a) && __lzo_alignof(t) == (b))
|
||||
@@ -3830,6 +3873,8 @@
|
||||
if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
|
||||
LZO_BLOCK_END
|
||||
|
||||
+#endif /* !LZO_CFG_MODERN_C */
|
||||
+
|
||||
__lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
|
||||
{
|
||||
lzo_uint16_t v;
|
||||
@@ -3846,7 +3891,7 @@
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_GET_LE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss))
|
||||
#else
|
||||
#define LZO_MEMOPS_GET_LE16(ss) lzo_memops_get_le16(ss)
|
||||
@@ -3868,13 +3913,13 @@
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_GET_LE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss))
|
||||
#else
|
||||
#define LZO_MEMOPS_GET_LE32(ss) lzo_memops_get_le32(ss)
|
||||
#endif
|
||||
|
||||
-#if (LZO_OPT_UNALIGNED64) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED64) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_GET_LE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss))
|
||||
#endif
|
||||
|
||||
@@ -3884,7 +3929,7 @@
|
||||
LZO_MEMOPS_COPY2(&v, ss);
|
||||
return v;
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED16)
|
||||
+#if (LZO_OPT_UNALIGNED16) && !(LZO_CFG_MODERN_C+0)
|
||||
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2)
|
||||
#define LZO_MEMOPS_GET_NE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss))
|
||||
#else
|
||||
@@ -3897,16 +3942,25 @@
|
||||
LZO_MEMOPS_COPY4(&v, ss);
|
||||
return v;
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED32)
|
||||
+#if (LZO_OPT_UNALIGNED32) && !(LZO_CFG_MODERN_C+0)
|
||||
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4)
|
||||
#define LZO_MEMOPS_GET_NE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss))
|
||||
#else
|
||||
#define LZO_MEMOPS_GET_NE32(ss) lzo_memops_get_ne32(ss)
|
||||
#endif
|
||||
|
||||
-#if (LZO_OPT_UNALIGNED64)
|
||||
+__lzo_static_forceinline lzo_uint64_t lzo_memops_get_ne64(const lzo_voidp ss)
|
||||
+{
|
||||
+ lzo_uint64_t v;
|
||||
+ LZO_MEMOPS_COPY8(&v, ss);
|
||||
+ return v;
|
||||
+}
|
||||
+
|
||||
+#if (LZO_OPT_UNALIGNED64) && !(LZO_CFG_MODERN_C+0)
|
||||
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
|
||||
#define LZO_MEMOPS_GET_NE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss))
|
||||
+#else
|
||||
+#define LZO_MEMOPS_GET_NE64(ss) lzo_memops_get_ne64(ss)
|
||||
#endif
|
||||
|
||||
__lzo_static_forceinline void lzo_memops_put_le16(lzo_voidp dd, lzo_uint16_t vv)
|
||||
@@ -3923,7 +3977,7 @@
|
||||
d[1] = LZO_BYTE((vv >> 8) & 0xff);
|
||||
#endif
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_PUT_LE16(dd,vv) (* (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = (vv))
|
||||
#else
|
||||
#define LZO_MEMOPS_PUT_LE16(dd,vv) lzo_memops_put_le16(dd,vv)
|
||||
@@ -3945,7 +3999,7 @@
|
||||
d[3] = LZO_BYTE((vv >> 24) & 0xff);
|
||||
#endif
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_PUT_LE32(dd,vv) (* (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = (vv))
|
||||
#else
|
||||
#define LZO_MEMOPS_PUT_LE32(dd,vv) lzo_memops_put_le32(dd,vv)
|
||||
@@ -3955,7 +4009,7 @@
|
||||
{
|
||||
LZO_MEMOPS_COPY2(dd, &vv);
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED16)
|
||||
+#if (LZO_OPT_UNALIGNED16) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_PUT_NE16(dd,vv) (* (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = (vv))
|
||||
#else
|
||||
#define LZO_MEMOPS_PUT_NE16(dd,vv) lzo_memops_put_ne16(dd,vv)
|
||||
@@ -3965,7 +4019,7 @@
|
||||
{
|
||||
LZO_MEMOPS_COPY4(dd, &vv);
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED32)
|
||||
+#if (LZO_OPT_UNALIGNED32) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_PUT_NE32(dd,vv) (* (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = (vv))
|
||||
#else
|
||||
#define LZO_MEMOPS_PUT_NE32(dd,vv) lzo_memops_put_ne32(dd,vv)
|
||||
@@ -4051,11 +4105,9 @@
|
||||
#ifndef UA_GET_NE32
|
||||
#define UA_GET_NE32 LZO_MEMOPS_GET_NE32
|
||||
#endif
|
||||
-#ifdef LZO_MEMOPS_GET_NE64
|
||||
#ifndef UA_GET_NE64
|
||||
#define UA_GET_NE64 LZO_MEMOPS_GET_NE64
|
||||
#endif
|
||||
-#endif
|
||||
#ifndef UA_PUT_LE16
|
||||
#define UA_PUT_LE16 LZO_MEMOPS_PUT_LE16
|
||||
#endif
|
||||
--- a/src/lzo_conf.h
|
||||
+++ b/src/lzo_conf.h
|
||||
@@ -362,11 +362,9 @@
|
||||
#ifndef UA_GET_NE32
|
||||
#define UA_GET_NE32 LZO_MEMOPS_GET_NE32
|
||||
#endif
|
||||
-#ifdef LZO_MEMOPS_GET_NE64
|
||||
#ifndef UA_GET_NE64
|
||||
#define UA_GET_NE64 LZO_MEMOPS_GET_NE64
|
||||
#endif
|
||||
-#endif
|
||||
#ifndef UA_PUT_LE16
|
||||
#define UA_PUT_LE16 LZO_MEMOPS_PUT_LE16
|
||||
#endif
|
||||
--- a/src/lzo_func.h
|
||||
+++ b/src/lzo_func.h
|
||||
@@ -162,6 +162,46 @@
|
||||
// memops
|
||||
************************************************************************/
|
||||
|
||||
+/* Modern compilers know that memcpy() and memset() with constant n can be
|
||||
+ * inlined, and do so without violating alignment constraints on e.g. ARMv5,
|
||||
+ * unlike the macros below. */
|
||||
+#if LZO_CFG_MODERN_C+0
|
||||
+
|
||||
+/* ISO C says char pointers of any signedness can alias anything
|
||||
+ * (C11 draft 1570, paragraph 6.5.7) so they are safe for this use */
|
||||
+typedef unsigned char *lzo_memops_TU1p;
|
||||
+
|
||||
+/* Used by powerpc assembler implementations of byteswapping */
|
||||
+#if (LZO_OPT_UNALIGNED16)
|
||||
+typedef lzo_uint16_t __lzo_may_alias lzo_memops_TU2;
|
||||
+typedef lzo_memops_TU2 *lzo_memops_TU2p;
|
||||
+#endif
|
||||
+
|
||||
+/* Used by powerpc assembler implementations of byteswapping */
|
||||
+#if (LZO_OPT_UNALIGNED32)
|
||||
+typedef lzo_uint32_t __lzo_may_alias lzo_memops_TU4;
|
||||
+typedef lzo_memops_TU4 *lzo_memops_TU4p;
|
||||
+#endif
|
||||
+
|
||||
+#define LZO_MEMOPS_SET1(dd,cc) memset(dd, cc, 1)
|
||||
+#define LZO_MEMOPS_SET2(dd,cc) memset(dd, cc, 2)
|
||||
+#define LZO_MEMOPS_SET3(dd,cc) memset(dd, cc, 3)
|
||||
+#define LZO_MEMOPS_SET4(dd,cc) memset(dd, cc, 4)
|
||||
+/* lzo does not appear to use these macros between overlapping buffers
|
||||
+ * in practice, so memmove() (which is not inlined by gcc) is unnecessary. */
|
||||
+#define LZO_MEMOPS_MOVE1(dd,ss) memcpy(dd, ss, 1)
|
||||
+#define LZO_MEMOPS_MOVE2(dd,ss) memcpy(dd, ss, 2)
|
||||
+#define LZO_MEMOPS_MOVE3(dd,ss) memcpy(dd, ss, 3)
|
||||
+#define LZO_MEMOPS_MOVE4(dd,ss) memcpy(dd, ss, 4)
|
||||
+#define LZO_MEMOPS_MOVE8(dd,ss) memcpy(dd, ss, 8)
|
||||
+#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
|
||||
+#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
|
||||
+#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
|
||||
+#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
|
||||
+#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
|
||||
+
|
||||
+#else /* !LZO_CFG_MODERN_C */
|
||||
+
|
||||
#if defined(__lzo_alignof) && !(LZO_CFG_NO_UNALIGNED)
|
||||
/* CBUG: disabled because of gcc bug 64516 */
|
||||
#if !defined(lzo_memops_tcheck__) && 0
|
||||
@@ -332,6 +372,8 @@
|
||||
if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
|
||||
LZO_BLOCK_END
|
||||
|
||||
+#endif /* !LZO_CFG_MODERN_C */
|
||||
+
|
||||
__lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
|
||||
{
|
||||
lzo_uint16_t v;
|
||||
@@ -348,7 +390,7 @@
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_GET_LE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss))
|
||||
#else
|
||||
#define LZO_MEMOPS_GET_LE16(ss) lzo_memops_get_le16(ss)
|
||||
@@ -370,13 +412,13 @@
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_GET_LE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss))
|
||||
#else
|
||||
#define LZO_MEMOPS_GET_LE32(ss) lzo_memops_get_le32(ss)
|
||||
#endif
|
||||
|
||||
-#if (LZO_OPT_UNALIGNED64) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED64) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_GET_LE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss))
|
||||
#endif
|
||||
|
||||
@@ -386,7 +428,7 @@
|
||||
LZO_MEMOPS_COPY2(&v, ss);
|
||||
return v;
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED16)
|
||||
+#if (LZO_OPT_UNALIGNED16) && !(LZO_CFG_MODERN_C+0)
|
||||
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2)
|
||||
#define LZO_MEMOPS_GET_NE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss))
|
||||
#else
|
||||
@@ -399,16 +441,25 @@
|
||||
LZO_MEMOPS_COPY4(&v, ss);
|
||||
return v;
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED32)
|
||||
+#if (LZO_OPT_UNALIGNED32) && !(LZO_CFG_MODERN_C+0)
|
||||
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4)
|
||||
#define LZO_MEMOPS_GET_NE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss))
|
||||
#else
|
||||
#define LZO_MEMOPS_GET_NE32(ss) lzo_memops_get_ne32(ss)
|
||||
#endif
|
||||
|
||||
-#if (LZO_OPT_UNALIGNED64)
|
||||
+__lzo_static_forceinline lzo_uint64_t lzo_memops_get_ne64(const lzo_voidp ss)
|
||||
+{
|
||||
+ lzo_uint64_t v;
|
||||
+ LZO_MEMOPS_COPY8(&v, ss);
|
||||
+ return v;
|
||||
+}
|
||||
+
|
||||
+#if (LZO_OPT_UNALIGNED64) && !(LZO_CFG_MODERN_C+0)
|
||||
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
|
||||
#define LZO_MEMOPS_GET_NE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss))
|
||||
+#else
|
||||
+#define LZO_MEMOPS_GET_NE64(ss) lzo_memops_get_ne64(ss)
|
||||
#endif
|
||||
|
||||
__lzo_static_forceinline void lzo_memops_put_le16(lzo_voidp dd, lzo_uint16_t vv)
|
||||
@@ -425,7 +476,7 @@
|
||||
d[1] = LZO_BYTE((vv >> 8) & 0xff);
|
||||
#endif
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_PUT_LE16(dd,vv) (* (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = (vv))
|
||||
#else
|
||||
#define LZO_MEMOPS_PUT_LE16(dd,vv) lzo_memops_put_le16(dd,vv)
|
||||
@@ -447,7 +498,7 @@
|
||||
d[3] = LZO_BYTE((vv >> 24) & 0xff);
|
||||
#endif
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN)
|
||||
+#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_PUT_LE32(dd,vv) (* (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = (vv))
|
||||
#else
|
||||
#define LZO_MEMOPS_PUT_LE32(dd,vv) lzo_memops_put_le32(dd,vv)
|
||||
@@ -457,7 +508,7 @@
|
||||
{
|
||||
LZO_MEMOPS_COPY2(dd, &vv);
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED16)
|
||||
+#if (LZO_OPT_UNALIGNED16) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_PUT_NE16(dd,vv) (* (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = (vv))
|
||||
#else
|
||||
#define LZO_MEMOPS_PUT_NE16(dd,vv) lzo_memops_put_ne16(dd,vv)
|
||||
@@ -467,7 +518,7 @@
|
||||
{
|
||||
LZO_MEMOPS_COPY4(dd, &vv);
|
||||
}
|
||||
-#if (LZO_OPT_UNALIGNED32)
|
||||
+#if (LZO_OPT_UNALIGNED32) && !(LZO_CFG_MODERN_C+0)
|
||||
#define LZO_MEMOPS_PUT_NE32(dd,vv) (* (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = (vv))
|
||||
#else
|
||||
#define LZO_MEMOPS_PUT_NE32(dd,vv) lzo_memops_put_ne32(dd,vv)
|
|
@ -0,0 +1 @@
|
|||
0001-Conditionally-replace-reinvention-of-memcpy-with-cal.patch
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export DEB_CPPFLAGS_MAINT_APPEND = -DLZO_CFG_MODERN_C=1
|
||||
|
||||
DEB_DESTDIR = $(CURDIR)/debian/tmp/
|
||||
|
||||
include /usr/share/dpkg/architecture.mk
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- --enable-shared
|
||||
|
||||
override_dh_auto_test:
|
||||
dh_auto_test -- check test
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install
|
||||
mkdir -p $(DEB_DESTDIR)/lib/$(DEB_HOST_MULTIARCH)
|
||||
mv $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/*.so.* $(DEB_DESTDIR)/lib/$(DEB_HOST_MULTIARCH)
|
||||
ln -sf /lib/$(DEB_HOST_MULTIARCH)/$$(basename $$(readlink $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/*.so)) $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/*.so
|
||||
mkdir -p $(DEB_DESTDIR)/usr/share/lzo/minilzo
|
||||
install -D -m 644 minilzo/README.LZO minilzo/minilzo.c minilzo/minilzo.h include/lzo/lzoconf.h include/lzo/lzodefs.h $(CURDIR)/debian/tmp/usr/share/lzo/minilzo
|
||||
|
||||
override_dh_installchangelogs:
|
||||
dh_installchangelogs NEWS
|
||||
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs --add-udeb=liblzo2-2-udeb
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
|
@ -0,0 +1,2 @@
|
|||
version=3
|
||||
https://www.oberhumer.com/opensource/lzo/download/lzo-([0-9].*).tar.gz debian uupdate
|
Loading…
Reference in New Issue