diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-10-31 12:53:37 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-11-02 09:00:52 -0800 |
commit | bc83d3f088ec25f6e176231581ce385b2cb717ee (patch) | |
tree | 85f2ede56e1318d0b69da435dd321885e124f73a /meta-oe/recipes-extended/redis | |
parent | 8a5d7f28a02a18cd26749f7b97c1e85128fda720 (diff) | |
download | meta-openembedded-bc83d3f088ec25f6e176231581ce385b2cb717ee.tar.gz |
redis: Fix build on 32bit targets and clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/redis')
-rw-r--r-- | meta-oe/recipes-extended/redis/redis/ilp32.patch | 29 | ||||
-rw-r--r-- | meta-oe/recipes-extended/redis/redis_6.0.8.bb | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/redis/redis/ilp32.patch b/meta-oe/recipes-extended/redis/redis/ilp32.patch new file mode 100644 index 000000000..48d01a1d6 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/ilp32.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | __ILP32__ is defined for all 32bit architectures with clang e.g. | ||
2 | which is right but it is causing issues on non-x86 architectures | ||
3 | where this condition becomes true and wrongly starts using this | ||
4 | code, this issue is hidden with gcc becuase gcc does not define | ||
5 | __ILP32__ for all 32bit architectures but for selected 64bit arches | ||
6 | who choose to use 32bit ABI e.g. x32 | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- a/src/debug.c | ||
11 | +++ b/src/debug.c | ||
12 | @@ -944,7 +944,7 @@ static void *getMcontextEip(ucontext_t * | ||
13 | /* Linux */ | ||
14 | #if defined(__riscv) && __riscv_xlen == 32 | ||
15 | return (void*) uc->uc_mcontext.__gregs[REG_PC]; | ||
16 | - #elif defined(__i386__) || defined(__ILP32__) | ||
17 | + #elif defined(__i386__) || (defined(__X86_64__) && defined(__ILP32__)) | ||
18 | return (void*) uc->uc_mcontext.gregs[14]; /* Linux 32 */ | ||
19 | #elif defined(__X86_64__) || defined(__x86_64__) | ||
20 | return (void*) uc->uc_mcontext.gregs[16]; /* Linux 64 */ | ||
21 | @@ -1125,7 +1125,7 @@ void logRegisters(ucontext_t *uc) { | ||
22 | ); | ||
23 | logStackContent((void**)uc->uc_mcontext.__gregs[REG_SP]); | ||
24 | /* Linux x86 */ | ||
25 | - #elif defined(__i386__) || defined(__ILP32__) | ||
26 | + #elif defined(__i386__) || ( defined(__X86_64__) && defined(__ILP32__)) | ||
27 | serverLog(LL_WARNING, | ||
28 | "\n" | ||
29 | "EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n" | ||
diff --git a/meta-oe/recipes-extended/redis/redis_6.0.8.bb b/meta-oe/recipes-extended/redis/redis_6.0.8.bb index 546332851..14091b565 100644 --- a/meta-oe/recipes-extended/redis/redis_6.0.8.bb +++ b/meta-oe/recipes-extended/redis/redis_6.0.8.bb | |||
@@ -16,6 +16,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ | |||
16 | file://0001-src-Do-not-reset-FINAL_LIBS.patch \ | 16 | file://0001-src-Do-not-reset-FINAL_LIBS.patch \ |
17 | file://GNU_SOURCE.patch \ | 17 | file://GNU_SOURCE.patch \ |
18 | file://riscv32.patch \ | 18 | file://riscv32.patch \ |
19 | file://ilp32.patch \ | ||
19 | " | 20 | " |
20 | 21 | ||
21 | SRC_URI[md5sum] = "70113b4b8ea7ee4c7e148be62b5d1e0b" | 22 | SRC_URI[md5sum] = "70113b4b8ea7ee4c7e148be62b5d1e0b" |