diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch new file mode 100644 index 000000000..db3a70e80 --- /dev/null +++ b/import-layers/yocto-poky/meta/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; |