From ba1ca619531c50c063fcce596bb7541579735fa9 Mon Sep 17 00:00:00 2001 From: fly_fzc <2385803914@qq.com> Date: Wed, 8 Feb 2023 11:18:55 +0800 Subject: [PATCH] run check in parallel and fix a concurrent build issue --- ...a-concurrent-build-issue-in-examples.patch | 34 +++++++++++++++++++ bison.spec | 12 +++++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 backport-build-fix-a-concurrent-build-issue-in-examples.patch diff --git a/backport-build-fix-a-concurrent-build-issue-in-examples.patch b/backport-build-fix-a-concurrent-build-issue-in-examples.patch new file mode 100644 index 0000000..84a5da4 --- /dev/null +++ b/backport-build-fix-a-concurrent-build-issue-in-examples.patch @@ -0,0 +1,34 @@ +From 541943ee04ee22101bbbde2386272b1cad635132 Mon Sep 17 00:00:00 2001 +From: Akim Demaille +Date: Sun, 6 Sep 2020 10:08:22 +0200 +Subject: [PATCH] build: fix a concurrent build issue in examples + +Reported by Thomas Deutschmann . +https://lists.gnu.org/r/bug-bison/2020-09/msg00010.html + +* examples/c/lexcalc/local.mk: scan.o depends on parse.[ch]. +--- + examples/c/lexcalc/local.mk | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/examples/c/lexcalc/local.mk b/examples/c/lexcalc/local.mk +index b73887e..636275c 100644 +--- a/examples/c/lexcalc/local.mk ++++ b/examples/c/lexcalc/local.mk +@@ -31,6 +31,13 @@ endif FLEX_WORKS + + %D%/parse.c: $(dependencies) + ++# Tell Make scan.o depends on parse.h, except that Make sees only ++# parse.c, not parse.h. We can't use BUILT_SOURCES to this end, since ++# we use the built bison. ++%D%/lexcalc$(DASH)scan.o: %D%/parse.c ++# Likewise, but for Automake before 1.16. ++%D%/examples_c_lexcalc_lexcalc$(DASH)scan.o: %D%/parse.c ++ + EXTRA_DIST += %D%/lexcalc.test + dist_lexcalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md + CLEANFILES += %D%/parse.[ch] %D%/scan.c %D%/parse.output +-- +1.8.3.1 + diff --git a/bison.spec b/bison.spec index eb38182..c210c69 100644 --- a/bison.spec +++ b/bison.spec @@ -1,6 +1,6 @@ Name: bison Version: 3.6.4 -Release: 2 +Release: 3 Summary: A GNU general-purpose parser generator License: GPLv3+ URL: http://www.gnu.org/software/bison/ @@ -8,6 +8,7 @@ Source0: https://ftp.gnu.org/gnu/bison/bison-%{version}.tar.xz Patch0: backport-style-prefer-FOO-to-FOO-for-function-like-macros.patch Patch1: backport-CVE-2020-24240.patch +Patch2: backport-build-fix-a-concurrent-build-issue-in-examples.patch BuildRequires: gcc-c++ autoconf automake m4 flex Requires(post): info @@ -48,7 +49,7 @@ This package contains language support files and locale. %make_build %check -make check +%make_build check %install %make_install @@ -92,6 +93,13 @@ fi %{_datadir}/locale/*/LC_MESSAGES/bison-gnulib.mo %changelog +* Wed Feb 08 2023 fuanan - 3.6.4-3 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:use make macros to run check in parallel; + fix a concurrent build issue in examples + * Fri Jul 15 2022 fuanan - 3.6.4-2 - Type:CVE - ID:CVE-2020-24240 -- Gitee