From a3349557bc0e4f593dca3e31bd74dc6bf2e9182a37875d7823ac07b5eab1075b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Wed, 19 Jan 2022 12:12:19 +0000 Subject: [PATCH] Accepting request 947366 from home:marxin:branches:devel:tools:building - Add fix-gcc12-error.patch in order to fix GCC 12 compilation error. OBS-URL: https://build.opensuse.org/request/show/947366 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=132 --- fix-gcc12-error.patch | 23 +++++++++++++++++++++++ swig.changes | 5 +++++ swig.spec | 3 ++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 fix-gcc12-error.patch diff --git a/fix-gcc12-error.patch b/fix-gcc12-error.patch new file mode 100644 index 0000000..a170694 --- /dev/null +++ b/fix-gcc12-error.patch @@ -0,0 +1,23 @@ +From 76d5a9ec270a763c892ae28070e391cf99e0b7cd Mon Sep 17 00:00:00 2001 +From: William S Fulton +Date: Tue, 18 Jan 2022 21:37:02 +0000 +Subject: [PATCH] gcc-12 warning fix in test-case + +Closes #2145 +--- + Examples/test-suite/nested_class.i | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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/swig.changes b/swig.changes index 027fcde..76d984a 100644 --- a/swig.changes +++ b/swig.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 19 09:23:35 UTC 2022 - Martin Liška + +- Add fix-gcc12-error.patch in order to fix GCC 12 compilation error. + ------------------------------------------------------------------- Tue Jun 8 22:19:19 UTC 2021 - Atri Bhattacharya diff --git a/swig.spec b/swig.spec index 011c9fc..72d8b57 100644 --- a/swig.spec +++ b/swig.spec @@ -1,7 +1,7 @@ # # spec file for package swig # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -41,6 +41,7 @@ Source1: %{name}.rpmlintrc # PATCH-FIX-UPSTREAM swig-octave-6.patch gh#swig/swig#2020 badshah400@gmail.com -- Allow swig to work with octave 6 and above; patch part of upstream merge request Patch0: swig-octave-6.patch +Patch1: fix-gcc12-error.patch Patch308: swig308-isfinite.diff BuildRequires: autoconf