diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2020-08-31 22:26:22 -0700 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-09-02 16:32:25 -0400 |
commit | 8e51aa87401679ccb425e580b59f02518b98baf8 (patch) | |
tree | 4a336273376ae3693c48111150f73cff406bb963 | |
parent | b2d9ac6d709a34a24dac89e1d03af456efb8adc5 (diff) | |
download | meta-cloud-services-8e51aa87401679ccb425e580b59f02518b98baf8.tar.gz |
glusterfs: backport patch to fix failure for gcc-10
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-extended/glusterfs/files/0001-cli-duplicate-defns-of-cli_default_conn_timeout-and-.patch | 106 | ||||
-rw-r--r-- | recipes-extended/glusterfs/glusterfs.inc | 1 |
2 files changed, 107 insertions, 0 deletions
diff --git a/recipes-extended/glusterfs/files/0001-cli-duplicate-defns-of-cli_default_conn_timeout-and-.patch b/recipes-extended/glusterfs/files/0001-cli-duplicate-defns-of-cli_default_conn_timeout-and-.patch new file mode 100644 index 0000000..79a55b3 --- /dev/null +++ b/recipes-extended/glusterfs/files/0001-cli-duplicate-defns-of-cli_default_conn_timeout-and-.patch | |||
@@ -0,0 +1,106 @@ | |||
1 | From f66bd85af09397300ad434655fc68861f48c2e3c Mon Sep 17 00:00:00 2001 | ||
2 | From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com> | ||
3 | Date: Thu, 2 Jan 2020 07:46:23 -0500 | ||
4 | Subject: [PATCH] cli: duplicate defns of cli_default_conn_timeout and | ||
5 | cli_ten_minutes_timeout | ||
6 | |||
7 | Winter is coming. So is gcc-10. | ||
8 | |||
9 | Compiling with gcc-10-20191219 snapshot reveals dupe defns of | ||
10 | cli_default_conn_timeout and cli_ten_minutes_timeout in | ||
11 | .../cli/src/cli.[ch] due to missing extern decl. | ||
12 | |||
13 | There are many changes coming in gcc-10 described in | ||
14 | https://gcc.gnu.org/gcc-10/changes.html | ||
15 | |||
16 | compiling cli.c with gcc-9 we see: | ||
17 | ... | ||
18 | .quad .LC88 | ||
19 | .comm cli_ten_minutes_timeout,4,4 | ||
20 | .comm cli_default_conn_timeout,4,4 | ||
21 | .text | ||
22 | .Letext0: | ||
23 | ... | ||
24 | |||
25 | and with gcc-10: | ||
26 | ... | ||
27 | .quad .LC88 | ||
28 | .globl cli_ten_minutes_timeout | ||
29 | .bss | ||
30 | .align 4 | ||
31 | .type cli_ten_minutes_timeout, @object | ||
32 | .size cli_ten_minutes_timeout, 4 | ||
33 | cli_ten_minutes_timeout: | ||
34 | .zero 4 | ||
35 | .globl cli_default_conn_timeout | ||
36 | .align 4 | ||
37 | .type cli_default_conn_timeout, @object | ||
38 | .size cli_default_conn_timeout, 4 | ||
39 | cli_default_conn_timeout: | ||
40 | .zero 4 | ||
41 | .text | ||
42 | .Letext0: | ||
43 | ... | ||
44 | |||
45 | which is reflected in the .o file as (gcc-9): | ||
46 | ... | ||
47 | 0000000000000004 C cli_ten_minutes_timeout | ||
48 | 0000000000000004 C cli_default_conn_timeout | ||
49 | ... | ||
50 | |||
51 | and (gcc-10): | ||
52 | ... | ||
53 | 0000000000000020 B cli_ten_minutes_timeout | ||
54 | 0000000000000024 B cli_default_conn_timeout | ||
55 | ... | ||
56 | |||
57 | See nm(1) and ld(1) for a description C (common) and B (BSS) and how | ||
58 | they are treated by the linker. | ||
59 | |||
60 | Note: there is still a small chance that gcc-10 will land in Fedora-32, | ||
61 | despite 31 Dec. 2019 having been the deadline for that to happen. | ||
62 | |||
63 | Change-Id: I54ea485736a4910254eeb21222ad263721cdef3c | ||
64 | Fixes: bz#1193929 | ||
65 | Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> | ||
66 | |||
67 | Upstream-Status: Backport [https://review.gluster.org/#/c/glusterfs/+/23956/] | ||
68 | |||
69 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
70 | --- | ||
71 | cli/src/cli.c | 3 +++ | ||
72 | cli/src/cli.h | 4 ++-- | ||
73 | 2 files changed, 5 insertions(+), 2 deletions(-) | ||
74 | |||
75 | diff --git a/cli/src/cli.c b/cli/src/cli.c | ||
76 | index cb425c84b..2c96b7ae6 100644 | ||
77 | --- a/cli/src/cli.c | ||
78 | +++ b/cli/src/cli.c | ||
79 | @@ -84,6 +84,9 @@ rpc_clnt_prog_t *cli_rpc_prog; | ||
80 | |||
81 | extern struct rpc_clnt_program cli_prog; | ||
82 | |||
83 | +int cli_default_conn_timeout = 120; | ||
84 | +int cli_ten_minutes_timeout = 600; | ||
85 | + | ||
86 | static int | ||
87 | glusterfs_ctx_defaults_init(glusterfs_ctx_t *ctx) | ||
88 | { | ||
89 | diff --git a/cli/src/cli.h b/cli/src/cli.h | ||
90 | index 81f75a0b4..cd4db3dac 100644 | ||
91 | --- a/cli/src/cli.h | ||
92 | +++ b/cli/src/cli.h | ||
93 | @@ -40,8 +40,8 @@ enum argp_option_keys { | ||
94 | ARGP_PORT_KEY = 'p', | ||
95 | }; | ||
96 | |||
97 | -int cli_default_conn_timeout; | ||
98 | -int cli_ten_minutes_timeout; | ||
99 | +extern int cli_default_conn_timeout; | ||
100 | +extern int cli_ten_minutes_timeout; | ||
101 | |||
102 | typedef enum { | ||
103 | COLD_BRICK_COUNT, | ||
104 | -- | ||
105 | 2.21.0 | ||
106 | |||
diff --git a/recipes-extended/glusterfs/glusterfs.inc b/recipes-extended/glusterfs/glusterfs.inc index a567784..81ea65e 100644 --- a/recipes-extended/glusterfs/glusterfs.inc +++ b/recipes-extended/glusterfs/glusterfs.inc | |||
@@ -19,6 +19,7 @@ SRC_URI += "file://glusterd.init \ | |||
19 | file://libglusterfs-Don-t-link-against-libfl.patch \ | 19 | file://libglusterfs-Don-t-link-against-libfl.patch \ |
20 | file://glusterd-change-port-range.patch \ | 20 | file://glusterd-change-port-range.patch \ |
21 | file://configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch \ | 21 | file://configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch \ |
22 | file://0001-cli-duplicate-defns-of-cli_default_conn_timeout-and-.patch \ | ||
22 | " | 23 | " |
23 | 24 | ||
24 | LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0" | 25 | LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0" |