From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: <yocto@lists.yoctoproject.org>
Subject: [meta-gplv2] [PATCH] gnupg: Make it build with GCC 10 (which uses -fno-common by default)
Date: Tue, 1 Sep 2020 00:44:44 +0200 [thread overview]
Message-ID: <20200831224444.16097-1-pkj@axis.com> (raw)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
...th-GCC-10-which-uses-fno-common-by-d.patch | 93 +++++++++++++++++++
recipes-support/gnupg/gnupg_1.4.7.bb | 3 +-
2 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 recipes-support/gnupg/gnupg-1.4.7/0001-Make-it-build-with-GCC-10-which-uses-fno-common-by-d.patch
diff --git a/recipes-support/gnupg/gnupg-1.4.7/0001-Make-it-build-with-GCC-10-which-uses-fno-common-by-d.patch b/recipes-support/gnupg/gnupg-1.4.7/0001-Make-it-build-with-GCC-10-which-uses-fno-common-by-d.patch
new file mode 100644
index 0000000..2f84155
--- /dev/null
+++ b/recipes-support/gnupg/gnupg-1.4.7/0001-Make-it-build-with-GCC-10-which-uses-fno-common-by-d.patch
@@ -0,0 +1,93 @@
+From 1d0141d77d4f81cfa3213370fb7eeddbf53fc085 Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Tue, 1 Sep 2020 00:29:22 +0200
+Subject: [PATCH] Make it build with GCC 10 (which uses -fno-common by default)
+
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ g10/options.h | 3 +--
+ include/cipher.h | 2 +-
+ include/iobuf.h | 2 +-
+ include/memory.h | 2 +-
+ include/mpi.h | 2 +-
+ tools/mpicalc.c | 1 +
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/g10/options.h b/g10/options.h
+index c5f0f22..33ed333 100644
+--- a/g10/options.h
++++ b/g10/options.h
+@@ -28,8 +28,7 @@
+ #include "packet.h"
+
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+-/* Norcraft can't cope with common symbols */
+-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
++#if !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+diff --git a/include/cipher.h b/include/cipher.h
+index 168ab41..794c12b 100644
+--- a/include/cipher.h
++++ b/include/cipher.h
+@@ -109,7 +109,7 @@ struct gcry_md_context {
+ typedef struct gcry_md_context *MD_HANDLE;
+
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
++#if !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+diff --git a/include/iobuf.h b/include/iobuf.h
+index a1d58c9..25f682b 100644
+--- a/include/iobuf.h
++++ b/include/iobuf.h
+@@ -73,7 +73,7 @@ struct iobuf_struct {
+ };
+
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
++#if !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+diff --git a/include/memory.h b/include/memory.h
+index 895d8a7..217d316 100644
+--- a/include/memory.h
++++ b/include/memory.h
+@@ -87,7 +87,7 @@ unsigned secmem_get_flags(void);
+ #define DBG_MEMSTAT memory_stat_debug_mode
+
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
++#if !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+diff --git a/include/mpi.h b/include/mpi.h
+index 81061d3..d529bda 100644
+--- a/include/mpi.h
++++ b/include/mpi.h
+@@ -38,7 +38,7 @@
+ #include "memory.h"
+
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
++#if !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+diff --git a/tools/mpicalc.c b/tools/mpicalc.c
+index 1df27d9..647dfbd 100644
+--- a/tools/mpicalc.c
++++ b/tools/mpicalc.c
+@@ -30,6 +30,7 @@
+ #include <stdlib.h>
+ #include <ctype.h>
+
++#define INCLUDED_BY_MAIN_MODULE 1
+ #include "util.h"
+ #include "mpi.h"
+ #include "i18n.h"
diff --git a/recipes-support/gnupg/gnupg_1.4.7.bb b/recipes-support/gnupg/gnupg_1.4.7.bb
index 6a950fd..6258809 100644
--- a/recipes-support/gnupg/gnupg_1.4.7.bb
+++ b/recipes-support/gnupg/gnupg_1.4.7.bb
@@ -20,7 +20,8 @@ SRC_URI = "${GNUPG_MIRROR}/gnupg/gnupg-${PV}.tar.bz2 \
file://CVE-2013-4242.patch \
file://fix-ustar-check-issue.patch \
file://0001-Make-it-build-with-gettext-0.20.patch \
- "
+ file://0001-Make-it-build-with-GCC-10-which-uses-fno-common-by-d.patch \
+ "
SRC_URI[md5sum] = "b06a141cca5cd1a55bbdd25ab833303c"
SRC_URI[sha256sum] = "69d18b7d193f62ca27ed4febcb4c9044aa0c95305d3258fe902e2fae5fc6468d"
next reply other threads:[~2020-08-31 22:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 22:44 Peter Kjellerstedt [this message]
2020-09-30 20:36 ` [yocto] [meta-gplv2] [PATCH] gnupg: Make it build with GCC 10 (which uses -fno-common by default) Joshua Watt
2020-09-30 21:34 ` Khem Raj
2020-10-01 13:26 ` Joshua Watt
2020-10-05 20:36 ` Peter Kjellerstedt
2020-10-05 20:57 ` Joshua Watt
2020-10-13 15:00 ` Joshua Watt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200831224444.16097-1-pkj@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox