diff --git a/gnu-cobol.changes b/gnu-cobol.changes index 2d1fc19..88b2c3a 100644 --- a/gnu-cobol.changes +++ b/gnu-cobol.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Jul 24 13:48:02 UTC 2024 - Martin Jambor + +- Add gnucobol-3.1.2-C99.diff to add missing includes of + libxml/parser.h which cause GCC 14 to emit compiler error rather + than a warning. + +- Add -Wno-error=incompatible-pointer-types to optflags so that GCC 14 + can compile test 0987 without failing with an error. + ------------------------------------------------------------------- Sat Jul 15 18:11:27 UTC 2023 - Sarah Kriesch diff --git a/gnu-cobol.spec b/gnu-cobol.spec index 0df3b85..2495352 100644 --- a/gnu-cobol.spec +++ b/gnu-cobol.spec @@ -1,7 +1,7 @@ # # spec file for package gnu-cobol # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,8 @@ Source0: https://sourceforge.net/projects/open-cobol/files/gnu-cobol/%{_m Source1: https://sourceforge.net/projects/open-cobol/files/gnu-cobol/%{_mver}/gnucobol-%{version}.tar.xz.sig # PATCH-FIX-UPSTREAM fix_test_698.patch -- see https://sourceforge.net/p/gnucobol/bugs/695/ Patch1: fix_test_698.patch +# PATCH-FIX-UPSTREAM gnucobol-3.1.2-C99.diff -- Missing include which causes compilation errors with GCC 14 +Patch2: gnucobol-3.1.2-C99.diff BuildRequires: autoconf BuildRequires: db-devel BuildRequires: dos2unix @@ -41,8 +43,8 @@ BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(ncurses) >= 5.4 Requires(post): %{install_info_prereq} Requires(preun): %{install_info_prereq} -Provides: opencobol = %{version} Provides: libcob-devel = %{version} +Provides: opencobol = %{version} Obsoletes: libcob-devel <= 3.1.2 %description @@ -50,7 +52,6 @@ GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler. cobc translates COBOL to executable using intermediate C sources, providing full access to nearly all C libraries. - %package -n libcob%{sover} Summary: GnuCOBOL shared library License: LGPL-3.0-or-later @@ -61,11 +62,12 @@ GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler. cobc translates COBOL to executable using intermediate C sources, providing full access to nearly all C libraries. - %prep %autosetup -p1 -n gnucobol-%{version} %build + +%global optflags %{optflags} -Wno-error=incompatible-pointer-types %configure \ --enable-hardening \ --enable-static=no @@ -108,5 +110,4 @@ find %{buildroot} -type f -name "*.la" -delete -print %license COPYING.LESSER %{_libdir}/libcob.so.%{sover}* - %changelog diff --git a/gnucobol-3.1.2-C99.diff b/gnucobol-3.1.2-C99.diff new file mode 100644 index 0000000..02d0022 --- /dev/null +++ b/gnucobol-3.1.2-C99.diff @@ -0,0 +1,24 @@ +Index: gnucobol-3.1.2/libcob/common.c +=================================================================== +--- gnucobol-3.1.2.orig/libcob/common.c ++++ gnucobol-3.1.2/libcob/common.c +@@ -111,6 +111,7 @@ + #endif + + #if defined (WITH_XML2) ++#include + #include + #include + #endif +Index: gnucobol-3.1.2/libcob/mlio.c +=================================================================== +--- gnucobol-3.1.2.orig/libcob/mlio.c ++++ gnucobol-3.1.2/libcob/mlio.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #endif + + #if defined (WITH_CJSON)