From patchwork Tue Jun 6 21:28:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 70678 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8F26E3858281 for ; Tue, 6 Jun 2023 21:29:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F26E3858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686086942; bh=vzPHSxxBtaCjGMkRVzHB83VGV94z+GepK30XMYjx9xM=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=wikrFKAZJP2UkF7sawnVTFVuq4oJl3v7KkcJXcvMI51NMkpWq4Pf6FTZOePtDpXt1 Emoh+DPVNwzzLscNATzsDlR/K/7XG1rMt56meZQxezNDXSGAX/XSIjwn9xtg8GQigi IXqM3CtwK+1HWKEeSQsyIQa8b8bHefHwLFG9ByxQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 248F73858D38 for ; Tue, 6 Jun 2023 21:28:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 248F73858D38 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-rq9iPxqgPQeV7zTopKrJ7w-1; Tue, 06 Jun 2023 17:28:31 -0400 X-MC-Unique: rq9iPxqgPQeV7zTopKrJ7w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15FB13802281; Tue, 6 Jun 2023 21:28:31 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B491940D1B66; Tue, 6 Jun 2023 21:28:30 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 356LSR3P1356465 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 6 Jun 2023 23:28:28 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 356LSLfj1356462; Tue, 6 Jun 2023 23:28:21 +0200 Date: Tue, 6 Jun 2023 23:28:21 +0200 To: Gaius Mulley Cc: Andre Vieira , Richard Biener , Richard Sandiford , gcc-patches@gcc.gnu.org Subject: [PATCH] modula2: Fix bootstrap Message-ID: References: <37abc128-776c-0f04-f755-30e514909e15@arm.com> <55abff3b-fb69-d2d3-34a7-f86b54c27bc1@arm.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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). Jakub --- 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 $< $@