public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-1603] modula2: Fix bootstrap
Date: Wed,  7 Jun 2023 07:46:15 +0000 (GMT)	[thread overview]
Message-ID: <20230607074615.BAD153858C54@sourceware.org> (raw)

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 $< $@

                 reply	other threads:[~2023-06-07  7:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230607074615.BAD153858C54@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).