public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: ibuclaw@gdcproject.org
To: Joseph Myers <joseph@codesourcery.com>,
	Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS
Date: Fri, 29 Oct 2021 16:48:21 +0200 (CEST)	[thread overview]
Message-ID: <88967537.63492.1635518901535@office.mailbox.org> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2110260119050.1593729@digraph.polyomino.org.uk>

> On 26/10/2021 03:28 Joseph Myers <joseph@codesourcery.com> 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 
> <https://gcc.gnu.org/legacy-ml/gcc-patches/2011-04/msg00434.html>, 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.

  reply	other threads:[~2021-10-29 14:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 14:25 Richard Biener
2021-09-28  6:14 ` Richard Biener
2021-09-28 13:18   ` Koning, Paul
2021-10-15  8:23     ` Richard Biener
2021-10-23 20:00 ` Jan-Benedict Glaw
2021-10-23 22:19   ` Jeff Law
2021-10-24  6:36   ` Richard Biener
2021-10-24  7:20     ` Jan-Benedict Glaw
2021-10-25  8:25       ` Richard Biener
2021-10-26  1:28         ` Joseph Myers
2021-10-29 14:48           ` ibuclaw [this message]
2022-08-28  7:50 ` Jan-Benedict Glaw
2022-08-28 21:32   ` Jeff Law
2022-08-29 20:11     ` Jan-Benedict Glaw
2022-08-31 16:05       ` Jeff Law
2022-09-07 10:50       ` Jan-Benedict Glaw
2022-09-07 11:57         ` Richard Biener
  -- strict thread matches above, loose matches on Subject: below --
2021-09-10 12:12 Richard Biener
2021-09-10 15:08 ` Michael Matz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88967537.63492.1635518901535@office.mailbox.org \
    --to=ibuclaw@gdcproject.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).