Source: lz4
Version: 0.0~r117-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: ppc64el
Dear Maintainer,
Currently lz4 package does not built on ppc64el due to that ppc64el is
identified as a big endian and 32 bit architecture, thus the tests fail.
I am providing a patch that fixes the problem. It is based on the William
Grant's patches entitled 'Fix __GLIBC__ endianness check to include
stdlib.h' plus changes to add the platform as 64 bits.
With the following patch, the tests run fine with the following result:
compression ratio: 48.824%
HC compression ratio: 38.515%
This patch was also sent upstream at
https://code.google.com/p/lz4/issues/detail?id=131&q=label%3APriority-minor
Thanks
Breno
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)
Kernel: Linux 3.13-1-powerpc64le (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Index: lz4-0.0~r117/lz4.c
===================================================================
--- lz4-0.0~r117.orig/lz4.c 2014-06-11 12:46:02.000000000 +0000
+++ lz4-0.0~r117/lz4.c 2014-06-11 12:48:00.000000000 +0000
@@ -56,7 +56,9 @@
**************************************/
/* 32 or 64 bits ? */
#if (defined(__x86_64__) || defined(_M_X64) || defined(_WIN64) \
- || defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) \
+ || defined(__powerpc64__) || defined(__powerpc64le__) \
+ || defined(__ppc64__) || defined(__ppc64le__) \
+ || defined(__PPC64__) || defined(__PPC64LE__) \
|| defined(__64BIT__) || defined(_LP64) || defined(__LP64__) \
|| defined(__ia64) || defined(__itanium__) || defined(_M_IA64) ) /* Detects 64 bits mode */
# define LZ4_ARCH64 1
@@ -68,6 +70,7 @@
* Little Endian or Big Endian ?
* Overwrite the #define below if you know your architecture endianess
*/
+#include <stdlib.h>
#if defined (__GLIBC__)
# include <endian.h>
# if (__BYTE_ORDER == __BIG_ENDIAN)
Index: lz4-0.0~r117/lz4hc.c
===================================================================
--- lz4-0.0~r117.orig/lz4hc.c 2014-06-11 12:46:02.000000000 +0000
+++ lz4-0.0~r117/lz4hc.c 2014-06-11 12:48:26.000000000 +0000
@@ -54,7 +54,9 @@
**************************************/
/* 32 or 64 bits ? */
#if (defined(__x86_64__) || defined(_M_X64) || defined(_WIN64) \
- || defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) \
+ || defined(__powerpc64__) || defined(__powerpc64le__) \
+ || defined(__ppc64__) || defined(__ppc64le__) \
+ || defined(__PPC64__) || defined(__PPC64LE__) \
|| defined(__64BIT__) || defined(_LP64) || defined(__LP64__) \
|| defined(__ia64) || defined(__itanium__) || defined(_M_IA64) ) /* Detects 64 bits mode */
# define LZ4_ARCH64 1
@@ -66,6 +68,7 @@
* Little Endian or Big Endian ?
* Overwrite the #define below if you know your architecture endianess
*/
+#include <stdlib.h>
#if defined (__GLIBC__)
# include <endian.h>
# if (__BYTE_ORDER == __BIG_ENDIAN)