guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/10: gnu: swig: Fix build with GCC-12.


From: guix-commits
Subject: 08/10: gnu: swig: Fix build with GCC-12.
Date: Thu, 1 Sep 2022 17:44:51 -0400 (EDT)

mbakke pushed a commit to branch core-updates
in repository guix.

commit 35db5d5ca49ce51b5cd293e2fc15e58429216f13
Author: Greg Hogan <code@greghogan.com>
AuthorDate: Thu Jul 28 20:25:27 2022 +0000

    gnu: swig: Fix build with GCC-12.
    
    * gnu/packages/patches/swig-support-gcc-12.patch: New file.
    * gnu/local.mk: Add it.
    * gnu/packages/swig.scm (swig)[source]: Add patch.
    
    Signed-off-by: Marius Bakke <marius@gnu.org>
---
 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(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index dabd3cf0b4..fbb73e2ac5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1819,6 +1819,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 @@
                                  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'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]