From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 9001B385741A for ; Tue, 27 Jul 2021 14:24:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9001B385741A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 16REN18k016031; Tue, 27 Jul 2021 09:23:02 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 16REN1nx016028; Tue, 27 Jul 2021 09:23:01 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 27 Jul 2021 09:23:00 -0500 From: Segher Boessenkool To: Bill Schmidt Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 23/55] rs6000: Incorporate new builtins code into the build machinery Message-ID: <20210727142300.GW1583@gate.crashing.org> References: <4f27468885fd84aba5f0dc2369a284f3cffa2b34.1623941441.git.wschmidt@linux.ibm.com> <20210721185830.GK1583@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Tue, 27 Jul 2021 14:24:04 -0000 Hi! On Mon, Jul 26, 2021 at 10:26:25PM -0500, Bill Schmidt wrote: > On 7/21/21 1:58 PM, Segher Boessenkool wrote: > >On Thu, Jun 17, 2021 at 10:19:07AM -0500, Bill Schmidt wrote: > >>+# TODO: Whenever GNU make 4.3 is the minimum required, we should use > >>+# grouped targets on this: > >That may be quite a while still. GNU make is the foundation of > >everything, so we cannot require very new versions of it ever. > > > >In the meantime, you can make all these targets depend on an > >intermediate target (that you mark with .INTERMEDIATE), and have that > >intermediate target have the dependencies. This is from version 3.74.3 > >and we require 3.80 already, so this is fine. > I think this is too artificial. It is the generic solution. > Right now I just make the two generated > .h files depend on the generated .c file, which works since they are all > generated together or none of them are generated.  That seems simple > enough and more self-documenting to me. It only works if you make sure the updates to the .c file are always seen by make only after the updates to the .h files are visible. The window in which it can race is small, but you have to make it empty :-( If you can guarantee that (ordering the fclose()s appropriately is enough I believe -- and add a comment for that :-) ) this should be fine, sure. Segher