diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-09-10 20:40:10 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2019-10-05 07:45:32 -0700 |
commit | b3a244153414fa627b247dd29f95197fdaae69e1 (patch) | |
tree | b2bcbd15ceb0eb21785993cb003a09f0b3c283dc /meta-oe/recipes-extended/redis | |
parent | 6a98afe854907a6263ab5f08ccbc155943470c59 (diff) | |
download | meta-openembedded-b3a244153414fa627b247dd29f95197fdaae69e1.tar.gz |
redis: Fix build with clang/x86
Need to link with libatomics for 64bit atomics support
Fixes
i686-yoe-linux/i686-yoe-linux-ld: networking.o: in function `createClient':
| /usr/src/debug/redis/4.0.14-r0/redis-4.0.14/src/networking.c:103: undefined reference to `__atomic_fetch_add_8'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 2b49254d61ca817799a206cd022617854aa5bc0b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/redis')
-rw-r--r-- | meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch | 32 | ||||
-rw-r--r-- | meta-oe/recipes-extended/redis/redis_4.0.14.bb | 5 |
2 files changed, 36 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch b/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch new file mode 100644 index 000000000..04af15dd8 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 97584e1eb78dc18599534b47b6670c20c63f5ee2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 10 Sep 2019 20:04:26 -0700 | ||
4 | Subject: [PATCH] src: Do not reset FINAL_LIBS | ||
5 | |||
6 | This helps case where additional libraries are needed to be passed from | ||
7 | environment to get it going | ||
8 | |||
9 | e.g. -latomic is needed on clang/x86 to provide for 64bit atomics | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | src/Makefile | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/Makefile b/src/Makefile | ||
18 | index 7f7c625..c71dd3b 100644 | ||
19 | --- a/src/Makefile | ||
20 | +++ b/src/Makefile | ||
21 | @@ -66,7 +66,7 @@ endif | ||
22 | |||
23 | FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) | ||
24 | FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) | ||
25 | -FINAL_LIBS=-lm | ||
26 | +FINAL_LIBS+=-lm | ||
27 | DEBUG=-g -ggdb | ||
28 | |||
29 | ifeq ($(uname_S),SunOS) | ||
30 | -- | ||
31 | 2.23.0 | ||
32 | |||
diff --git a/meta-oe/recipes-extended/redis/redis_4.0.14.bb b/meta-oe/recipes-extended/redis/redis_4.0.14.bb index 5df5312a0..45ea29b70 100644 --- a/meta-oe/recipes-extended/redis/redis_4.0.14.bb +++ b/meta-oe/recipes-extended/redis/redis_4.0.14.bb | |||
@@ -11,6 +11,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ | |||
11 | file://lua-update-Makefile-to-use-environment-build-setting.patch \ | 11 | file://lua-update-Makefile-to-use-environment-build-setting.patch \ |
12 | file://oe-use-libc-malloc.patch \ | 12 | file://oe-use-libc-malloc.patch \ |
13 | file://Fixed-stack-trace-generation-on-aarch64.patch \ | 13 | file://Fixed-stack-trace-generation-on-aarch64.patch \ |
14 | file://0001-src-Do-not-reset-FINAL_LIBS.patch \ | ||
14 | file://redis.conf \ | 15 | file://redis.conf \ |
15 | file://init-redis-server \ | 16 | file://init-redis-server \ |
16 | file://redis.service \ | 17 | file://redis.service \ |
@@ -25,11 +26,13 @@ SRC_URI[sha256sum] = "1e1e18420a86cfb285933123b04a82e1ebda20bfb0a289472745a08758 | |||
25 | 26 | ||
26 | inherit autotools-brokensep update-rc.d systemd useradd | 27 | inherit autotools-brokensep update-rc.d systemd useradd |
27 | 28 | ||
29 | FINAL_LIBS_x86_toolchain-clang = "-latomic" | ||
30 | export FINAL_LIBS | ||
31 | |||
28 | USERADD_PACKAGES = "${PN}" | 32 | USERADD_PACKAGES = "${PN}" |
29 | USERADD_PARAM_${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" | 33 | USERADD_PARAM_${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" |
30 | GROUPADD_PARAM_${PN} = "--system redis" | 34 | GROUPADD_PARAM_${PN} = "--system redis" |
31 | 35 | ||
32 | |||
33 | REDIS_ON_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" | 36 | REDIS_ON_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" |
34 | 37 | ||
35 | do_compile_prepend() { | 38 | do_compile_prepend() { |