summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/bison
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2020-05-14 15:39:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-15 16:31:44 +0100
commit7d8dae11b9e17fe2489851409155547c22f8f88e (patch)
treebbbc1b9ee88841abdee0e3e256c822f085d7dcbf /meta/recipes-devtools/bison
parent5ec0bffa9e1d66401230fb595c1873fa7ff6a6dd (diff)
downloadpoky-7d8dae11b9e17fe2489851409155547c22f8f88e.tar.gz
bison: fix the parallel build
Explicitly make the BUILT_SOURCES which are the generated headers such as stdio.h, fcntl.h and etc to be the dependencies of the gl_LIBOBJS such as libbison_a-sprintf.o, libbison_a-printf.o and etc to guarantee the BUILT_SOURCES is generated before begin to compile EXTRA_lib_libbison_a_SOURCES such as fprintf.c in parallel builid, otherwise there may come below error: | muscle-tab.c:(.text+0x77a): undefined reference to `rpl_sprintf' It does the same for src_bison_OBJECTS and lib_libbison_a_OBJECTS to make sure BUILT_SOURCES generated before begin to compile src_bison_SOURCES which contains AnnotationList.c and etc. BTW, the MOSTLYCLEANFILES also contains the generated header needs to be created early in the build process, so add it also in to avoid below error: | ./lib/uniwidth/width.c:21:10: fatal error: uniwidth.h: No such file or directory [YOCTO #13825] (From OE-Core rev: d4a0cbf132cf6a821e3efe7db3d9afd014cc9bc6) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/bison')
-rw-r--r--meta/recipes-devtools/bison/bison/0001-bison-fix-the-parallel-build.patch63
-rw-r--r--meta/recipes-devtools/bison/bison_3.5.4.bb1
2 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-devtools/bison/bison/0001-bison-fix-the-parallel-build.patch b/meta/recipes-devtools/bison/bison/0001-bison-fix-the-parallel-build.patch
new file mode 100644
index 0000000000..c3be91a109
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison/0001-bison-fix-the-parallel-build.patch
@@ -0,0 +1,63 @@
1From e0dbcee6e25b3c0cb11a627bbfe3af45ef67ec30 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Thu, 14 May 2020 15:23:16 +0800
4Subject: [PATCH] bison: fix the parallel build
5
6Explicitly make the BUILT_SOURCES which
7are the generated headers such as stdio.h,
8fcntl.h and etc to be the dependencies of
9the gl_LIBOBJS such as libbison_a-sprintf.o,
10libbison_a-printf.o and etc to guarantee the
11BUILT_SOURCES is generated before begin to
12compile EXTRA_lib_libbison_a_SOURCES such as
13fprintf.c in parallel builid, otherwise there
14may come below error:
15 | muscle-tab.c:(.text+0x77a): undefined reference to `rpl_sprintf'
16
17It does the same for src_bison_OBJECTS and
18lib_libbison_a_OBJECTS to make sure BUILT_SOURCES
19generated before begin to compile src_bison_SOURCES
20which contains AnnotationList.c and etc.
21
22BTW, the MOSTLYCLEANFILES also contains the
23generated header needs to be created early
24in the build process, so add it also in to
25avoid below error:
26 | ./lib/uniwidth/width.c:21:10: fatal error: uniwidth.h: No such file or directory
27
28Upstream-Status: Submitted [bison-patches@gnu.org maillist]
29
30Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
31---
32 lib/gnulib.mk | 2 ++
33 src/local.mk | 1 +
34 2 files changed, 3 insertions(+)
35
36diff --git a/lib/gnulib.mk b/lib/gnulib.mk
37index c21c656..27fb3dc 100644
38--- a/lib/gnulib.mk
39+++ b/lib/gnulib.mk
40@@ -120,6 +120,8 @@ lib_libbison_a_SOURCES =
41 lib_libbison_a_LIBADD = $(gl_LIBOBJS)
42 lib_libbison_a_DEPENDENCIES = $(gl_LIBOBJS)
43 EXTRA_lib_libbison_a_SOURCES =
44+$(lib_libbison_a_OBJECTS): $(BUILT_SOURCES) $(MOSTLYCLEANFILES:%.h)
45+$(gl_LIBOBJS): $(BUILT_SOURCES) $(MOSTLYCLEANFILES:%.h)
46
47 lib_libbison_a_CPPFLAGS = $(AM_CPPFLAGS) -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\"
48
49diff --git a/src/local.mk b/src/local.mk
50index 61dc573..b5b9079 100644
51--- a/src/local.mk
52+++ b/src/local.mk
53@@ -24,6 +24,7 @@ if RELOCATABLE_VIA_LD
54 src_bison_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)`
55 endif
56
57+$(src_bison_OBJECTS): $(BUILT_SOURCES) $(MOSTLYCLEANFILES:%.h)
58 src_bison_CFLAGS = $(AM_CFLAGS) $(WERROR_CFLAGS)
59 src_bison_SOURCES = \
60 src/AnnotationList.c \
61--
622.17.1
63
diff --git a/meta/recipes-devtools/bison/bison_3.5.4.bb b/meta/recipes-devtools/bison/bison_3.5.4.bb
index 59c34f7297..124bc41d3e 100644
--- a/meta/recipes-devtools/bison/bison_3.5.4.bb
+++ b/meta/recipes-devtools/bison/bison_3.5.4.bb
@@ -12,6 +12,7 @@ DEPENDS = "bison-native flex-native"
12SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \ 12SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
13 file://dont-depend-on-help2man.patch.patch \ 13 file://dont-depend-on-help2man.patch.patch \
14 file://add-with-bisonlocaledir.patch \ 14 file://add-with-bisonlocaledir.patch \
15 file://0001-bison-fix-the-parallel-build.patch \
15" 16"
16SRC_URI[sha256sum] = "4c17e99881978fa32c05933c5262457fa5b2b611668454f8dc2a695cd6b3720c" 17SRC_URI[sha256sum] = "4c17e99881978fa32c05933c5262457fa5b2b611668454f8dc2a695cd6b3720c"
17 18