summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-08-05 00:03:26 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-06 15:12:39 +0100
commit781e2a8d9542ccbc7aa230e10819961a8b3e25d4 (patch)
tree3169b22cd967817f2826b2b629b2bbcc93826947 /meta/recipes-extended
parenta5ba89ac4ba0506a680f1b187662e7a48383e1f4 (diff)
downloadpoky-781e2a8d9542ccbc7aa230e10819961a8b3e25d4.tar.gz
minicom: Fix build when using -fno-common
gcc10 defaults to -fno-common which flags the multiple global variables as errors, these patches ( from fedora ) fixes the issue (From OE-Core rev: d79177ab293063b176ded2566173c29d00360ad5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch35
-rw-r--r--meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch37
-rw-r--r--meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch42
-rw-r--r--meta/recipes-extended/minicom/minicom_2.7.1.bb3
4 files changed, 117 insertions, 0 deletions
diff --git a/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch b/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch
new file mode 100644
index 0000000000..4c6e249315
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch
@@ -0,0 +1,35 @@
1From b65152ebc03832972115e6d98e50cb6190d01793 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
3Date: Mon, 3 Feb 2020 13:18:13 +0100
4Subject: [PATCH 1/3] Drop superfluous global variable definitions
5
6The file minicom.c, by including the minicom.h header, already defines
7the global variables 'dial_user' and 'dial_pass'. The object file
8minicom.o is always linked to dial.o. Thus the definitions in dial.c
9can be dropped.
10
11This fixes linking with gcc 10 which uses -fno-common by default,
12disallowing multiple global variable definitions.
13
14Upstream-Status: Pending
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 src/dial.c | 2 --
18 1 file changed, 2 deletions(-)
19
20diff --git a/src/dial.c b/src/dial.c
21index eada5ee..d9d481f 100644
22--- a/src/dial.c
23+++ b/src/dial.c
24@@ -146,8 +146,6 @@ static int newtype;
25 /* Access to ".dialdir" denied? */
26 static int dendd = 0;
27 static char *tagged;
28-char *dial_user;
29-char *dial_pass;
30
31 /* Change the baud rate. Treat all characters in the given array as if
32 * they were key presses within the comm parameters dialog (C-A P) and
33--
342.24.1
35
diff --git a/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch b/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch
new file mode 100644
index 0000000000..1740051e0a
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch
@@ -0,0 +1,37 @@
1From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
3Date: Mon, 3 Feb 2020 13:18:33 +0100
4Subject: [PATCH 2/3] Drop superfluous global variable definitions
5
6The only place where the EXTERN macro mechanism is used to define the
7global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining
8an empty EXTERN macro and including the minicom.h header). The file
9vt100.c already defines these variables. The vt100.o object file is
10always linked to minicom.o. Thus it is safe not to define the
11variables in minicom.c and only declare them in the minicom.h header.
12
13This fixes linking with gcc 10 which uses -fno-common by default,
14disallowing multiple global variable definitions.
15
16Upstream-Status: Pending
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 src/minicom.h | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/src/minicom.h b/src/minicom.h
23index 061c013..0f9693b 100644
24--- a/src/minicom.h
25+++ b/src/minicom.h
26@@ -141,7 +141,7 @@ EXTERN int sbcolor; /* Status Bar Background Color */
27 EXTERN int st_attr; /* Status Bar attributes. */
28
29 /* jl 04.09.97 conversion tables */
30-EXTERN unsigned char vt_outmap[256], vt_inmap[256];
31+extern unsigned char vt_outmap[256], vt_inmap[256];
32
33 /* MARK updated 02/17/95 - history buffer */
34 EXTERN int num_hist_lines; /* History buffer size */
35--
362.24.1
37
diff --git a/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch b/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch
new file mode 100644
index 0000000000..58cd58eda8
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch
@@ -0,0 +1,42 @@
1From a4fc603b3641d2efe31479116eb7ba66932901c7 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
3Date: Mon, 3 Feb 2020 13:21:41 +0100
4Subject: [PATCH 3/3] Drop superfluous global variable definitions
5
6The only place where the EXTERN macro mechanism is used to define the
7global variables 'portfd_is_socket', 'portfd_is_connected' and
8'portfd_sock_addr' is minicom.c (by defining an empty EXTERN macro and
9including the minicom.h header). The source file sysdep1_s.c already
10defines these variables. The sysdep1_s.o object file is always linked
11to minicom.o. Thus it is safe to drop the definitions from minicom.c
12and only declare the variables in the minicom.h header.
13
14This fixes linking with gcc 10 which uses -fno-common by default,
15disallowing multiple global variable definitions.
16
17Upstream-Status: Pending
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 src/minicom.h | 6 +++---
21 1 file changed, 3 insertions(+), 3 deletions(-)
22
23diff --git a/src/minicom.h b/src/minicom.h
24index 0f9693b..1e7cb8c 100644
25--- a/src/minicom.h
26+++ b/src/minicom.h
27@@ -113,9 +113,9 @@ EXTERN char *dial_user; /* Our username there */
28 EXTERN char *dial_pass; /* Our password */
29
30 #ifdef USE_SOCKET
31-EXTERN int portfd_is_socket; /* File descriptor is a unix socket */
32-EXTERN int portfd_is_connected; /* 1 if the socket is connected */
33-EXTERN struct sockaddr_un portfd_sock_addr; /* the unix socket address */
34+extern int portfd_is_socket; /* File descriptor is a unix socket */
35+extern int portfd_is_connected; /* 1 if the socket is connected */
36+extern struct sockaddr_un portfd_sock_addr; /* the unix socket address */
37 #define portfd_connected ((portfd_is_socket && !portfd_is_connected) \
38 ? -1 : portfd)
39 #else
40--
412.24.1
42
diff --git a/meta/recipes-extended/minicom/minicom_2.7.1.bb b/meta/recipes-extended/minicom/minicom_2.7.1.bb
index 1e6f1317eb..03034864c8 100644
--- a/meta/recipes-extended/minicom/minicom_2.7.1.bb
+++ b/meta/recipes-extended/minicom/minicom_2.7.1.bb
@@ -11,6 +11,9 @@ SRC_URI = "${DEBIAN_MIRROR}/main/m/${BPN}/${BPN}_${PV}.orig.tar.gz \
11 file://allow.to.disable.lockdev.patch \ 11 file://allow.to.disable.lockdev.patch \
12 file://0001-fix-minicom-h-v-return-value-is-not-0.patch \ 12 file://0001-fix-minicom-h-v-return-value-is-not-0.patch \
13 file://0001-Fix-build-issus-surfaced-due-to-musl.patch \ 13 file://0001-Fix-build-issus-surfaced-due-to-musl.patch \
14 file://0001-Drop-superfluous-global-variable-definitions.patch \
15 file://0002-Drop-superfluous-global-variable-definitions.patch \
16 file://0003-Drop-superfluous-global-variable-definitions.patch \
14 " 17 "
15 18
16SRC_URI[md5sum] = "9021cb8c5445f6e6e74b2acc39962d62" 19SRC_URI[md5sum] = "9021cb8c5445f6e6e74b2acc39962d62"