[PATCH v4] genemit.c (main): split insn-emit.c for compiling parallelly
Jeff Law
law@redhat.com
Tue Aug 25 19:31:22 GMT 2020
On Sat, 2020-08-01 at 13:38 +0200, Václav Haisman via Gcc-patches wrote:
> On 01. 08. 20 13:02, Jojo R wrote:
> > gcc/ChangeLog:
> >
> > * genemit.c (main): Print 'split line'.
> > * Makefile.in (insn-emit.c): Define split count and file
> >
> > ---
> > gcc/Makefile.in | 11 +++++++
> > gcc/genemit.c | 87 ++++++++++++++++++++++++++++---------------------
> > 2 files changed, 60 insertions(+), 38 deletions(-)
> >
> > diff --git a/gcc/Makefile.in b/gcc/Makefile.in
> > index 2ba76656dbf..bc0b3e6d343 100644
> > --- a/gcc/Makefile.in
> > +++ b/gcc/Makefile.in
> > @@ -1253,6 +1253,13 @@ ANALYZER_OBJS = \
> > # We put the *-match.o and insn-*.o files first so that a parallel make
> > # will build them sooner, because they are large and otherwise tend to be
> > # the last objects to finish building.
> > +
> > +insn-generated-split-num = $(shell nproc)
> > +
> > +insn-emit-split-c = $(foreach o, $(shell for i in {1..$(insn-generated-split-num)}; do echo $$i; done), insn-emit$(o).c)
>
> I believe {1..10} is a bashism. Is it OK in this context to require Bash?
Nope. It needs to be more portable than that.
jeff
More information about the Gcc-patches
mailing list