From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 01FB03858C54 for ; Wed, 7 Jun 2023 08:42:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01FB03858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DCA21AB6; Wed, 7 Jun 2023 01:43:12 -0700 (PDT) Received: from [10.57.74.33] (unknown [10.57.74.33]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9DAB73F587; Wed, 7 Jun 2023 01:42:26 -0700 (PDT) Message-ID: <2cdf6ac3-3f3d-d006-abd1-3aac5d5fef80@arm.com> Date: Wed, 7 Jun 2023 09:42:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] modula2: Fix bootstrap Content-Language: en-US To: Jakub Jelinek , Gaius Mulley Cc: Richard Biener , Richard Sandiford , gcc-patches@gcc.gnu.org References: <37abc128-776c-0f04-f755-30e514909e15@arm.com> <55abff3b-fb69-d2d3-34a7-f86b54c27bc1@arm.com> From: "Andre Vieira (lists)" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Thanks Jakub! I do need those includes and sorry I broke your bootstrap it didn't show up on my aarch64-unknown-linux-gnu bootstrap, I'm guessing the rules there were just run in a different order. Glad you were able to fix it :) On 06/06/2023 22:28, Jakub Jelinek wrote: > Hi! > > 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. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2023-06-06 Jakub Jelinek > > * Make-lang.in: Build $(generated_files) before building > all $(GM2_C_OBJS). > > --- gcc/m2/Make-lang.in.jj 2023-05-04 09:31:27.289948109 +0200 > +++ gcc/m2/Make-lang.in 2023-06-06 21:38:26.655336041 +0200 > @@ -511,6 +511,8 @@ GM2_LIBS_BOOT = m2/gm2-compiler-boot > m2/gm2-libs-boot/libgm2.a \ > $(GM2-BOOT-O) > > +$(GM2_C_OBJS) : | $(generated_files) > + > cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) $(m2.prev) > cp -p $< $@ > > > > Jakub >