summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-08-08 13:51:11 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-08-08 13:51:11 +0300
commit086183598e347812fa4d05e3661914a569fb0e29 (patch)
treeb028ebcd54f19d7a351029acfeec49c0c4984bb2
parent0112675d11af52fd4eac64cdcb157fb657da995a (diff)
downloadguix-086183598e347812fa4d05e3661914a569fb0e29.tar.gz
gnu: gnupg-1: Fix build with gcc-10.
* gnu/packages/gnupg.scm (gnupg-1)[source]: Add patch.
* gnu/packages/patches/gnupg-1-build-with-gcc10.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/gnupg.scm3
-rw-r--r--gnu/packages/patches/gnupg-1-build-with-gcc10.patch64
3 files changed, 67 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 5e5dd0bad3..2b0b585c19 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1147,6 +1147,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gnome-todo-delete-esource-duplicate.patch \
   %D%/packages/patches/gnome-tweaks-search-paths.patch		\
   %D%/packages/patches/gnupg-default-pinentry.patch		\
+  %D%/packages/patches/gnupg-1-build-with-gcc10.patch		\
   %D%/packages/patches/gnutls-skip-trust-store-test.patch	\
   %D%/packages/patches/gnutls-cross.patch			\
   %D%/packages/patches/gnutls-guile-eintr-eagain.patch		\
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 4584310e55..4e7d89b6ae 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -360,7 +360,8 @@ libskba (working with X.509 certificates and CMS data).")
                                   ".tar.bz2"))
               (sha256
                (base32
-                "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
+                "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))
+              (patches (search-patches "gnupg-1-build-with-gcc10.patch"))))
     (native-inputs '())
     (inputs
      `(("zlib" ,zlib)
diff --git a/gnu/packages/patches/gnupg-1-build-with-gcc10.patch b/gnu/packages/patches/gnupg-1-build-with-gcc10.patch
new file mode 100644
index 0000000000..40b2aff98e
--- /dev/null
+++ b/gnu/packages/patches/gnupg-1-build-with-gcc10.patch
@@ -0,0 +1,64 @@
+Borrowed from Debian
+https://sources.debian.org/src/gnupg1/1.4.23-1.1/debian/patches/0006-fix-for-gcc10.patch/
+
+Subject: Fix build with gcc-10
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2021-01-04
+Bug: https://dev.gnupg.org/T5215
+Bug-Debian: https://bugs.debian.org/957293
+
+--- a/g10/options.h
++++ b/g10/options.h
+@@ -29,6 +29,8 @@
+ /* Norcraft can't cope with common symbols */
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+ #endif
+--- a/include/cipher.h
++++ b/include/cipher.h
+@@ -117,6 +117,8 @@
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+ #endif
+--- a/include/iobuf.h
++++ b/include/iobuf.h
+@@ -72,6 +72,8 @@
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE 
+ #endif
+--- a/include/memory.h
++++ b/include/memory.h
+@@ -93,6 +93,8 @@
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE 
+ #endif
+--- a/include/mpi.h
++++ b/include/mpi.h
+@@ -38,6 +38,8 @@
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE 
+ #endif