summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2020-05-05 12:38:05 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-23 11:40:46 +0100
commitc7ec0a4121383c002b97c6e0dd4ea456307e0677 (patch)
treeb41f9998a1eff83cb7c0017629fcac30259016c5 /meta/recipes-support
parent4a283230f5d478a152cbe0d6cd1d5063b1d1629d (diff)
downloadpoky-c7ec0a4121383c002b97c6e0dd4ea456307e0677.tar.gz
gdbm: add patch to fix link failure against gcc 10
This also makes appending "-fcommon" to CFLAGS obsolete and enables native builds with a host gcc v10. (From OE-Core rev: b71ea7245a3d42ba96fb5a389f85049250bbc29e) Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7717b35265e6ef8ef71a4eca4074294dfcc2110c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch47
-rw-r--r--meta/recipes-support/gdbm/gdbm_1.18.1.bb3
2 files changed, 48 insertions, 2 deletions
diff --git a/meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch b/meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch
new file mode 100644
index 0000000000..c1580418dc
--- /dev/null
+++ b/meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch
@@ -0,0 +1,47 @@
1From f993697af81c37df9c55e0ebedeb1b8b880506ae Mon Sep 17 00:00:00 2001
2From: Richard Leitner <richard.leitner@skidata.com>
3Date: Tue, 5 May 2020 11:59:42 +0200
4Subject: [PATCH] gdbm: fix link failure against gcc-10
5
6Copied from gentoo's solution at https://bugs.gentoo.org/show_bug.cgi?id=705898
7Original patch by Sergei Trofimovich <slyfox@gentoo.org>
8
9Original description:
10
11Before the change on gcc-10 link failed as:
12```
13 CCLD gdbmtool
14ld: ./libgdbmapp.a(parseopt.o):(.bss+0x8): multiple definition of `parseopt_program_args';
15 gdbmtool.o:(.data.rel.local+0x260): first defined here
16ld: ./libgdbmapp.a(parseopt.o):(.bss+0x10): multiple definition of `parseopt_program_doc';
17 gdbmtool.o:(.data.rel.local+0x268): first defined here
18```
19
20gcc-10 will change the default from -fcommon to fno-common:
21 https://gcc.gnu.org/PR85678.
22
23The fix is to avoid multiple definition and rely on
24declarations only.
25
26Upstream-Status: Pending
27Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
28---
29 src/parseopt.c | 2 --
30 1 file changed, 2 deletions(-)
31
32diff --git a/src/parseopt.c b/src/parseopt.c
33index 268e080..a4c8576 100644
34--- a/src/parseopt.c
35+++ b/src/parseopt.c
36@@ -255,8 +255,6 @@ print_option_descr (const char *descr, size_t lmargin, size_t rmargin)
37 }
38
39 char *parseopt_program_name;
40-char *parseopt_program_doc;
41-char *parseopt_program_args;
42 const char *program_bug_address = "<" PACKAGE_BUGREPORT ">";
43 void (*parseopt_help_hook) (FILE *stream);
44
45--
462.26.2
47
diff --git a/meta/recipes-support/gdbm/gdbm_1.18.1.bb b/meta/recipes-support/gdbm/gdbm_1.18.1.bb
index 5cb7c558b8..fbb1fe72d7 100644
--- a/meta/recipes-support/gdbm/gdbm_1.18.1.bb
+++ b/meta/recipes-support/gdbm/gdbm_1.18.1.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
8SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \ 8SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
9 file://run-ptest \ 9 file://run-ptest \
10 file://ptest.patch \ 10 file://ptest.patch \
11 file://gdbm-fix-link-failure-against-gcc-10.patch \
11 " 12 "
12 13
13SRC_URI[md5sum] = "988dc82182121c7570e0cb8b4fcd5415" 14SRC_URI[md5sum] = "988dc82182121c7570e0cb8b4fcd5415"
@@ -23,8 +24,6 @@ CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
23 24
24BBCLASSEXTEND = "native nativesdk" 25BBCLASSEXTEND = "native nativesdk"
25 26
26CFLAGS += "-fcommon"
27
28do_install_append () { 27do_install_append () {
29 # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find 28 # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
30 # these headers 29 # these headers