From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id 426873858410 for ; Fri, 29 Oct 2021 14:48:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 426873858410 Received: from smtp102.mailbox.org (smtp102.mailbox.org [80.241.60.233]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Hglff3FcYzQkBf; Fri, 29 Oct 2021 16:48:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Date: Fri, 29 Oct 2021 16:48:21 +0200 (CEST) From: ibuclaw@gdcproject.org To: Joseph Myers , Richard Biener Cc: gcc-patches@gcc.gnu.org Message-ID: <88967537.63492.1635518901535@office.mailbox.org> In-Reply-To: References: <20211023200005.xknhnzfa7eyny5zf@lug-owl.de> <20211024072015.gaemuuwr4z2cx2oh@lug-owl.de> Subject: Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: D91515AF X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Fri, 29 Oct 2021 14:48:31 -0000 > On 26/10/2021 03:28 Joseph Myers wrote: > > > On Mon, 25 Oct 2021, Richard Biener via Gcc-patches wrote: > > > So it looks like tm_d.h is much more stripped down compared to regular > > tm_p.h but also oddly enough config/default-d.c includes tm_d.h > > while config/default-c.c explicitely documents itself to not do that. > > I think the intent of that comment in default-c.c (which I wrote) was that > if a separate tm_c.h is needed, it should use its own headers, disjoint > from those used by tm.h. In particular, as noted in the original patch > submission > , that > avoids making macros used only to define hooks visible throughout the > compiler. > > > Is it maybe a bug that tm_d.h includes defaults.h at all? Should > > It's a bug that it includes defaults.h, and a bug that it includes > ${cpu_type}/${cpu_type}.h. Any macros used only to define D hooks should > be in completely separate headers that aren't used elsewhere in the > compiler. > > > "d defaults" be in a defaults-d.h instead? If I remove the > > Yes, and likewise any target-specific overrides of such macros should be > in a separate header, not ${cpu_type}/${cpu_type}.h. > So the what default-d.c is doing, is pulling down per-CPU back-end information to populate the targetdm structure where there's a supported CPU, but not platform. The why it is doing that was I wanted to avoid both having #ifdef's in the D front-end, and altering gcc/target.def. It seems then that either all TARGET_D_ macros should be moved to ${cpu_type}/${cpu_type}-d.h, or do one of alternatives I was trying to avoid. Iain.