]> git.ipfire.org Git - thirdparty/gcc.git/commit
modula2: Fix bootstrap
authorJakub Jelinek <jakub@redhat.com>
Wed, 7 Jun 2023 07:45:13 +0000 (09:45 +0200)
committerJakub Jelinek <jakub@redhat.com>
Wed, 7 Jun 2023 07:45:13 +0000 (09:45 +0200)
commit00bfc503cc3b3e8f354afeac9b482649418fb70f
tree664581638f56db3c48966752c5f8a081edb43ee9
parent631e86b7adb55fb5ce418ce4cb5a59a1a3a6faa7
modula2: Fix bootstrap

internal-fn.h since yesterday includes insn-opinit.h, which is a generated
header.
One of my bootstraps today failed because some m2 sources started compiling
before insn-opinit.h has been generated.

Normally, gcc/Makefile.in has
  # In order for parallel make to really start compiling the expensive
  # objects from $(OBJS) as early as possible, build all their
  # prerequisites strictly before all objects.
  $(ALL_HOST_OBJS) : | $(generated_files)

rule which ensures that all the generated files are generated before
any $(ALL_HOST_OBJS) objects start, but use order-only dependency for
this because we don't want to rebuild most of the objects whenever one
generated header is regenerated.  After the initial build in an empty
directory we'll have .deps/ files contain the detailed dependencies.

$(ALL_HOST_OBJS) includes even some FE files, I think in the m2 case
would be m2_OBJS, but m2/Make-lang.in doesn't define those.

The following patch just adds a similar rule to m2/Make-lang.in.
Another option would be to set m2_OBJS variable in m2/Make-lang.in to
something, but not really sure to which exactly and why it isn't
done.

2023-06-07  Jakub Jelinek  <jakub@redhat.com>

* Make-lang.in: Build $(generated_files) before building
all $(GM2_C_OBJS).
gcc/m2/Make-lang.in