[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] bison: fix the parallel build

From: mingli.yu
Subject: [PATCH v2] bison: fix the parallel build
Date: Thu, 14 May 2020 12:35:32 +0800

From: Mingli Yu <address@hidden>

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 

Signed-off-by: Mingli Yu <address@hidden>
 lib/ | 2 ++
 src/  | 1 +
 2 files changed, 3 insertions(+)

diff --git a/lib/ b/lib/
index 5ce2a5c..4ac4f78 100644
--- a/lib/
+++ b/lib/
@@ -121,6 +121,8 @@ lib_libbison_a_SOURCES =
 lib_libbison_a_LIBADD = $(gl_LIBOBJS)
 lib_libbison_a_DEPENDENCIES = $(gl_LIBOBJS)
 EXTRA_lib_libbison_a_SOURCES =
 lib_libbison_a_CPPFLAGS = $(AM_CPPFLAGS) -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\"
diff --git a/src/ b/src/
index c072d99..89321dd 100644
--- a/src/
+++ b/src/
@@ -24,6 +24,7 @@ if RELOCATABLE_VIA_LD
   src_bison_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)`
 src_bison_SOURCES =                             \
   src/AnnotationList.c                          \

reply via email to

[Prev in Thread] Current Thread [Next in Thread]