All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] lzo: add (from oe-core)
@ 2022-05-24 15:24 Ross Burton
  2022-05-24 15:24 ` [PATCH 2/2] lzop: " Ross Burton
  2022-05-24 15:28 ` [oe] [PATCH 1/2] lzo: " Ross Burton
  0 siblings, 2 replies; 4+ messages in thread
From: Ross Burton @ 2022-05-24 15:24 UTC (permalink / raw)
  To: openembedded-devel; +Cc: nd

lzo is being removed from oe-core, so add it here for people who still
want to use it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 ...onfigdir-to-solve-the-undefine-error.patch | 27 +++++++
 ...Use-memcpy-instead-of-reinventing-it.patch | 70 +++++++++++++++++++
 meta-oe/recipes-support/lzo/lzo/run-ptest     | 33 +++++++++
 meta-oe/recipes-support/lzo/lzo_2.10.bb       | 35 ++++++++++
 4 files changed, 165 insertions(+)
 create mode 100644 meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
 create mode 100644 meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
 create mode 100644 meta-oe/recipes-support/lzo/lzo/run-ptest
 create mode 100644 meta-oe/recipes-support/lzo/lzo_2.10.bb

diff --git a/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch b/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
new file mode 100644
index 0000000000..5235a15dc9
--- /dev/null
+++ b/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
@@ -0,0 +1,27 @@
+From e730bfd7c2d3a4b5f3605878599cb9b20d31b1fd Mon Sep 17 00:00:00 2001
+From: Fan Xin <fan.xin@jp.fujitsu.com>
+Date: Fri, 2 Jun 2017 11:52:25 +0900
+Subject: [PATCH] Add pkgconfigdir to solve the undefine error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index e4d383b..c75023d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -14,6 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)
+ LDADD = src/liblzo2.la
+ lib_LTLIBRARIES =
+ noinst_PROGRAMS =
++pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = lzo2.pc
+ 
+ 
+-- 
+1.9.1
+
diff --git a/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
new file mode 100644
index 0000000000..db3a70e803
--- /dev/null
+++ b/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
@@ -0,0 +1,70 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Sun, 23 Nov 2014 22:50:33 +0000
+Subject: Use memcpy() instead of reinventing it
+
+gcc inlines memcpy() with results as fast as handwritten code (at
+least in my brief testing with lzop), and knows the alignment
+constraints for our architectures.
+
+Change suggested by Julian Taylor.
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757037
+
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ minilzo/minilzo.c | 14 ++++++++++++++
+ src/lzo_func.h    | 14 ++++++++++++++
+ 2 files changed, 28 insertions(+)
+
+
+diff --git a/minilzo/minilzo.c b/minilzo/minilzo.c
+index ab2be5f..6913c2f 100644
+--- a/minilzo/minilzo.c
++++ b/minilzo/minilzo.c
+@@ -3523,6 +3523,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
+     if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
+     LZO_BLOCK_END
+ 
++/* Debian-specific change: we know that our compiler inlines memcpy() with
++ * constant n to be as fast as handwritten code, and knows which architectures
++ * need things correctly aligned. */
++#undef LZO_MEMOPS_COPY1
++#undef LZO_MEMOPS_COPY2
++#undef LZO_MEMOPS_COPY4
++#undef LZO_MEMOPS_COPY8
++#undef LZO_MEMOPS_COPYN
++#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)
++
+ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
+ {
+     lzo_uint16_t v;
+diff --git a/src/lzo_func.h b/src/lzo_func.h
+index dfaa676..1cc1b53 100644
+--- a/src/lzo_func.h
++++ b/src/lzo_func.h
+@@ -333,6 +333,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
+     if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
+     LZO_BLOCK_END
+ 
++/* Debian-specific change: we know that our compiler inlines memcpy() with
++ * constant n to be as fast as handwritten code, and knows which architectures
++ * need things correctly aligned. */
++#undef LZO_MEMOPS_COPY1
++#undef LZO_MEMOPS_COPY2
++#undef LZO_MEMOPS_COPY4
++#undef LZO_MEMOPS_COPY8
++#undef LZO_MEMOPS_COPYN
++#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)
++
+ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
+ {
+     lzo_uint16_t v;
diff --git a/meta-oe/recipes-support/lzo/lzo/run-ptest b/meta-oe/recipes-support/lzo/lzo/run-ptest
new file mode 100644
index 0000000000..6acb89fc1f
--- /dev/null
+++ b/meta-oe/recipes-support/lzo/lzo/run-ptest
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+./lzotest -mavail -n10 -q /etc/services
+if [ $? -eq 0 ]; then
+  echo 'PASS: lzotest'
+else
+  echo 'FAIL: lzotest'
+fi
+LZOTEST=./lzotest /bin/sh -e "./check.sh" "/etc"
+./align
+if [ $? -eq 0 ]; then
+  echo 'PASS: align'
+else
+  echo 'FAIL: align'
+fi
+./chksum
+if [ $? -eq 0 ]; then
+  echo 'PASS: chksum'
+else
+  echo 'FAIL: chksum'
+fi
+./simple
+if [ $? -eq 0 ]; then
+  echo 'PASS: simple'
+else
+  echo 'FAIL: simple'
+fi
+./testmini
+if [ $? -eq 0 ]; then
+  echo 'PASS: testmini'
+else
+  echo 'FAIL: testmini'
+fi
diff --git a/meta-oe/recipes-support/lzo/lzo_2.10.bb b/meta-oe/recipes-support/lzo/lzo_2.10.bb
new file mode 100644
index 0000000000..195c2f2939
--- /dev/null
+++ b/meta-oe/recipes-support/lzo/lzo_2.10.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Lossless data compression library"
+DESCRIPTION = "A portable lossless data compression library written in \
+ANSI C that offers pretty fast compression and *extremely* fast decompression. "
+HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
+SECTION = "libs"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://src/lzo_init.c;beginline=5;endline=25;md5=9ae697ca01829b0a383c5d2d163e0108"
+
+SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
+           file://0001-Use-memcpy-instead-of-reinventing-it.patch \
+	   file://0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch \
+           file://run-ptest \
+           "
+
+SRC_URI[md5sum] = "39d3f3f9c55c87b1e5d6888e1420f4b5"
+SRC_URI[sha256sum] = "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072"
+
+inherit autotools ptest
+
+CVE_PRODUCT = "lzo oberhumer:lzo2"
+
+EXTRA_OECONF = "--enable-shared"
+
+do_install_ptest() {
+	t=${D}${PTEST_PATH}
+	cp ${S}/util/check.sh $t
+	cp ${B}/minilzo/testmini $t
+	for i in tests/align tests/chksum lzotest/lzotest examples/simple
+		do cp ${B}/`dirname $i`/.libs/`basename $i` $t; \
+	done
+}
+
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] lzop: add (from oe-core)
  2022-05-24 15:24 [PATCH 1/2] lzo: add (from oe-core) Ross Burton
@ 2022-05-24 15:24 ` Ross Burton
  2022-05-24 15:28 ` [oe] [PATCH 1/2] lzo: " Ross Burton
  1 sibling, 0 replies; 4+ messages in thread
From: Ross Burton @ 2022-05-24 15:24 UTC (permalink / raw)
  To: openembedded-devel; +Cc: nd

lzop is being removed from oe-core, so add it here for people who still
want to use it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../recipes-support/lzop/lzop/acinclude.m4    | 390 ++++++++++++++++++
 meta-oe/recipes-support/lzop/lzop_1.04.bb     |  27 ++
 2 files changed, 417 insertions(+)
 create mode 100644 meta-oe/recipes-support/lzop/lzop/acinclude.m4
 create mode 100644 meta-oe/recipes-support/lzop/lzop_1.04.bb

diff --git a/meta-oe/recipes-support/lzop/lzop/acinclude.m4 b/meta-oe/recipes-support/lzop/lzop/acinclude.m4
new file mode 100644
index 0000000000..0029c19c7d
--- /dev/null
+++ b/meta-oe/recipes-support/lzop/lzop/acinclude.m4
@@ -0,0 +1,390 @@
+
+AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
+AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
+])#
+
+AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
+AC_HEADER_TIME
+AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
+])#
+
+AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
+AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
+])#
+
+
+AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(__int16)
+AC_CHECK_SIZEOF(__int32)
+AC_CHECK_SIZEOF(__int64)
+
+AC_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(ptrdiff_t)
+])#
+
+
+# /***********************************************************************
+# // Check for ACC_conformance
+# ************************************************************************/
+
+AC_DEFUN([mfx_ACC_ACCCHK], [
+mfx_tmp=$1
+mfx_save_CPPFLAGS=$CPPFLAGS
+dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
+
+AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
+
+AC_LANG_CONFTEST([AC_LANG_PROGRAM(
+[[#define ACC_CONFIG_NO_HEADER 1
+#include "acc/acc.h"
+#include "acc/acc_incd.h"
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
+#include "acc/acc_chk.ch"
+#undef ACCCHK_ASSERT
+static void test_acc_compile_time_assert(void) {
+#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
+#include "acc/acc_chk.ch"
+#undef ACCCHK_ASSERT
+}
+#undef NDEBUG
+#include <assert.h>
+static int test_acc_run_time_assert(int r) {
+#define ACCCHK_ASSERT(expr)     assert(expr);
+#include "acc/acc_chk.ch"
+#undef ACCCHK_ASSERT
+return r;
+}
+]], [[
+test_acc_compile_time_assert();
+if (test_acc_run_time_assert(1) != 1) return 1;
+]]
+)])
+
+mfx_tmp=FAILED
+_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
+rm -f conftest.$ac_ext conftest.$ac_objext
+
+CPPFLAGS=$mfx_save_CPPFLAGS
+
+AC_MSG_RESULT([$mfx_tmp])
+case x$mfx_tmp in
+  xpassed | xyes) ;;
+  *)
+    AC_MSG_NOTICE([])
+    AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
+    AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
+    AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
+    AC_MSG_NOTICE([Thanks for your support.])
+    AC_MSG_NOTICE([])
+    AC_MSG_ERROR([ACC conformance test failed. Stop.])
+dnl    AS_EXIT
+    ;;
+esac
+])# mfx_ACC_ACCCHK
+
+
+# /***********************************************************************
+# // Check for ACC_conformance
+# ************************************************************************/
+
+AC_DEFUN([mfx_MINIACC_ACCCHK], [
+mfx_tmp=$1
+mfx_save_CPPFLAGS=$CPPFLAGS
+dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
+
+AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
+
+AC_LANG_CONFTEST([AC_LANG_PROGRAM(
+[[#define ACC_CONFIG_NO_HEADER 1
+#define ACC_WANT_ACC_INCD_H 1
+#include $2
+
+#define ACC_WANT_ACC_CHK_CH 1
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
+#include $2
+
+#define ACC_WANT_ACC_CHK_CH 1
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
+static void test_acc_compile_time_assert(void) {
+#include $2
+}
+
+#undef NDEBUG
+#include <assert.h>
+#define ACC_WANT_ACC_CHK_CH 1
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr)  assert(expr);
+static int test_acc_run_time_assert(int r) {
+#include $2
+return r;
+}
+]], [[
+test_acc_compile_time_assert();
+if (test_acc_run_time_assert(1) != 1) return 1;
+]]
+)])
+
+mfx_tmp=FAILED
+_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
+rm -f conftest.$ac_ext conftest.$ac_objext
+
+CPPFLAGS=$mfx_save_CPPFLAGS
+
+AC_MSG_RESULT([$mfx_tmp])
+case x$mfx_tmp in
+  xpassed | xyes) ;;
+  *)
+    AC_MSG_NOTICE([])
+    AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
+    AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
+    AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
+    AC_MSG_NOTICE([Thanks for your support.])
+    AC_MSG_NOTICE([])
+    AC_MSG_ERROR([ACC conformance test failed. Stop.])
+dnl    AS_EXIT
+    ;;
+esac
+])# mfx_MINIACC_ACCCHK
+
+
+
+# serial 1
+
+AC_DEFUN([mfx_PROG_CPPFLAGS], [
+AC_MSG_CHECKING([whether the C preprocessor needs special flags])
+
+AC_LANG_CONFTEST([AC_LANG_PROGRAM(
+[[#include <limits.h>
+#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
+#  include "your C preprocessor is broken 1"
+#elif (0xffffu == 0xfffffffful)
+#  include "your C preprocessor is broken 2"
+#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
+#  include "your C preprocessor is broken 3"
+#endif
+]], [[ ]]
+)])
+
+mfx_save_CPPFLAGS=$CPPFLAGS
+mfx_tmp=ERROR
+for mfx_arg in "" -no-cpp-precomp
+do
+  CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
+  _AC_COMPILE_IFELSE([],
+[mfx_tmp=$mfx_arg
+break])
+done
+CPPFLAGS=$mfx_save_CPPFLAGS
+rm -f conftest.$ac_ext conftest.$ac_objext
+case x$mfx_tmp in
+  x)
+    AC_MSG_RESULT([none needed]) ;;
+  xERROR)
+    AC_MSG_RESULT([ERROR])
+    AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
+    ;;
+  *)
+    AC_MSG_RESULT([$mfx_tmp])
+    CPPFLAGS="$mfx_tmp $CPPFLAGS"
+    ;;
+esac
+])# mfx_PROG_CPPFLAGS
+
+
+
+# serial 3
+
+AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
+AC_CACHE_CHECK([whether limits.h is sane],
+mfx_cv_header_sane_limits_h,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
+#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
+#  if defined(__APPLE__) && defined(__GNUC__)
+#    error "your preprocessor is broken - use compiler option -no-cpp-precomp"
+#  else
+#    include "your preprocessor is broken"
+#  endif
+#endif
+#define MFX_0xffff          0xffff
+#define MFX_0xffffffffL     4294967295ul
+#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
+#  include "error CHAR_BIT"
+#endif
+#if !defined(UCHAR_MAX)
+#  include "error UCHAR_MAX 1"
+#endif
+#if !defined(USHRT_MAX)
+#  include "error USHRT_MAX 1"
+#endif
+#if !defined(UINT_MAX)
+#  include "error UINT_MAX 1"
+#endif
+#if !defined(ULONG_MAX)
+#  include "error ULONG_MAX 1"
+#endif
+#if !defined(SHRT_MAX)
+#  include "error SHRT_MAX 1"
+#endif
+#if !defined(INT_MAX)
+#  include "error INT_MAX 1"
+#endif
+#if !defined(LONG_MAX)
+#  include "error LONG_MAX 1"
+#endif
+#if (UCHAR_MAX < 1)
+#  include "error UCHAR_MAX 2"
+#endif
+#if (USHRT_MAX < 1)
+#  include "error USHRT_MAX 2"
+#endif
+#if (UINT_MAX < 1)
+#  include "error UINT_MAX 2"
+#endif
+#if (ULONG_MAX < 1)
+#  include "error ULONG_MAX 2"
+#endif
+#if (UCHAR_MAX < 0xff)
+#  include "error UCHAR_MAX 3"
+#endif
+#if (USHRT_MAX < MFX_0xffff)
+#  include "error USHRT_MAX 3"
+#endif
+#if (UINT_MAX < MFX_0xffff)
+#  include "error UINT_MAX 3"
+#endif
+#if (ULONG_MAX < MFX_0xffffffffL)
+#  include "error ULONG_MAX 3"
+#endif
+#if (USHRT_MAX > UINT_MAX)
+#  include "error USHRT_MAX vs UINT_MAX"
+#endif
+#if (UINT_MAX > ULONG_MAX)
+#  include "error UINT_MAX vs ULONG_MAX"
+#endif
+]], [[
+#if (USHRT_MAX == MFX_0xffff)
+{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
+#elif (USHRT_MAX >= MFX_0xffff)
+{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
+#endif
+#if (UINT_MAX == MFX_0xffff)
+{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
+#elif (UINT_MAX >= MFX_0xffff)
+{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
+#endif
+#if (ULONG_MAX == MFX_0xffff)
+{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
+#elif (ULONG_MAX >= MFX_0xffff)
+{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
+#endif
+#if (USHRT_MAX == MFX_0xffffffffL)
+{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
+#elif (USHRT_MAX >= MFX_0xffffffffL)
+{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
+#endif
+#if (UINT_MAX == MFX_0xffffffffL)
+{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
+#elif (UINT_MAX >= MFX_0xffffffffL)
+{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
+#endif
+#if (ULONG_MAX == MFX_0xffffffffL)
+{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
+#elif (ULONG_MAX >= MFX_0xffffffffL)
+{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
+#endif
+]])],
+[mfx_cv_header_sane_limits_h=yes],
+[mfx_cv_header_sane_limits_h=no])])
+])
+
+# /***********************************************************************
+# // standard
+# ************************************************************************/
+
+AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
+AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
+])#
+
+
+# /***********************************************************************
+# //
+# ************************************************************************/
+
+dnl more types which are not yet covered by ACC
+
+AC_DEFUN([mfx_CHECK_SIZEOF], [
+AC_CHECK_SIZEOF(__int32)
+AC_CHECK_SIZEOF(intmax_t)
+AC_CHECK_SIZEOF(uintmax_t)
+AC_CHECK_SIZEOF(intptr_t)
+AC_CHECK_SIZEOF(uintptr_t)
+
+AC_CHECK_SIZEOF(float)
+AC_CHECK_SIZEOF(double)
+AC_CHECK_SIZEOF(long double)
+
+AC_CHECK_SIZEOF(dev_t)
+AC_CHECK_SIZEOF(fpos_t)
+AC_CHECK_SIZEOF(mode_t)
+AC_CHECK_SIZEOF(off_t)
+AC_CHECK_SIZEOF(ssize_t)
+AC_CHECK_SIZEOF(time_t)
+])#
+
+
+
+AC_DEFUN([mfx_CHECK_LIB_WINMM], [
+if test "X$GCC" = Xyes; then
+case $host_os in
+cygwin* | mingw* | pw32*)
+     test "X$LIBS" != "X" && LIBS="$LIBS "
+     LIBS="${LIBS}-lwinmm" ;;
+*)
+     ;;
+esac
+fi
+])#
+
+#serial 6
+
+dnl From Paul Eggert.
+
+# Define ST_MTIM_NSEC to be the nanoseconds member of struct stat's st_mtim,
+# if it exists.
+
+AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
+ [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim],
+   ac_cv_struct_st_mtim_nsec,
+   [ac_save_CPPFLAGS="$CPPFLAGS"
+    ac_cv_struct_st_mtim_nsec=no
+    # tv_nsec -- the usual case
+    # _tv_nsec -- Solaris 2.6, if
+    #	(defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
+    #	 && !defined __EXTENSIONS__)
+    # st__tim.tv_nsec -- UnixWare 2.1.2
+    for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
+      CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
+      AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
+        [ac_cv_struct_st_mtim_nsec=$ac_val; break])
+    done
+    CPPFLAGS="$ac_save_CPPFLAGS"])
+
+  if test $ac_cv_struct_st_mtim_nsec != no; then
+    AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec,
+      [Define to be the nanoseconds member of struct stat's st_mtim,
+       if it exists.])
+  fi
+ ]
+)
diff --git a/meta-oe/recipes-support/lzop/lzop_1.04.bb b/meta-oe/recipes-support/lzop/lzop_1.04.bb
new file mode 100644
index 0000000000..d9b3524b67
--- /dev/null
+++ b/meta-oe/recipes-support/lzop/lzop_1.04.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Real-time file compressor"
+DESCRIPTION = "lzop is a compression utility which is designed to be a companion to gzip. \n\
+It is based on the LZO data compression library and its main advantages over \n\
+gzip are much higher compression and decompression speed at the cost of some \n\
+compression ratio. The lzop compression utility was designed with the goals \n\
+of reliability, speed, portability and with reasonable drop-in compatibility \n\
+to gzip."
+HOMEPAGE = "http://www.lzop.org/"
+DEPENDS += "lzo"
+
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://src/lzop.c;beginline=5;endline=21;md5=23d767de7754eb24b9e900b025cf7fc8"
+
+SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \
+           file://acinclude.m4 \
+          "
+SRC_URI[md5sum] = "271eb10fde77a0a96b9cbf745e719ddf"
+SRC_URI[sha256sum] = "7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41"
+
+inherit autotools
+
+do_configure:prepend () {
+    install -Dm 0644 ${WORKDIR}/acinclude.m4 ${S}/acinclude.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [oe] [PATCH 1/2] lzo: add (from oe-core)
  2022-05-24 15:24 [PATCH 1/2] lzo: add (from oe-core) Ross Burton
  2022-05-24 15:24 ` [PATCH 2/2] lzop: " Ross Burton
@ 2022-05-24 15:28 ` Ross Burton
  2022-05-24 15:34   ` Khem Raj
  1 sibling, 1 reply; 4+ messages in thread
From: Ross Burton @ 2022-05-24 15:28 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-devel, nd

Obviously, don’t merge this until the recipes are removed from oe-core.

Ross

> On 24 May 2022, at 16:24, Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote:
> 
> lzo is being removed from oe-core, so add it here for people who still
> want to use it.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> ...onfigdir-to-solve-the-undefine-error.patch | 27 +++++++
> ...Use-memcpy-instead-of-reinventing-it.patch | 70 +++++++++++++++++++
> meta-oe/recipes-support/lzo/lzo/run-ptest     | 33 +++++++++
> meta-oe/recipes-support/lzo/lzo_2.10.bb       | 35 ++++++++++
> 4 files changed, 165 insertions(+)
> create mode 100644 meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
> create mode 100644 meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
> create mode 100644 meta-oe/recipes-support/lzo/lzo/run-ptest
> create mode 100644 meta-oe/recipes-support/lzo/lzo_2.10.bb
> 
> diff --git a/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch b/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
> new file mode 100644
> index 0000000000..5235a15dc9
> --- /dev/null
> +++ b/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
> @@ -0,0 +1,27 @@
> +From e730bfd7c2d3a4b5f3605878599cb9b20d31b1fd Mon Sep 17 00:00:00 2001
> +From: Fan Xin <fan.xin@jp.fujitsu.com>
> +Date: Fri, 2 Jun 2017 11:52:25 +0900
> +Subject: [PATCH] Add pkgconfigdir to solve the undefine error.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
> +---
> + Makefile.am | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index e4d383b..c75023d 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -14,6 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)
> + LDADD = src/liblzo2.la
> + lib_LTLIBRARIES =
> + noinst_PROGRAMS =
> ++pkgconfigdir = $(libdir)/pkgconfig
> + pkgconfig_DATA = lzo2.pc
> + 
> + 
> +-- 
> +1.9.1
> +
> diff --git a/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
> new file mode 100644
> index 0000000000..db3a70e803
> --- /dev/null
> +++ b/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
> @@ -0,0 +1,70 @@
> +From: Simon McVittie <smcv@debian.org>
> +Date: Sun, 23 Nov 2014 22:50:33 +0000
> +Subject: Use memcpy() instead of reinventing it
> +
> +gcc inlines memcpy() with results as fast as handwritten code (at
> +least in my brief testing with lzop), and knows the alignment
> +constraints for our architectures.
> +
> +Change suggested by Julian Taylor.
> +
> +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757037
> +
> +Upstream-Status: Pending
> +Signed-off-by: Saul Wold <sgw@linux.intel.com>
> +---
> + minilzo/minilzo.c | 14 ++++++++++++++
> + src/lzo_func.h    | 14 ++++++++++++++
> + 2 files changed, 28 insertions(+)
> +
> +
> +diff --git a/minilzo/minilzo.c b/minilzo/minilzo.c
> +index ab2be5f..6913c2f 100644
> +--- a/minilzo/minilzo.c
> ++++ b/minilzo/minilzo.c
> +@@ -3523,6 +3523,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
> +     if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
> +     LZO_BLOCK_END
> + 
> ++/* Debian-specific change: we know that our compiler inlines memcpy() with
> ++ * constant n to be as fast as handwritten code, and knows which architectures
> ++ * need things correctly aligned. */
> ++#undef LZO_MEMOPS_COPY1
> ++#undef LZO_MEMOPS_COPY2
> ++#undef LZO_MEMOPS_COPY4
> ++#undef LZO_MEMOPS_COPY8
> ++#undef LZO_MEMOPS_COPYN
> ++#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)
> ++
> + __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
> + {
> +     lzo_uint16_t v;
> +diff --git a/src/lzo_func.h b/src/lzo_func.h
> +index dfaa676..1cc1b53 100644
> +--- a/src/lzo_func.h
> ++++ b/src/lzo_func.h
> +@@ -333,6 +333,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
> +     if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
> +     LZO_BLOCK_END
> + 
> ++/* Debian-specific change: we know that our compiler inlines memcpy() with
> ++ * constant n to be as fast as handwritten code, and knows which architectures
> ++ * need things correctly aligned. */
> ++#undef LZO_MEMOPS_COPY1
> ++#undef LZO_MEMOPS_COPY2
> ++#undef LZO_MEMOPS_COPY4
> ++#undef LZO_MEMOPS_COPY8
> ++#undef LZO_MEMOPS_COPYN
> ++#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)
> ++
> + __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
> + {
> +     lzo_uint16_t v;
> diff --git a/meta-oe/recipes-support/lzo/lzo/run-ptest b/meta-oe/recipes-support/lzo/lzo/run-ptest
> new file mode 100644
> index 0000000000..6acb89fc1f
> --- /dev/null
> +++ b/meta-oe/recipes-support/lzo/lzo/run-ptest
> @@ -0,0 +1,33 @@
> +#!/bin/sh
> +
> +./lzotest -mavail -n10 -q /etc/services
> +if [ $? -eq 0 ]; then
> +  echo 'PASS: lzotest'
> +else
> +  echo 'FAIL: lzotest'
> +fi
> +LZOTEST=./lzotest /bin/sh -e "./check.sh" "/etc"
> +./align
> +if [ $? -eq 0 ]; then
> +  echo 'PASS: align'
> +else
> +  echo 'FAIL: align'
> +fi
> +./chksum
> +if [ $? -eq 0 ]; then
> +  echo 'PASS: chksum'
> +else
> +  echo 'FAIL: chksum'
> +fi
> +./simple
> +if [ $? -eq 0 ]; then
> +  echo 'PASS: simple'
> +else
> +  echo 'FAIL: simple'
> +fi
> +./testmini
> +if [ $? -eq 0 ]; then
> +  echo 'PASS: testmini'
> +else
> +  echo 'FAIL: testmini'
> +fi
> diff --git a/meta-oe/recipes-support/lzo/lzo_2.10.bb b/meta-oe/recipes-support/lzo/lzo_2.10.bb
> new file mode 100644
> index 0000000000..195c2f2939
> --- /dev/null
> +++ b/meta-oe/recipes-support/lzo/lzo_2.10.bb
> @@ -0,0 +1,35 @@
> +SUMMARY = "Lossless data compression library"
> +DESCRIPTION = "A portable lossless data compression library written in \
> +ANSI C that offers pretty fast compression and *extremely* fast decompression. "
> +HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
> +SECTION = "libs"
> +LICENSE = "GPL-2.0-or-later"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> +                    file://src/lzo_init.c;beginline=5;endline=25;md5=9ae697ca01829b0a383c5d2d163e0108"
> +
> +SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
> +           file://0001-Use-memcpy-instead-of-reinventing-it.patch \
> +	   file://0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch \
> +           file://run-ptest \
> +           "
> +
> +SRC_URI[md5sum] = "39d3f3f9c55c87b1e5d6888e1420f4b5"
> +SRC_URI[sha256sum] = "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072"
> +
> +inherit autotools ptest
> +
> +CVE_PRODUCT = "lzo oberhumer:lzo2"
> +
> +EXTRA_OECONF = "--enable-shared"
> +
> +do_install_ptest() {
> +	t=${D}${PTEST_PATH}
> +	cp ${S}/util/check.sh $t
> +	cp ${B}/minilzo/testmini $t
> +	for i in tests/align tests/chksum lzotest/lzotest examples/simple
> +		do cp ${B}/`dirname $i`/.libs/`basename $i` $t; \
> +	done
> +}
> +
> +
> +BBCLASSEXTEND = "native nativesdk"
> -- 
> 2.25.1
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#97253): https://lists.openembedded.org/g/openembedded-devel/message/97253
> Mute This Topic: https://lists.openembedded.org/mt/91313396/6875888
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ross.burton@arm.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe] [PATCH 1/2] lzo: add (from oe-core)
  2022-05-24 15:28 ` [oe] [PATCH 1/2] lzo: " Ross Burton
@ 2022-05-24 15:34   ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2022-05-24 15:34 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-devel, nd

Thanks. I have seen the relevant patches in core.

On Tue, May 24, 2022 at 8:29 AM Ross Burton <ross.burton@arm.com> wrote:
>
> Obviously, don’t merge this until the recipes are removed from oe-core.
>
> Ross
>
> > On 24 May 2022, at 16:24, Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote:
> >
> > lzo is being removed from oe-core, so add it here for people who still
> > want to use it.
> >
> > Signed-off-by: Ross Burton <ross.burton@arm.com>
> > ---
> > ...onfigdir-to-solve-the-undefine-error.patch | 27 +++++++
> > ...Use-memcpy-instead-of-reinventing-it.patch | 70 +++++++++++++++++++
> > meta-oe/recipes-support/lzo/lzo/run-ptest     | 33 +++++++++
> > meta-oe/recipes-support/lzo/lzo_2.10.bb       | 35 ++++++++++
> > 4 files changed, 165 insertions(+)
> > create mode 100644 meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
> > create mode 100644 meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
> > create mode 100644 meta-oe/recipes-support/lzo/lzo/run-ptest
> > create mode 100644 meta-oe/recipes-support/lzo/lzo_2.10.bb
> >
> > diff --git a/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch b/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
> > new file mode 100644
> > index 0000000000..5235a15dc9
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
> > @@ -0,0 +1,27 @@
> > +From e730bfd7c2d3a4b5f3605878599cb9b20d31b1fd Mon Sep 17 00:00:00 2001
> > +From: Fan Xin <fan.xin@jp.fujitsu.com>
> > +Date: Fri, 2 Jun 2017 11:52:25 +0900
> > +Subject: [PATCH] Add pkgconfigdir to solve the undefine error.
> > +
> > +Upstream-Status: Pending
> > +
> > +Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
> > +---
> > + Makefile.am | 1 +
> > + 1 file changed, 1 insertion(+)
> > +
> > +diff --git a/Makefile.am b/Makefile.am
> > +index e4d383b..c75023d 100644
> > +--- a/Makefile.am
> > ++++ b/Makefile.am
> > +@@ -14,6 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)
> > + LDADD = src/liblzo2.la
> > + lib_LTLIBRARIES =
> > + noinst_PROGRAMS =
> > ++pkgconfigdir = $(libdir)/pkgconfig
> > + pkgconfig_DATA = lzo2.pc
> > +
> > +
> > +--
> > +1.9.1
> > +
> > diff --git a/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
> > new file mode 100644
> > index 0000000000..db3a70e803
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
> > @@ -0,0 +1,70 @@
> > +From: Simon McVittie <smcv@debian.org>
> > +Date: Sun, 23 Nov 2014 22:50:33 +0000
> > +Subject: Use memcpy() instead of reinventing it
> > +
> > +gcc inlines memcpy() with results as fast as handwritten code (at
> > +least in my brief testing with lzop), and knows the alignment
> > +constraints for our architectures.
> > +
> > +Change suggested by Julian Taylor.
> > +
> > +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757037
> > +
> > +Upstream-Status: Pending
> > +Signed-off-by: Saul Wold <sgw@linux.intel.com>
> > +---
> > + minilzo/minilzo.c | 14 ++++++++++++++
> > + src/lzo_func.h    | 14 ++++++++++++++
> > + 2 files changed, 28 insertions(+)
> > +
> > +
> > +diff --git a/minilzo/minilzo.c b/minilzo/minilzo.c
> > +index ab2be5f..6913c2f 100644
> > +--- a/minilzo/minilzo.c
> > ++++ b/minilzo/minilzo.c
> > +@@ -3523,6 +3523,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
> > +     if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
> > +     LZO_BLOCK_END
> > +
> > ++/* Debian-specific change: we know that our compiler inlines memcpy() with
> > ++ * constant n to be as fast as handwritten code, and knows which architectures
> > ++ * need things correctly aligned. */
> > ++#undef LZO_MEMOPS_COPY1
> > ++#undef LZO_MEMOPS_COPY2
> > ++#undef LZO_MEMOPS_COPY4
> > ++#undef LZO_MEMOPS_COPY8
> > ++#undef LZO_MEMOPS_COPYN
> > ++#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)
> > ++
> > + __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
> > + {
> > +     lzo_uint16_t v;
> > +diff --git a/src/lzo_func.h b/src/lzo_func.h
> > +index dfaa676..1cc1b53 100644
> > +--- a/src/lzo_func.h
> > ++++ b/src/lzo_func.h
> > +@@ -333,6 +333,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
> > +     if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
> > +     LZO_BLOCK_END
> > +
> > ++/* Debian-specific change: we know that our compiler inlines memcpy() with
> > ++ * constant n to be as fast as handwritten code, and knows which architectures
> > ++ * need things correctly aligned. */
> > ++#undef LZO_MEMOPS_COPY1
> > ++#undef LZO_MEMOPS_COPY2
> > ++#undef LZO_MEMOPS_COPY4
> > ++#undef LZO_MEMOPS_COPY8
> > ++#undef LZO_MEMOPS_COPYN
> > ++#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)
> > ++
> > + __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
> > + {
> > +     lzo_uint16_t v;
> > diff --git a/meta-oe/recipes-support/lzo/lzo/run-ptest b/meta-oe/recipes-support/lzo/lzo/run-ptest
> > new file mode 100644
> > index 0000000000..6acb89fc1f
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/lzo/lzo/run-ptest
> > @@ -0,0 +1,33 @@
> > +#!/bin/sh
> > +
> > +./lzotest -mavail -n10 -q /etc/services
> > +if [ $? -eq 0 ]; then
> > +  echo 'PASS: lzotest'
> > +else
> > +  echo 'FAIL: lzotest'
> > +fi
> > +LZOTEST=./lzotest /bin/sh -e "./check.sh" "/etc"
> > +./align
> > +if [ $? -eq 0 ]; then
> > +  echo 'PASS: align'
> > +else
> > +  echo 'FAIL: align'
> > +fi
> > +./chksum
> > +if [ $? -eq 0 ]; then
> > +  echo 'PASS: chksum'
> > +else
> > +  echo 'FAIL: chksum'
> > +fi
> > +./simple
> > +if [ $? -eq 0 ]; then
> > +  echo 'PASS: simple'
> > +else
> > +  echo 'FAIL: simple'
> > +fi
> > +./testmini
> > +if [ $? -eq 0 ]; then
> > +  echo 'PASS: testmini'
> > +else
> > +  echo 'FAIL: testmini'
> > +fi
> > diff --git a/meta-oe/recipes-support/lzo/lzo_2.10.bb b/meta-oe/recipes-support/lzo/lzo_2.10.bb
> > new file mode 100644
> > index 0000000000..195c2f2939
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/lzo/lzo_2.10.bb
> > @@ -0,0 +1,35 @@
> > +SUMMARY = "Lossless data compression library"
> > +DESCRIPTION = "A portable lossless data compression library written in \
> > +ANSI C that offers pretty fast compression and *extremely* fast decompression. "
> > +HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
> > +SECTION = "libs"
> > +LICENSE = "GPL-2.0-or-later"
> > +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> > +                    file://src/lzo_init.c;beginline=5;endline=25;md5=9ae697ca01829b0a383c5d2d163e0108"
> > +
> > +SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
> > +           file://0001-Use-memcpy-instead-of-reinventing-it.patch \
> > +        file://0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch \
> > +           file://run-ptest \
> > +           "
> > +
> > +SRC_URI[md5sum] = "39d3f3f9c55c87b1e5d6888e1420f4b5"
> > +SRC_URI[sha256sum] = "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072"
> > +
> > +inherit autotools ptest
> > +
> > +CVE_PRODUCT = "lzo oberhumer:lzo2"
> > +
> > +EXTRA_OECONF = "--enable-shared"
> > +
> > +do_install_ptest() {
> > +     t=${D}${PTEST_PATH}
> > +     cp ${S}/util/check.sh $t
> > +     cp ${B}/minilzo/testmini $t
> > +     for i in tests/align tests/chksum lzotest/lzotest examples/simple
> > +             do cp ${B}/`dirname $i`/.libs/`basename $i` $t; \
> > +     done
> > +}
> > +
> > +
> > +BBCLASSEXTEND = "native nativesdk"
> > --
> > 2.25.1
> >
> >
> >
> >
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#97255): https://lists.openembedded.org/g/openembedded-devel/message/97255
> Mute This Topic: https://lists.openembedded.org/mt/91313396/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-24 15:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24 15:24 [PATCH 1/2] lzo: add (from oe-core) Ross Burton
2022-05-24 15:24 ` [PATCH 2/2] lzop: " Ross Burton
2022-05-24 15:28 ` [oe] [PATCH 1/2] lzo: " Ross Burton
2022-05-24 15:34   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.