From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 5D80938582B2 for ; Mon, 24 Oct 2022 06:35:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5D80938582B2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 361402202B; Mon, 24 Oct 2022 06:35:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666593326; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pqOD7FWvFrX3BIanasEpnei6+Go1+9/EsfRLVrGNEkI=; b=WOB4ZUa7sDD0OH0JGO+T6oTECoRqkt/l14HTbGVyQkhNBgesnhX/Y8elpOVOfGjlOWcgMF EaxNuHs/HpkWRFgwAATGm1R8vmT5CatY7P6NdimLJEfxdckpXn91i6bZUDl6GvMoGmkbt/ o1OAMoUnrEAJFERL3jhiI8yjjdXN2oI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666593326; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pqOD7FWvFrX3BIanasEpnei6+Go1+9/EsfRLVrGNEkI=; b=1u6l4Xi9F5svf5XSahSMchsEZq1SsPrRNcRJnfMszMAFy/gSc8U9IdAwKxvahOkt0wpcNS V6i4dpRJ+EBy5PAA== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id F323E2C141; Mon, 24 Oct 2022 06:35:25 +0000 (UTC) Date: Mon, 24 Oct 2022 06:35:25 +0000 (UTC) From: Richard Biener To: ibuclaw@gdcproject.org, "Joseph S. Myers" cc: gcc-patches@gcc.gnu.org, "jlaw@ventanamicro.com" Subject: Re: [PATCH] d: Remove D-specific version definitions from target headers In-Reply-To: <1090795211.238603.1666524949489@office.mailbox.org> Message-ID: References: <20221017180844.3492051-1-ibuclaw@gdcproject.org> <1090795211.238603.1666524949489@office.mailbox.org> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, 23 Oct 2022, ibuclaw@gdcproject.org wrote: > > On 17/10/2022 20:08 CEST Iain Buclaw wrote: > > > > > > Hi, > > > > This splits up the targetdm sources so that each file only handles one > > target platform. > > > > Having all logic kept in the headers means that they could become out of > > sync when a new target is added (loongarch*-*-linux*) or accidentally > > broken if some headers in tm_file are omitted or changed about. > > > > There might be an open bikeshed question as to appropriate names for > > some of the platform sources (kfreebsd-d.cc or kfreebsd-gnu-d.cc). > > > > Bootstrapped and regression tested on x86_64-linux-gnu, and also built > > i686-cygwin, i686-gnu, i686-kfreebsd-gnu, i686-kopensolaris-gnu, > > x86_64-cygwin, x86_64-w64-mingw32 cross compilers, the dumps of all > > predefined version identifiers remain correct in all configurations. > > > > OK? > > > > Ping? > > I'll apply this tomorrow, but there is a general open question about > whether taking logic out of target headers and putting it in config.gcc > is the right approach moving forward for non C/C++ front-ends. This is > also relevant for Rust, which initially put all their target support > definitions in headers, and have since removed the entire tangled mess > that created. I think Joseph has the best guidance in these areas. My opinion is that things that can be done in config.gcc are fine to do there, especially if it simplifies things or avoids problems in other places of the compiler. Richard.