diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-08-05 00:03:26 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-06 15:12:34 +0100 |
commit | d79177ab293063b176ded2566173c29d00360ad5 (patch) | |
tree | bf398d7557a2025dbc8e742fc8c48f1f925c7141 /meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch | |
parent | 227430916a3e50bec5741e00cb7f2dbc52a85eb3 (diff) | |
download | openembedded-core-contrib-d79177ab293063b176ded2566173c29d00360ad5.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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch')
-rw-r--r-- | meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch | 37 |
1 files changed, 37 insertions, 0 deletions
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 @@ +From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com> +Date: Mon, 3 Feb 2020 13:18:33 +0100 +Subject: [PATCH 2/3] Drop superfluous global variable definitions + +The only place where the EXTERN macro mechanism is used to define the +global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining +an empty EXTERN macro and including the minicom.h header). The file +vt100.c already defines these variables. The vt100.o object file is +always linked to minicom.o. Thus it is safe not to define the +variables in minicom.c and only declare them in the minicom.h header. + +This fixes linking with gcc 10 which uses -fno-common by default, +disallowing multiple global variable definitions. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/minicom.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/minicom.h b/src/minicom.h +index 061c013..0f9693b 100644 +--- a/src/minicom.h ++++ b/src/minicom.h +@@ -141,7 +141,7 @@ EXTERN int sbcolor; /* Status Bar Background Color */ + EXTERN int st_attr; /* Status Bar attributes. */ + + /* jl 04.09.97 conversion tables */ +-EXTERN unsigned char vt_outmap[256], vt_inmap[256]; ++extern unsigned char vt_outmap[256], vt_inmap[256]; + + /* MARK updated 02/17/95 - history buffer */ + EXTERN int num_hist_lines; /* History buffer size */ +-- +2.24.1 + |