From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id BAD153858C54; Wed, 7 Jun 2023 07:46:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BAD153858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686123975; bh=ptbpn3W18nZtGUmlvcw7zA/v9rsoq64or4ndb9qn2JE=; h=From:To:Subject:Date:From; b=DhPWh4IukGBvOaYHoVUSiGWT2OY9tLp0yx9spF7+ve/bcOzVHGd1lc29FYL4z+5Vd z6Lu/KyRdvOcVUhyosnQ1X4tuGD1X+MntHhPIiv2dUCJc9bRVksvFzmheRcBsdul/S 8kt5jR3L8tcQ36cJfEOYntVhDeE8kiwQbb5x1jDg= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-1603] modula2: Fix bootstrap X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: 631e86b7adb55fb5ce418ce4cb5a59a1a3a6faa7 X-Git-Newrev: 00bfc503cc3b3e8f354afeac9b482649418fb70f Message-Id: <20230607074615.BAD153858C54@sourceware.org> Date: Wed, 7 Jun 2023 07:46:15 +0000 (GMT) List-Id: https://gcc.gnu.org/g:00bfc503cc3b3e8f354afeac9b482649418fb70f commit r14-1603-g00bfc503cc3b3e8f354afeac9b482649418fb70f Author: Jakub Jelinek 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 * 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 $< $@