SHA256
1
0
forked from pool/gnu-cobol

Compare commits

..

2 Commits

Author SHA256 Message Date
Ana Guerrero
fdb949d68e Accepting request 1227844 from devel:languages:misc
OBS-URL: https://build.opensuse.org/request/show/1227844
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnu-cobol?expand=0&rev=5
2024-12-03 19:46:12 +00:00
Stefan Seyfried
154c077fa5 - 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.

If the request is OK, please forward it to Factory soon-ish so that
the package is ready when we switch the default compiler.

For the reference, I have also looked at upgrading gnu-cobol to
version 3.2 which would have avoided the need for the -Wno-error
option but there are weird test failures on Aarch64 (and IIRC also
ppc64le) so at least for now, I settled on fixing the version we have.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/gnu-cobol?expand=0&rev=15
2024-12-02 19:25:58 +00:00
3 changed files with 40 additions and 5 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Jul 24 13:48:02 UTC 2024 - Martin Jambor <mjambor@suse.com>
- 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 <sarah.kriesch@opensuse.org>

View File

@ -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

24
gnucobol-3.1.2-C99.diff Normal file
View File

@ -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 <libxml/parser.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlwriter.h>
#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 <libxml/xmlversion.h>
#include <libxml/xmlwriter.h>
#include <libxml/uri.h>
+#include <libxml/parser.h>
#endif
#if defined (WITH_CJSON)