diff options
-rw-r--r-- | meta-oe/recipes-extended/redis/redis/0005-Mark-extern-definition-of-SDS_NOINIT-in-sds.h.patch | 27 | ||||
-rw-r--r-- | meta-oe/recipes-extended/redis/redis/Fixed-stack-trace-generation-on-aarch64.patch | 45 | ||||
-rw-r--r-- | meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch | 19 | ||||
-rw-r--r-- | meta-oe/recipes-extended/redis/redis/remove-atomics.patch | 72 | ||||
-rw-r--r-- | meta-oe/recipes-extended/redis/redis_5.0.7.bb (renamed from meta-oe/recipes-extended/redis/redis_4.0.14.bb) | 23 |
5 files changed, 58 insertions, 128 deletions
diff --git a/meta-oe/recipes-extended/redis/redis/0005-Mark-extern-definition-of-SDS_NOINIT-in-sds.h.patch b/meta-oe/recipes-extended/redis/redis/0005-Mark-extern-definition-of-SDS_NOINIT-in-sds.h.patch new file mode 100644 index 0000000000..4675687c3f --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/0005-Mark-extern-definition-of-SDS_NOINIT-in-sds.h.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 7f7f710c8821b7254baeaf945ca3ca263b9845e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 21 Dec 2019 11:17:50 -0800 | ||
4 | Subject: [PATCH] Mark extern definition of SDS_NOINIT in sds.h | ||
5 | |||
6 | This helps avoiding multiple definition of this variable, its also | ||
7 | defined globally in sds.c | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/sds.h | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/sds.h b/src/sds.h | ||
16 | index 1bdb60d..adcc12c 100644 | ||
17 | --- a/src/sds.h | ||
18 | +++ b/src/sds.h | ||
19 | @@ -34,7 +34,7 @@ | ||
20 | #define __SDS_H | ||
21 | |||
22 | #define SDS_MAX_PREALLOC (1024*1024) | ||
23 | -const char *SDS_NOINIT; | ||
24 | +extern const char *SDS_NOINIT; | ||
25 | |||
26 | #include <sys/types.h> | ||
27 | #include <stdarg.h> | ||
diff --git a/meta-oe/recipes-extended/redis/redis/Fixed-stack-trace-generation-on-aarch64.patch b/meta-oe/recipes-extended/redis/redis/Fixed-stack-trace-generation-on-aarch64.patch deleted file mode 100644 index 82ca307391..0000000000 --- a/meta-oe/recipes-extended/redis/redis/Fixed-stack-trace-generation-on-aarch64.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From c8ca71d40bc51e255457cd4374dd45ec9ebf8ae1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jun He <jun.he@arm.com> | ||
3 | Date: Mon, 3 Jul 2017 07:18:32 +0000 | ||
4 | Subject: [PATCH] Fixed stack trace generation on aarch64 | ||
5 | |||
6 | Change-Id: I9801239c98cb7362ed07e8b9ec2ba7e45749dba7 | ||
7 | Signed-off-by: Jun He <jun.he@arm.com> | ||
8 | |||
9 | * fixes also this error when building with -Werror=return-type: | ||
10 | debug.c:698:1: error: no return statement in function returning non-void [-Werror=return-type] | ||
11 | |||
12 | Upstream-Status: Backport [https://github.com/antirez/redis/commit/c8ca71d40bc51e255457cd4374dd45ec9ebf8ae1] | ||
13 | |||
14 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
15 | --- | ||
16 | src/Makefile | 2 +- | ||
17 | src/debug.c | 2 ++ | ||
18 | 2 files changed, 3 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/src/Makefile b/src/Makefile | ||
21 | index 24e960593eb..a1ff4258a9d 100644 | ||
22 | --- a/src/Makefile | ||
23 | +++ b/src/Makefile | ||
24 | @@ -40,7 +40,7 @@ | ||
25 | endif | ||
26 | |||
27 | # To get ARM stack traces if Redis crashes we need a special C flag. | ||
28 | -ifneq (,$(findstring armv,$(uname_M))) | ||
29 | +ifneq (,$(filter aarch64 armv,$(uname_M))) | ||
30 | CFLAGS+=-funwind-tables | ||
31 | endif | ||
32 | |||
33 | diff --git a/src/debug.c b/src/debug.c | ||
34 | index a4caa49f285..c976d0ed919 100644 | ||
35 | --- a/src/debug.c | ||
36 | +++ b/src/debug.c | ||
37 | @@ -691,6 +691,8 @@ | ||
38 | return (void*) uc->uc_mcontext.sc_ip; | ||
39 | #elif defined(__arm__) /* Linux ARM */ | ||
40 | return (void*) uc->uc_mcontext.arm_pc; | ||
41 | + #elif defined(__aarch64__) /* Linux AArch64 */ | ||
42 | + return (void*) uc->uc_mcontext.pc; | ||
43 | #endif | ||
44 | #else | ||
45 | return NULL; | ||
diff --git a/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch b/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch new file mode 100644 index 0000000000..9a40d832f1 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER | ||
2 | |||
3 | Fixes | ||
4 | | zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function) | ||
5 | | 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; | ||
6 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- a/src/zmalloc.c | ||
11 | +++ b/src/zmalloc.c | ||
12 | @@ -28,6 +28,7 @@ | ||
13 | * POSSIBILITY OF SUCH DAMAGE. | ||
14 | */ | ||
15 | |||
16 | +#define _GNU_SOURCE | ||
17 | #include <stdio.h> | ||
18 | #include <stdlib.h> | ||
19 | #include <stdint.h> | ||
diff --git a/meta-oe/recipes-extended/redis/redis/remove-atomics.patch b/meta-oe/recipes-extended/redis/redis/remove-atomics.patch deleted file mode 100644 index 23b2f2aaf0..0000000000 --- a/meta-oe/recipes-extended/redis/redis/remove-atomics.patch +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | From c486455e0691f9915018b9d8b133200a6c61a3c5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Thu, 24 May 2018 09:58:42 -0700 | ||
4 | Subject: [PATCH] Remove atomics | ||
5 | |||
6 | Based on this patch: | ||
7 | https://github.com/patrikx3/lede-redis/blob/master/redis/patches/010-redis.patch | ||
8 | |||
9 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
10 | --- | ||
11 | deps/jemalloc/src/pages.c | 22 +--------------------- | ||
12 | src/atomicvar.h | 4 ++-- | ||
13 | 2 files changed, 3 insertions(+), 23 deletions(-) | ||
14 | |||
15 | diff --git a/deps/jemalloc/src/pages.c b/deps/jemalloc/src/pages.c | ||
16 | index 83a167f6..8e82c78d 100644 | ||
17 | --- a/deps/jemalloc/src/pages.c | ||
18 | +++ b/deps/jemalloc/src/pages.c | ||
19 | @@ -147,27 +147,7 @@ pages_purge(void *addr, size_t size) | ||
20 | { | ||
21 | bool unzeroed; | ||
22 | |||
23 | -#ifdef _WIN32 | ||
24 | - VirtualAlloc(addr, size, MEM_RESET, PAGE_READWRITE); | ||
25 | - unzeroed = true; | ||
26 | -#elif defined(JEMALLOC_HAVE_MADVISE) | ||
27 | -# ifdef JEMALLOC_PURGE_MADVISE_DONTNEED | ||
28 | -# define JEMALLOC_MADV_PURGE MADV_DONTNEED | ||
29 | -# define JEMALLOC_MADV_ZEROS true | ||
30 | -# elif defined(JEMALLOC_PURGE_MADVISE_FREE) | ||
31 | -# define JEMALLOC_MADV_PURGE MADV_FREE | ||
32 | -# define JEMALLOC_MADV_ZEROS false | ||
33 | -# else | ||
34 | -# error "No madvise(2) flag defined for purging unused dirty pages." | ||
35 | -# endif | ||
36 | - int err = madvise(addr, size, JEMALLOC_MADV_PURGE); | ||
37 | - unzeroed = (!JEMALLOC_MADV_ZEROS || err != 0); | ||
38 | -# undef JEMALLOC_MADV_PURGE | ||
39 | -# undef JEMALLOC_MADV_ZEROS | ||
40 | -#else | ||
41 | - /* Last resort no-op. */ | ||
42 | - unzeroed = true; | ||
43 | -#endif | ||
44 | + unzeroed = false; | ||
45 | return (unzeroed); | ||
46 | } | ||
47 | |||
48 | diff --git a/src/atomicvar.h b/src/atomicvar.h | ||
49 | index 84a5bbc5..f9b563c2 100644 | ||
50 | --- a/src/atomicvar.h | ||
51 | +++ b/src/atomicvar.h | ||
52 | @@ -68,7 +68,7 @@ | ||
53 | * is reported. */ | ||
54 | // #define __ATOMIC_VAR_FORCE_SYNC_MACROS | ||
55 | |||
56 | -#if !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__ATOMIC_RELAXED) && !defined(__sun) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057) | ||
57 | +#if defined(CONFIG_EDAC_ATOMIC_SCRUB) && !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__ATOMIC_RELAXED) && !defined(__sun) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057) | ||
58 | /* Implementation using __atomic macros. */ | ||
59 | |||
60 | #define atomicIncr(var,count) __atomic_add_fetch(&var,(count),__ATOMIC_RELAXED) | ||
61 | @@ -82,7 +82,7 @@ | ||
62 | #define atomicSet(var,value) __atomic_store_n(&var,value,__ATOMIC_RELAXED) | ||
63 | #define REDIS_ATOMIC_API "atomic-builtin" | ||
64 | |||
65 | -#elif defined(HAVE_ATOMIC) | ||
66 | +#elif defined(CONFIG_EDAC_ATOMIC_SCRUB) && defined(HAVE_ATOMIC) | ||
67 | /* Implementation using __sync macros. */ | ||
68 | |||
69 | #define atomicIncr(var,count) __sync_add_and_fetch(&var,(count)) | ||
70 | -- | ||
71 | 2.17.0 | ||
72 | |||
diff --git a/meta-oe/recipes-extended/redis/redis_4.0.14.bb b/meta-oe/recipes-extended/redis/redis_5.0.7.bb index 7dc6f97115..b91575552d 100644 --- a/meta-oe/recipes-extended/redis/redis_4.0.14.bb +++ b/meta-oe/recipes-extended/redis/redis_5.0.7.bb | |||
@@ -7,26 +7,27 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3c01b49fed4df1a79843688fa3f7b9d6" | |||
7 | DEPENDS = "readline lua ncurses" | 7 | DEPENDS = "readline lua ncurses" |
8 | 8 | ||
9 | SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ | 9 | SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ |
10 | file://redis.conf \ | ||
11 | file://init-redis-server \ | ||
12 | file://redis.service \ | ||
10 | file://hiredis-use-default-CC-if-it-is-set.patch \ | 13 | file://hiredis-use-default-CC-if-it-is-set.patch \ |
11 | file://lua-update-Makefile-to-use-environment-build-setting.patch \ | 14 | file://lua-update-Makefile-to-use-environment-build-setting.patch \ |
12 | file://oe-use-libc-malloc.patch \ | 15 | file://oe-use-libc-malloc.patch \ |
13 | file://Fixed-stack-trace-generation-on-aarch64.patch \ | ||
14 | file://0001-src-Do-not-reset-FINAL_LIBS.patch \ | 16 | file://0001-src-Do-not-reset-FINAL_LIBS.patch \ |
15 | file://redis.conf \ | 17 | file://0005-Mark-extern-definition-of-SDS_NOINIT-in-sds.h.patch \ |
16 | file://init-redis-server \ | 18 | file://GNU_SOURCE.patch \ |
17 | file://redis.service \ | 19 | " |
18 | " | ||
19 | 20 | ||
20 | SRC_URI_append_mips = " file://remove-atomics.patch" | 21 | SRC_URI[md5sum] = "612ec43075a888bc8b8a7dd8ccb2e0f7" |
21 | SRC_URI_append_arm = " file://remove-atomics.patch" | 22 | SRC_URI[sha256sum] = "61db74eabf6801f057fd24b590232f2f337d422280fd19486eca03be87d3a82b" |
22 | SRC_URI_append_powerpc = " file://remove-atomics.patch" | ||
23 | |||
24 | SRC_URI[md5sum] = "96ae20ffd68b9daee24b702b754d89f3" | ||
25 | SRC_URI[sha256sum] = "1e1e18420a86cfb285933123b04a82e1ebda20bfb0a289472745a087587e93a7" | ||
26 | 23 | ||
27 | inherit autotools-brokensep update-rc.d systemd useradd | 24 | inherit autotools-brokensep update-rc.d systemd useradd |
28 | 25 | ||
29 | FINAL_LIBS_x86_toolchain-clang = "-latomic" | 26 | FINAL_LIBS_x86_toolchain-clang = "-latomic" |
27 | FINAL_LIBS_mips = "-latomic" | ||
28 | FINAL_LIBS_arm = "-latomic" | ||
29 | FINAL_LIBS_powerpc = "-latomic" | ||
30 | |||
30 | export FINAL_LIBS | 31 | export FINAL_LIBS |
31 | 32 | ||
32 | USERADD_PACKAGES = "${PN}" | 33 | USERADD_PACKAGES = "${PN}" |