summaryrefslogtreecommitdiff
path: root/user/gnucobol
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2021-05-03 03:05:37 -0400
committerZach van Rijn <me@zv.io>2022-06-12 23:51:30 +0000
commit8cecc492c87955803d95a8681d5a48dcfe4dc2bf (patch)
tree1b3ea2b75d8bf84b93e3a879d54d195f3f6a3fdf /user/gnucobol
parent1568919b9e5fd6129e1ec45d92687e74fe07f27d (diff)
downloadpackages-8cecc492c87955803d95a8681d5a48dcfe4dc2bf.tar.gz
packages-8cecc492c87955803d95a8681d5a48dcfe4dc2bf.tar.bz2
packages-8cecc492c87955803d95a8681d5a48dcfe4dc2bf.tar.xz
packages-8cecc492c87955803d95a8681d5a48dcfe4dc2bf.zip
user/gnucobol: bump to 3.1.2.
Diffstat (limited to 'user/gnucobol')
-rw-r--r--user/gnucobol/APKBUILD18
-rw-r--r--user/gnucobol/big-endian.patch314
-rw-r--r--user/gnucobol/dash-compat.patch29
-rw-r--r--user/gnucobol/keep-debug-flags.patch53
-rw-r--r--user/gnucobol/tests-are-fatal.patch22
5 files changed, 41 insertions, 395 deletions
diff --git a/user/gnucobol/APKBUILD b/user/gnucobol/APKBUILD
index 2b144db19..8e65b9810 100644
--- a/user/gnucobol/APKBUILD
+++ b/user/gnucobol/APKBUILD
@@ -1,8 +1,7 @@
# Contributor: Max Rees <maxcrees@me.com>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=gnucobol
-pkgver=3.0_rc1
-_pkgver=3.0-rc1
+pkgver=3.1.2
pkgrel=0
pkgdesc="Free COBOL compiler"
url="https://sourceforge.net/projects/open-cobol/"
@@ -10,17 +9,13 @@ arch="all"
license="GPL-3.0+ AND LGPL-3.0+ AND GFDL-1.3"
# Since it compiles to C as an intermediate, the headers / libraries must
# always be present and thus there is no -dev subpackage.
-depends="db-dev gmp-dev ncurses-dev"
+depends="db-dev gmp-dev json-c-dev libxml2-dev ncurses-dev"
makedepends="autoconf automake help2man libtool texinfo"
subpackages="$pkgname-doc $pkgname-lang"
-source="https://downloads.sourceforge.net/project/gnucobol/gnucobol/3.0/$pkgname-$_pkgver.tar.xz
+source="https://downloads.sourceforge.net/project/gnucobol/gnucobol/${pkgver%.*}/gnucobol-$pkgver.tar.xz
https://dev.sick.bike/dist/newcob.val.Z
keep-debug-flags.patch
- big-endian.patch
- tests-are-fatal.patch
- dash-compat.patch
"
-builddir="$srcdir/$pkgname-$_pkgver"
prepare() {
default_prepare
@@ -50,9 +45,6 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="da669f7bef0c6664723dc88c20e28236ea31d5c933d9129b0132e929eb66f723995d3428b056164cf105bc22b38b8bc5fbf9d0d5b76df4ce6c08045837930fa0 gnucobol-3.0-rc1.tar.xz
+sha512sums="738149c9d3e01140e4036b041f4eaa6c7caf7848a87146a3dd9940a9f17006805fd3c6b169d346bf01a0c2e671655080978c0f3182a85389f8f8a373ca8c1435 gnucobol-3.1.2.tar.xz
eb784866d1a335834074fbe103b5c5f5da810d847ae14a64316ecbb2c0f95ef751d2f2ec609b8fa21ef0b775817dc61115a574608ec89750d779ae0afbb95379 newcob.val.Z
-f45611c1298680b0c763094af662b3d1925d32379d33faff77862d7eaa3bf6225f68d5160a39a0822f54b570c923a53bc72dec54cff4f04f1162515834a40be2 keep-debug-flags.patch
-f8f8bb395e3f2e0e993df5133d1ed459dc7f03f148d76ddbbe4820f7674300c8c9a8d024785124444ca71a18a0d917e816ab852e0b5e9ebbfa5ed35f12a80b0f big-endian.patch
-ca5ba1e19e5ff8740008b45ffcea4c1e8e34fc62246f3e635424ae1ec374c5cd9d7cc94d371690c021ccf82e293db7235143ebcaadb20ae5e4fc258749ff56c4 tests-are-fatal.patch
-376af9b264b679388722b4d489a834cfb24b47fbdb6cd9bd9c239894741ffc265c2f83d770b0a820f48b3668b3596544183b48bee319186e4ed5c9c60bad4e77 dash-compat.patch"
+e032706ea9827ca416680f01a7440c44d9c586cbe7d93f5acd58adedacb6cc3d37a0966b6d5d6fc5d5969deb6a77757eee2a1d310ade8842924ffa8da0277a70 keep-debug-flags.patch"
diff --git a/user/gnucobol/big-endian.patch b/user/gnucobol/big-endian.patch
deleted file mode 100644
index 65e5243d2..000000000
--- a/user/gnucobol/big-endian.patch
+++ /dev/null
@@ -1,314 +0,0 @@
-From 99cfa96676db1fcb6e4a5db89110c4991782eab6 Mon Sep 17 00:00:00 2001
-From: sf-mensch <sf-mensch@ed166372-6744-4ac0-a67f-bb1ae9efa102>
-Date: Mon, 25 Mar 2019 21:34:35 +0000
-Subject: [PATCH] testsuite.src/run_misc.at: fixed test that expected
- little-endian values in dump to not check the dump content *FIXME: still
- expecting ASCII*
-
-git-svn-id: https://svn.code.sf.net/p/open-cobol/code/trunk@3054 ed166372-6744-4ac0-a67f-bb1ae9efa102
----
- tests/testsuite.src/run_misc.at | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/tests/testsuite.src/run_misc.at b/tests/testsuite.src/run_misc.at
-index 2ef4a86..173ac48 100644
---- a/tests/testsuite.src/run_misc.at
-+++ b/tests/testsuite.src/run_misc.at
-@@ -5918,6 +5918,10 @@ AT_CLEANUP
- AT_SETUP([MF FIGURATIVE to NUMERIC])
- AT_KEYWORDS([MOVE])
-
-+# FIXME: This test will NOT work on EBCDIC machines,
-+# either add it explicit here and split into two or add
-+# a pre-test and check the expected "native" result
-+
- AT_DATA([prog.cob], [
- IDENTIFICATION DIVISION.
- PROGRAM-ID. prog.
-@@ -5963,12 +5967,16 @@ AT_DATA([prog.cob], [
- DISPLAY "MOVE HIGH-VALUES TO BIGFLT"
- MOVE HIGH-VALUES TO BIGFLT.
- PERFORM SHOW-BIG.
-+ CALL "dump" USING BIGFLT.
- DISPLAY "MOVE QUOTE TO BIGFLT"
- MOVE QUOTE TO BIGFLT.
- PERFORM SHOW-BIG.
-+ CALL "dump" USING BIGFLT.
- DISPLAY "MOVE ALL * TO BIGFLT"
- MOVE ALL '*' TO BIGFLT.
- PERFORM SHOW-BIG.
-+ *> Note: the next results are dependant on endianess
-+ *> therefore no dump here
- DISPLAY "MOVE ALL '21' TO BIGFLT"
- MOVE ALL '21' TO BIGFLT.
- PERFORM SHOW-BIG.
-@@ -5977,7 +5985,6 @@ AT_DATA([prog.cob], [
- CALL "dump" USING MYFLD.
- SHOW-BIG.
- DISPLAY "BIGFLT is " BIGFLT.
-- CALL "dump" USING BIGFLT.
- ])
-
- AT_DATA([cmod.c], [[
-@@ -6033,10 +6040,8 @@ BIGFLT is 2.1973164E-18
- 22222222 .
- MOVE ALL * TO BIGFLT
- BIGFLT is 5.4312347E+12
--DA119E54 .
- MOVE ALL '21' TO BIGFLT
- BIGFLT is 2.1212121E+37
--E5547F7D .
- ], [])
-
- AT_CLEANUP
---
-2.15.3
-
-From e0d02d05d50804d6fefe3f01d7eee8c943cb07e4 Mon Sep 17 00:00:00 2001
-From: sf-mensch <sf-mensch@ed166372-6744-4ac0-a67f-bb1ae9efa102>
-Date: Mon, 25 Mar 2019 21:41:12 +0000
-Subject: [PATCH] testsuite.src/run_misc.at: fixed test that expected
- little-endian values in dump to not check the dump content *FIXME: still
- expecting ASCII*
-
-git-svn-id: https://svn.code.sf.net/p/open-cobol/code/trunk@3055 ed166372-6744-4ac0-a67f-bb1ae9efa102
-
-diff --git a/tests/testsuite.src/run_misc.at b/tests/testsuite.src/run_misc.at
-index 173ac48..51f4b84 100644
---- a/tests/testsuite.src/run_misc.at
-+++ b/tests/testsuite.src/run_misc.at
-@@ -6005,7 +6005,7 @@ prog.cob:28: warning: numeric value is expected
- prog.cob:6: warning: 'MYFLD' defined here as PIC 9(4)
- prog.cob:34: warning: numeric value is expected
- prog.cob:6: warning: 'MYFLD' defined here as PIC 9(4)
--prog.cob:50: warning: numeric value is expected
-+prog.cob:52: warning: numeric value is expected
- prog.cob:7: warning: 'BIGFLT' defined here as USAGE FLOAT
- ])
-
---
-2.15.3
-
-From 71b65c9fe2c6997e33c56457977d79fd10c3a8f2 Mon Sep 17 00:00:00 2001
-From: sf-mensch <sf-mensch@ed166372-6744-4ac0-a67f-bb1ae9efa102>
-Date: Mon, 15 Apr 2019 21:29:54 +0000
-Subject: [PATCH] Partially merged r525 from branches/reportwriter and r3106
- from branches/pangaea: libcob/common.c (cob_sys_getopt_long_long): fix ENDIAN
- problem with CBL_GC_GETOPT
-
-also applied minor reformatting to keep the function formatted consistently
-
-
-git-svn-id: https://svn.code.sf.net/p/open-cobol/code/trunk@3115 ed166372-6744-4ac0-a67f-bb1ae9efa102
-
-diff --git a/libcob/common.c b/libcob/common.c
-index 5262282..d99c533 100644
---- a/libcob/common.c
-+++ b/libcob/common.c
-@@ -5138,9 +5138,7 @@ cob_sys_getopt_long_long (void *so, void *lo, void *idx, const int long_only, vo
-
- COB_CHK_PARMS (CBL_GC_GETOPT, 6);
-
-- /*
-- * Read in sizes of some parameters
-- */
-+ /* read in sizes of some parameters */
- if (COB_MODULE_PTR->cob_procedure_params[1]) {
- lo_size = COB_MODULE_PTR->cob_procedure_params[1]->size;
- }
-@@ -5151,9 +5149,7 @@ cob_sys_getopt_long_long (void *so, void *lo, void *idx, const int long_only, vo
- opt_val_size = COB_MODULE_PTR->cob_procedure_params[5]->size;
- }
-
-- /*
-- * Buffering longoptions (COBOL), target format (struct option)
-- */
-+ /* buffering longoptions (COBOL), target format (struct option) */
- if (lo_size % sizeof (longoption_def) == 0) {
- lo_amount = (int)lo_size / sizeof (longoption_def);
- longoptions_root = (struct option*) cob_malloc (sizeof (struct option) * (lo_amount + 1U));
-@@ -5168,9 +5164,7 @@ cob_sys_getopt_long_long (void *so, void *lo, void *idx, const int long_only, vo
- }
- longind = cob_get_int (COB_MODULE_PTR->cob_procedure_params[2]);
-
-- /*
-- * Add 0-termination to strings.
-- */
-+ /* add 0-termination to strings */
- shortoptions = cob_malloc (so_size + 1U);
- if (COB_MODULE_PTR->cob_procedure_params[0]) {
- cob_field_to_string (COB_MODULE_PTR->cob_procedure_params[0], shortoptions, so_size);
-@@ -5196,9 +5190,7 @@ cob_sys_getopt_long_long (void *so, void *lo, void *idx, const int long_only, vo
- longoptions = longoptions + 1;
- }
-
-- /*
-- * Appending final record, so getopt can spot the end of longoptions
-- */
-+ /* appending final record, so getopt can spot the end of longoptions */
- longoptions->name = NULL;
- longoptions->has_arg = 0;
- longoptions->flag = NULL;
-@@ -5211,17 +5203,42 @@ cob_sys_getopt_long_long (void *so, void *lo, void *idx, const int long_only, vo
- return_value = cob_getopt_long_long (cob_argc, cob_argv, shortoptions, longoptions, &longind, long_only);
- temp = (char *) &return_value;
-
-- /*
-- * Write data back to COBOL
-- */
-- if (temp[0] == '?' || temp[0] == ':' || temp[0] == 'W'
-- || temp[0] == -1 || temp[0] == 0) exit_status = return_value;
-- else exit_status = 3;
-+ /* write data back to COBOL */
-+#ifdef WORDS_BIGENDIAN
-+ if (temp[3] == '?'
-+ || temp[3] == ':'
-+ || temp[3] == 'W'
-+ || temp[3] == 0) {
-+ exit_status = temp[3] & 0xFF;
-+ } else if (return_value == -1) {
-+ exit_status = -1;
-+ } else {
-+ exit_status = 3;
-+ }
-+ /* cob_getopt_long_long sometimes returns and 'int' value and sometimes a 'x ' in the int */
-+ if (temp[0] == 0
-+ && temp[1] == 0
-+ && temp[2] == 0) {
-+ /* Move option value to 1st byte and SPACE fill the 'int' */
-+ temp[0] = temp[3];
-+ temp[1] = temp[2] = temp[3] = ' ';
-+ }
-+#else
-+ if (temp[0] == '?'
-+ || temp[0] == ':'
-+ || temp[0] == 'W'
-+ || temp[0] == -1
-+ || temp[0] == 0) {
-+ exit_status = return_value;
-+ } else {
-+ exit_status = 3;
-+ }
-
- for (i = 3; i > 0; i--) {
-- if (temp[i] == 0x00) temp[i] = 0x20;
-+ if (temp[i] == 0) temp[i] = ' ';
- else break;
- }
-+#endif
-
- cob_set_int (COB_MODULE_PTR->cob_procedure_params[2], longind);
- memcpy (return_char, &return_value, 4);
---
-2.15.3
-
-From 9151800276cff454f11d250cb19d267def883978 Mon Sep 17 00:00:00 2001
-From: sf-mensch <sf-mensch@ed166372-6744-4ac0-a67f-bb1ae9efa102>
-Date: Mon, 15 Apr 2019 21:38:53 +0000
-Subject: [PATCH] Partially merged r525 from branches/reportwriter:
- libcob/fileio.c (cob_sys_create_file, cob_sys_open_file): fix ENDIAN problem
- with CBL_CREATE_FILE, CBL_OPEN_FILE
-
-also applied minor reformatting to keep the function formatted consistently
-
-
-git-svn-id: https://svn.code.sf.net/p/open-cobol/code/trunk@3116 ed166372-6744-4ac0-a67f-bb1ae9efa102
-
-diff --git a/libcob/fileio.c b/libcob/fileio.c
-index 885cd48..521e245 100644
---- a/libcob/fileio.c
-+++ b/libcob/fileio.c
-@@ -5559,6 +5559,22 @@ cob_sys_open_file (unsigned char *file_name, unsigned char *file_access,
-
- COB_CHK_PARMS (CBL_OPEN_FILE, 5);
-
-+#ifdef WORDS_BIGENDIAN
-+ /* if value is passed as numeric literal, it becomes an 'int' so value is in 4th byte */
-+ if (file_access[0] == 0
-+ && file_access[1] == 0
-+ && file_access[2] == 0)
-+ file_access += 3;
-+ if (file_lock[0] == 0
-+ && file_lock[1] == 0
-+ && file_lock[2] == 0)
-+ file_lock += 3;
-+ if (file_dev[0] == 0
-+ && file_dev[1] == 0
-+ && file_dev[2] == 0)
-+ file_dev += 3;
-+#endif
-+
- return open_cbl_file (file_name, file_access, file_handle, 0);
- }
-
-@@ -5573,6 +5589,24 @@ cob_sys_create_file (unsigned char *file_name, unsigned char *file_access,
- * @param: file_dev : not implemented, set 0
- */
-
-+ COB_CHK_PARMS (CBL_CREATE_FILE, 5);
-+
-+#ifdef WORDS_BIGENDIAN
-+ /* if value is passed as numeric literal, it becomes an 'int' so value is in 4th byte */
-+ if (file_access[0] == 0
-+ && file_access[1] == 0
-+ && file_access[2] == 0)
-+ file_access += 3;
-+ if (file_lock[0] == 0
-+ && file_lock[1] == 0
-+ && file_lock[2] == 0)
-+ file_lock += 3;
-+ if (file_dev[0] == 0
-+ && file_dev[1] == 0
-+ && file_dev[2] == 0)
-+ file_dev += 3;
-+#endif
-+
- if (*file_lock != 0) {
- cob_runtime_warning (_("call to CBL_CREATE_FILE with wrong file_lock: %d"), *file_lock);
- }
-@@ -5580,8 +5614,6 @@ cob_sys_create_file (unsigned char *file_name, unsigned char *file_access,
- cob_runtime_warning (_("call to CBL_CREATE_FILE with wrong file_dev: %d"), *file_dev);
- }
-
-- COB_CHK_PARMS (CBL_CREATE_FILE, 5);
--
- return open_cbl_file (file_name, file_access, file_handle, O_CREAT | O_TRUNC);
- }
-
---
-2.15.3
-
-From f6ff480b71da490476abc84699558bddef6b9a56 Mon Sep 17 00:00:00 2001
-From: sf-mensch <sf-mensch@ed166372-6744-4ac0-a67f-bb1ae9efa102>
-Date: Tue, 18 Jun 2019 20:09:46 +0000
-Subject: [PATCH] tests: * atlocal.in explicit disable BDB internal locking by
- unsetting DB_HOME to work around issues in different environments and to not
- pollute the users's general BDB locking files * skip UDF recursion test
- previously marked as expected fail as the current implementation may or may
- not work depending on the underlying C compiler/library in use (including the
- exact version...)
-
-git-svn-id: https://svn.code.sf.net/p/open-cobol/code/trunk@3194 ed166372-6744-4ac0-a67f-bb1ae9efa102
-
-diff --git a/tests/testsuite.src/run_functions.at b/tests/testsuite.src/run_functions.at
-index 7c3c660..5ddbd58 100644
---- a/tests/testsuite.src/run_functions.at
-+++ b/tests/testsuite.src/run_functions.at
-@@ -1,4 +1,4 @@
--## Copyright (C) 2003-2012, 2014-2018 Free Software Foundation, Inc.
-+## Copyright (C) 2003-2012, 2014-2019 Free Software Foundation, Inc.
- ## Written by Keisuke Nishida, Roger While, Simon Sobisch, Edward Hart
- ##
- ## This file is part of GnuCOBOL.
-@@ -4145,7 +4145,7 @@ AT_CLEANUP
- AT_SETUP([UDF with recursion])
- AT_KEYWORDS([functions LOCAL-STORAGE])
-
--AT_XFAIL_IF(true) # see bug #222 and r2291 - postponed
-+AT_SKIP_IF(true) # see bug #222 and r2291 - postponed
-
- AT_DATA([prog.cob], [
- IDENTIFICATION DIVISION.
---
-2.15.3
-
diff --git a/user/gnucobol/dash-compat.patch b/user/gnucobol/dash-compat.patch
deleted file mode 100644
index e2d7f6006..000000000
--- a/user/gnucobol/dash-compat.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- gnucobol-3.0-rc1/tests/testsuite.src/listings.at.old 2018-04-22 19:55:50.000000000 +0000
-+++ gnucobol-3.0-rc1/tests/testsuite.src/listings.at 2020-01-14 09:08:26.488668118 +0000
-@@ -2185,7 +2185,7 @@
-
- AT_CHECK([$UNIFY_LISTING prog.lst prog.lis once], [0], [], [])
-
--AT_CHECK([test "$COB_HAS_64_BIT_POINTER" == "yes"], [0], [], [],
-+AT_CHECK([test "$COB_HAS_64_BIT_POINTER" = "yes"], [0], [], [],
-
- # Previous test "failed" --> 32 bit
-
-@@ -5761,4 +5761,4 @@
- AT_CHECK([$UNIFY_LISTING prog.lst prog.lis once], [0], [], [])
- AT_CHECK([diff prog1.lst prog.lis], [0], [], [])
-
--AT_CLEANUP
-\ No newline at end of file
-+AT_CLEANUP
---- gnucobol-3.0-rc1/tests/testsuite.src/data_pointer.at.old 2018-04-22 19:55:46.000000000 +0000
-+++ gnucobol-3.0-rc1/tests/testsuite.src/data_pointer.at 2020-01-14 09:08:48.226341564 +0000
-@@ -40,7 +40,7 @@
-
- AT_CHECK([$COMPILE prog.cob], [0], [], [])
-
--AT_CHECK([test "$COB_HAS_64_BIT_POINTER" == "yes"], [0], [], [],
-+AT_CHECK([test "$COB_HAS_64_BIT_POINTER" = "yes"], [0], [], [],
-
- # Previous test "failed" --> 32 bit
-
diff --git a/user/gnucobol/keep-debug-flags.patch b/user/gnucobol/keep-debug-flags.patch
index 40c188802..625a5002b 100644
--- a/user/gnucobol/keep-debug-flags.patch
+++ b/user/gnucobol/keep-debug-flags.patch
@@ -1,6 +1,6 @@
---- gnucobol-3.0-rc1/configure.ac 2018-04-22 22:00:19.000000000 +0000
-+++ gnucobol-3.0-rc1/configure.ac 2019-06-28 12:09:56.160772995 +0000
-@@ -1216,40 +1216,6 @@
+--- gnucobol-3.1.2/configure.ac 2020-12-23 05:51:14.000000000 -0500
++++ gnucobol-3.1.2/configure.ac 2021-05-03 02:35:16.051807283 -0400
+@@ -1854,59 +1854,6 @@ if test "$COB_USES_CLANG_ONLY" = "yes";
fi
@@ -18,26 +18,45 @@
- cob_temp_flags="$CPPFLAGS"
- fi
-fi
--if test "x$cob_temp_flags" != "x"; then
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-g3//' -e 's/-g//' -e 's/ $//' -e 's/^ //'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/@<:@+-@:>@O@<:@0-9s@:>@//' -e 's/ $//' -e 's/^ //'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-O//' -e 's/ $//' -e 's/^ //'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-fmessage-length=0//'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-D_FORTIFY_SOURCE=.//'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-fstack-protector-strong//'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-fstack-protector-all//'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-fstack-protector//'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-funwind-tables//'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/-fasynchronous-unwind-tables//'`
-- cob_temp_flags=`echo "$cob_temp_flags" | sed -e 's/ */ /g' -e 's/ $//' -e 's/^ //'`
+-
+-#
+-# Add CFLAGS and CPPFLAGS to COB_CFLAGS, minus optimization/debug options.
+-
+-cob_temp_flags="$CFLAGS $CPPFLAGS"
+-
+-if test "$enable_hardening" = no; then
+- cob_temp_flags=$(echo x$cob_temp_flags | \
+- sed -e 's/^x//' \
+- -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' \
+- -e 's/-D_FORTIFY_SOURCE=.//g' \
+- -e 's/-fmessage-length=0//g' \
+- -e 's/-fstack-protector-strong//g' \
+- -e 's/-fstack-protector-all//g' \
+- -e 's/-fstack-protector//g' \
+- )
-fi
-
+-cob_temp_flags=$(echo x$cob_temp_flags | \
+- sed -e 's/^x//' \
+- -e 's/-g\(db\)\{0,1\}[[0-9 ]]//g' \
+- -e 's/-g\(db\)\{0,1\}$//' \
+- -e 's/[[+-]]O[[0-9s]]*//g' \
+- -e 's/-O//g' \
+- -e 's/-funwind-tables//g' \
+- -e 's/-fasynchronous-unwind-tables//g' \
+- -e 's/ / /g' \
+- -e 's/ $//g' \
+- )
+-
-if test "x$cob_temp_flags" != "x"; then
-- COB_CFLAGS="$COB_CFLAGS $cob_temp_flags"
+- COB_CFLAGS="$cob_temp_flags $COB_CFLAGS"
+-fi
+-if test "$enable_hardening" = "yes"; then
+- # needs optimization
+- COB_CFLAGS="$COB_CFLAGS -O"
-fi
-unset cob_temp_flags
-
--
# Special stuff
AH_VERBATIM([_XOPEN_SOURCE_EXTENDED],
diff --git a/user/gnucobol/tests-are-fatal.patch b/user/gnucobol/tests-are-fatal.patch
deleted file mode 100644
index 933c1128d..000000000
--- a/user/gnucobol/tests-are-fatal.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Backport of r3183
-
---- gnucobol-3.0-rc1/tests/Makefile.am 2018-04-22 19:55:51.000000000 +0000
-+++ gnucobol-3.0-rc1/tests/Makefile.am 2019-06-28 16:49:23.740928336 +0000
-@@ -74,7 +74,7 @@
- check-local: $(TESTSUITE)
- @echo testing for working diff && diff - "$(TESTSUITE)" < "$(TESTSUITE)" \
- || (echo "Error: no working 'diff' in PATH" && false)
-- @$(TESTSUITE) $(TESTSUITEFLAGS) || rm -f testsuite.dir/at-job-fifo
-+ @$(TESTSUITE) $(TESTSUITEFLAGS) || (rm -f testsuite.dir/at-job-fifo; exit 1)
- @rm -f testsuite.dir/at-job-fifo
-
- clean-local:
-@@ -84,7 +84,7 @@
- @cp $(srcdir)/run_prog_manual.sh.in $@
-
- checkmanual: $(TESTSUITE_MANUAL) ./run_prog_manual.sh
-- @$(TESTSUITE_MANUAL) $(TESTSUITEFLAGS) || rm -f testsuite_manual.dir/at-job-fifo
-+ @$(TESTSUITE_MANUAL) $(TESTSUITEFLAGS) || (rm -f testsuite_manual.dir/at-job-fifo; exit 1)
- @rm -f testsuite_manual.dir/at-job-fifo
-
- # targets that are only logical targets instead of files