public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1603] modula2: Fix bootstrap
@ 2023-06-07  7:46 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-06-07  7:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:00bfc503cc3b3e8f354afeac9b482649418fb70f

commit r14-1603-g00bfc503cc3b3e8f354afeac9b482649418fb70f
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Jun 7 09:45:13 2023 +0200

    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).

Diff:
---
 gcc/m2/Make-lang.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index e41a800cee8..973afef60e8 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -511,6 +511,8 @@ GM2_LIBS_BOOT     = m2/gm2-compiler-boot/gm2.a \
                     m2/gm2-libs-boot/libgm2.a \
                     $(GM2-BOOT-O)
 
+$(GM2_C_OBJS) : | $(generated_files)
+
 cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) $(m2.prev)
 	cp -p $< $@

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-07  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-07  7:46 [gcc r14-1603] modula2: Fix bootstrap Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).