* [PATCH v2] gdbm: add patch to fix link failure against gcc 10
@ 2020-05-05 10:37 Richard Leitner
2020-05-05 11:02 ` ✗ patchtest: failure for gdbm: add patch to fix link failure against gcc 10 (rev2) Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Richard Leitner @ 2020-05-05 10:37 UTC (permalink / raw)
To: openembedded-core; +Cc: Richard Leitner
This also makes appending "-fcommon" to CFLAGS obsolete and enables
native builds with a host gcc v10.
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
---
...gdbm-fix-link-failure-against-gcc-10.patch | 46 +++++++++++++++++++
meta/recipes-support/gdbm/gdbm_1.18.1.bb | 3 +-
2 files changed, 47 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch
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..8ecb16f97e
--- /dev/null
+++ b/meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch
@@ -0,0 +1,46 @@
+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.
+
+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)
+ }
+ \f
+ 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);
+ \f
+--
+2.26.2
+
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"
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] = "988dc82182121c7570e0cb8b4fcd5415"
@@ -23,8 +24,6 @@ CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
BBCLASSEXTEND = "native nativesdk"
-CFLAGS += "-fcommon"
-
do_install_append () {
# Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
# these headers
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* ✗ patchtest: failure for gdbm: add patch to fix link failure against gcc 10 (rev2)
2020-05-05 10:37 [PATCH v2] gdbm: add patch to fix link failure against gcc 10 Richard Leitner
@ 2020-05-05 11:02 ` Patchwork
0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2020-05-05 11:02 UTC (permalink / raw)
To: Richard Leitner; +Cc: openembedded-core
== Series Details ==
Series: gdbm: add patch to fix link failure against gcc 10 (rev2)
Revision: 2
URL : https://patchwork.openembedded.org/series/23952/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format]
Suggested fix Add Upstream-Status: <Valid status> to the header of meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch
Standard format Upstream-Status: <Valid status>
Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-05 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 10:37 [PATCH v2] gdbm: add patch to fix link failure against gcc 10 Richard Leitner
2020-05-05 11:02 ` ✗ patchtest: failure for gdbm: add patch to fix link failure against gcc 10 (rev2) Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.