summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/recipes-support/gdbm
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/recipes-support/gdbm')
-rw-r--r--external/poky/meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch47
-rw-r--r--external/poky/meta/recipes-support/gdbm/gdbm_1.18.1.bb (renamed from external/poky/meta/recipes-support/gdbm/gdbm_1.18.bb)7
2 files changed, 51 insertions, 3 deletions
diff --git a/external/poky/meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch b/external/poky/meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch
new file mode 100644
index 00000000..c1580418
--- /dev/null
+++ b/external/poky/meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch
@@ -0,0 +1,47 @@
+From f993697af81c37df9c55e0ebedeb1b8b880506ae Mon Sep 17 00:00:00 2001
+From: Richard Leitner <richard.leitner@skidata.com>
+Date: Tue, 5 May 2020 11:59:42 +0200
+Subject: [PATCH] gdbm: fix link failure against gcc-10
+
+Copied from gentoo's solution at https://bugs.gentoo.org/show_bug.cgi?id=705898
+Original patch by Sergei Trofimovich <slyfox@gentoo.org>
+
+Original description:
+
+Before the change on gcc-10 link failed as:
+```
+ CCLD gdbmtool
+ld: ./libgdbmapp.a(parseopt.o):(.bss+0x8): multiple definition of `parseopt_program_args';
+ gdbmtool.o:(.data.rel.local+0x260): first defined here
+ld: ./libgdbmapp.a(parseopt.o):(.bss+0x10): multiple definition of `parseopt_program_doc';
+ gdbmtool.o:(.data.rel.local+0x268): first defined here
+```
+
+gcc-10 will change the default from -fcommon to fno-common:
+ https://gcc.gnu.org/PR85678.
+
+The fix is to avoid multiple definition and rely on
+declarations only.
+
+Upstream-Status: Pending
+Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
+---
+ src/parseopt.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/parseopt.c b/src/parseopt.c
+index 268e080..a4c8576 100644
+--- a/src/parseopt.c
++++ b/src/parseopt.c
+@@ -255,8 +255,6 @@ print_option_descr (const char *descr, size_t lmargin, size_t rmargin)
+ }
+
+ char *parseopt_program_name;
+-char *parseopt_program_doc;
+-char *parseopt_program_args;
+ const char *program_bug_address = "<" PACKAGE_BUGREPORT ">";
+ void (*parseopt_help_hook) (FILE *stream);
+
+--
+2.26.2
+
diff --git a/external/poky/meta/recipes-support/gdbm/gdbm_1.18.bb b/external/poky/meta/recipes-support/gdbm/gdbm_1.18.1.bb
index aad43009..fbb1fe72 100644
--- a/external/poky/meta/recipes-support/gdbm/gdbm_1.18.bb
+++ b/external/poky/meta/recipes-support/gdbm/gdbm_1.18.1.bb
@@ -8,15 +8,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
file://run-ptest \
file://ptest.patch \
+ file://gdbm-fix-link-failure-against-gcc-10.patch \
"
-SRC_URI[md5sum] = "e316f8e4a3e7e4f23955be65d54fec48"
-SRC_URI[sha256sum] = "b8822cb4769e2d759c828c06f196614936c88c141c3132b18252fe25c2b635ce"
+SRC_URI[md5sum] = "988dc82182121c7570e0cb8b4fcd5415"
+SRC_URI[sha256sum] = "86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc"
inherit autotools gettext texinfo lib_package ptest
# Needed for dbm python module
-EXTRA_OECONF = "-enable-libgdbm-compat"
+EXTRA_OECONF = "--enable-libgdbm-compat --without-readline"
# Stop presence of dbm/nbdm on the host contaminating builds
CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"