aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/swig-support-gcc-12.patch
diff options
context:
space:
mode:
authorGreg Hogan <code@greghogan.com>2022-07-28 20:25:27 +0000
committerMarius Bakke <marius@gnu.org>2022-09-01 23:37:13 +0200
commit35db5d5ca49ce51b5cd293e2fc15e58429216f13 (patch)
treef5367999840cc7e90b1db43217277c99c08e6120 /gnu/packages/patches/swig-support-gcc-12.patch
parent6f8083e6ecbbb3c2907ebfa08d4ab498a2971c45 (diff)
downloadguix-35db5d5ca49ce51b5cd293e2fc15e58429216f13.tar.gz
guix-35db5d5ca49ce51b5cd293e2fc15e58429216f13.zip
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>
Diffstat (limited to 'gnu/packages/patches/swig-support-gcc-12.patch')
-rw-r--r--gnu/packages/patches/swig-support-gcc-12.patch16
1 files changed, 16 insertions, 0 deletions
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;