all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Greg Hogan <code@greghogan.com>
To: 56817@debbugs.gnu.org
Cc: Greg Hogan <code@greghogan.com>
Subject: [bug#56817] [PATCH core-updates 1/3] gnu: swig: Fix build with GCC-12.
Date: Thu, 28 Jul 2022 20:25:27 +0000	[thread overview]
Message-ID: <a4ddf9b408290a83898c579648eddec0fe94d379.1659039477.git.code@greghogan.com> (raw)
In-Reply-To: <cover.1659039477.git.code@greghogan.com>

* gnu/packages/patches/swig-support-gcc-12.patch: New file.
* gnu/local.mk: Add it.
* gnu/packages/swig.scm (swig)[source]: Add patch.
---
 gnu/local.mk                                   |  1 +
 gnu/packages/patches/swig-support-gcc-12.patch | 16 ++++++++++++++++
 gnu/packages/swig.scm                          |  4 +++-
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/swig-support-gcc-12.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 407098e895..a3f9a81440 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1816,6 +1816,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/superlu-dist-awpm-grid.patch		\
   %D%/packages/patches/superlu-dist-scotchmetis.patch		\
   %D%/packages/patches/supertux-unbundle-squirrel.patch		\
+  %D%/packages/patches/swig-support-gcc-12.patch		\
   %D%/packages/patches/swish-e-search.patch			\
   %D%/packages/patches/swish-e-format-security.patch		\
   %D%/packages/patches/symmetrica-bruch.patch			\
diff --git a/gnu/packages/patches/swig-support-gcc-12.patch b/gnu/packages/patches/swig-support-gcc-12.patch
new file mode 100644
index 0000000000..ece7928aa2
--- /dev/null
+++ b/gnu/packages/patches/swig-support-gcc-12.patch
@@ -0,0 +1,16 @@
+Fix for https://github.com/swig/swig/issues/2145 made in unreleased upstream commit
+https://github.com/swig/swig/commit/76d5a9ec270a763c892ae28070e391cf99e0b7cd
+
+diff --git a/Examples/test-suite/nested_class.i b/Examples/test-suite/nested_class.i
+index b10c339493e..c778a12cf7c 100644
+--- a/Examples/test-suite/nested_class.i
++++ b/Examples/test-suite/nested_class.i
+@@ -201,7 +201,7 @@ struct Outer {
+     Integer xx;
+   } MultipleInstanceAnonDerived1, MultipleInstanceAnonDerived2, *MultipleInstanceAnonDerived3, MultipleInstanceAnonDerived4[2];
+ 
+-#if defined(__GNUC__) || defined(_MSC_VER) || defined(SWIG)
++#if (defined(__GNUC__) && __GNUC__ < 12) || defined(_MSC_VER) || defined(SWIG)
+ /* some compilers do not accept these */
+   struct : public InnerMultiple {
+     Integer xx;
diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm
index 1f4bd0922a..a90a5d51e8 100644
--- a/gnu/packages/swig.scm
+++ b/gnu/packages/swig.scm
@@ -43,7 +43,9 @@ (define-public swig
                                  name "-" version ".tar.gz"))
              (sha256
               (base32
-               "1z06m5zv87mha6hvys1iay810ghc1jngilfby1ms2n4d1mryjfym"))))
+               "1z06m5zv87mha6hvys1iay810ghc1jngilfby1ms2n4d1mryjfym"))
+             ;; Remove with next release.
+             (patches (search-patches "swig-support-gcc-12.patch"))))
     (build-system gnu-build-system)
     (native-inputs (list boost
                          `(,pcre "bin") ;for 'pcre-config'
-- 
2.37.1





       reply	other threads:[~2022-07-28 20:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1659039477.git.code@greghogan.com>
2022-07-28 20:25 ` Greg Hogan [this message]
2022-07-28 20:25 ` [bug#56817] [PATCH core-updates 2/3] gnu: doxygen: Fix build with GCC-12 Greg Hogan
2022-07-28 20:25 ` [bug#56817] [PATCH core-updates 3/3] gnu: vala: Update to 0.54.8 Greg Hogan

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=a4ddf9b408290a83898c579648eddec0fe94d379.1659039477.git.code@greghogan.com \
    --to=code@greghogan.com \
    --cc=56817@debbugs.gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

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.