diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2015-03-26 14:39:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-15 18:12:40 +0100 |
commit | 5edbe941f9df2781f6baab8c89719fa42c57fd38 (patch) | |
tree | 3ac7b271c6a7e85b4f4538aefb03f28684972dd1 | |
parent | 66b63d921bae288a7b6beaee0ebc785dec9f753d (diff) | |
download | poky-5edbe941f9df2781f6baab8c89719fa42c57fd38.tar.gz |
lzop: Fix build using x32 ABI
When tries to build lzop using x32 ABI fails trying to get
FLAGS register that is 64-bit and destination variable is
32-bit size_t.
[YOCTO #7424]
(From OE-Core master rev: 6122c5e02b96ab786204d08b470177d824004d24)
(From OE-Core rev: 842558c5fb2ef0520b7a11516dc720694e5acf04)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch | 36 | ||||
-rw-r--r-- | meta/recipes-support/lzop/lzop_1.03.bb | 3 |
2 files changed, 38 insertions, 1 deletions
diff --git a/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch b/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch new file mode 100644 index 0000000000..527589f71c --- /dev/null +++ b/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Fix get of FLAGS register in x32 ABI, | ||
2 | |||
3 | x32 ABI requires to have 64-bit variable to store FLAGS register | ||
4 | instead of size_t that is 32-bit variable, this fix operand | ||
5 | type mismatch when try to pop previous pushf value. | ||
6 | |||
7 | Upstream-status: Submitted | ||
8 | |||
9 | Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> | ||
10 | |||
11 | Index: lzop-1.03/src/miniacc.h | ||
12 | =================================================================== | ||
13 | --- lzop-1.03.orig/src/miniacc.h | ||
14 | +++ lzop-1.03/src/miniacc.h | ||
15 | @@ -754,6 +754,9 @@ | ||
16 | #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) | ||
17 | # define ACC_ARCH_AMD64 1 | ||
18 | # define ACC_INFO_ARCH "amd64" | ||
19 | +# if defined(__ILP32__) | ||
20 | +# define ACC_ARCH_AMD64_X32 1 | ||
21 | +# endif | ||
22 | #elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) | ||
23 | # define ACC_ARCH_ARM 1 | ||
24 | # define ACC_ARCH_ARM_THUMB 1 | ||
25 | @@ -6787,7 +6790,11 @@ ACCLIB_PUBLIC_NOINLINE(void, acc_debug_n | ||
26 | ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query) (void) | ||
27 | { | ||
28 | #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) | ||
29 | +# if defined(ACC_ARCH_AMD64_X32) | ||
30 | + unsigned long long r; | ||
31 | +# else | ||
32 | size_t r; | ||
33 | +# endif | ||
34 | __asm__ __volatile__("pushf\n pop %0\n" : "=a" (r) : : __ACC_ASM_CLOBBER); | ||
35 | return (int)(r >> 18) & 1; | ||
36 | #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC) | ||
diff --git a/meta/recipes-support/lzop/lzop_1.03.bb b/meta/recipes-support/lzop/lzop_1.03.bb index abfc81cfb9..1fcd81df6c 100644 --- a/meta/recipes-support/lzop/lzop_1.03.bb +++ b/meta/recipes-support/lzop/lzop_1.03.bb | |||
@@ -12,7 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=dfeaf3dc4beef4f5a7bdbc35b197f39e \ | |||
12 | file://src/lzop.c;beginline=5;endline=21;md5=6797bd3ed0a1a49327b7ebf9366ebd86" | 12 | file://src/lzop.c;beginline=5;endline=21;md5=6797bd3ed0a1a49327b7ebf9366ebd86" |
13 | 13 | ||
14 | SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \ | 14 | SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \ |
15 | file://acinclude.m4" | 15 | file://acinclude.m4 \ |
16 | file://x32_abi_miniacc_h.patch " | ||
16 | SRC_URI[md5sum] = "006c5e27fb78cdd14a628fdfa5aa1905" | 17 | SRC_URI[md5sum] = "006c5e27fb78cdd14a628fdfa5aa1905" |
17 | SRC_URI[sha256sum] = "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9" | 18 | SRC_URI[sha256sum] = "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9" |
18 | 19 | ||