public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: joel@rtems.org
Cc: Michael Eager <eager@eagercon.com>, GCC <gcc@gcc.gnu.org>
Subject: Re: Proper Place for builtin_define(__ELF__)
Date: Fri, 23 Jul 2021 10:42:25 -0600	[thread overview]
Message-ID: <5fb4113a-ba8c-1fba-f210-925978e316e1@gmail.com> (raw)
In-Reply-To: <CAF9ehCXxc0WjtioiKn_bKy8+GEADYof2+CA6aFEZsCurUq9iOA@mail.gmail.com>



On 7/22/2021 8:12 AM, Joel Sherrill wrote:
> On Wed, Jul 21, 2021 at 10:08 PM Jeff Law <jeffreyalaw@gmail.com> wrote:
>>
>>
>> On 7/21/2021 6:31 PM, Michael Eager wrote:
>>>
>>> On 7/21/21 5:22 PM, Joel Sherrill wrote:
>>>>
>>>> On Wed, Jul 21, 2021, 7:12 PM Michael Eager <eager@eagercon.com
>>>> <mailto:eager@eagercon.com>> wrote:
>>>>
>>>>      On 7/21/21 2:28 PM, Joel Sherrill wrote:
>>>>       > Hi
>>>>       >
>>>>       > We are in the process of porting RTEMS to the Microblaze and
>>>> gcc does
>>>>       > not have __ELF__ as a predefine. In looking around at where to
>>>>      add it,
>>>>       > it looks like there are multiple ways to do it. We see
>>>> variations on
>>>>       > the following patterns:
>>>>       >
>>>>       > + dbxelf.h
>>>>       > + OS specific header in config/
>>>>       > + Arch/OS specific header
>>>>       >
>>>>       > Integrating dbxelf.h into the microblaze seems risky for one
>>>> simple
>>>>       > builtin_define(). Adding it to config/microblaze/rtems.h won't
>>>>      address
>>>>       > the microblaze-elf target.
>>>>       >
>>>>       > A suggestion on where to add the builtin_predefine is
>>>> appreciated.
>>>>
>>>>      There are very few defines for __ELF__ in the GCC target files.
>>>>
>>>>
>>>> Many  targets include dbxelf.h from the config.gcc script. There are
>>>> 130 references to that file there. That seems to be where most
>>>> architectures get it.
>>> AFAIK, no one has ever tried to build microblaze to generate stabs,
>>> and I can't see a good reason why anyone would.  Including dbxelf.h
>>> seems wrong.  I don't have an answer why other arch's do that.
>> Avoiding dbxelf would be advisable.  We're really only supporting stabs
>> for for aix anymore.  We need to start excising dbxelf from all the
>> places it's being used.
> That will take some work.
Yup.  But it's clearly the right thing to do.

>
> What about elfos.h which is referenced 168 times in config.gcc?
>
> Unfortunately, dbxelf.h and elfos.h appear to be used together a lot.
> Grep'ing for "dbxelf.h elfos.h" in config.gcc resulted in 128 hits.
I think most of elfos.h is OK, we just need to rip out the bits for 
embedded stabs contained therein.


jeff


  reply	other threads:[~2021-07-23 16:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 21:28 Joel Sherrill
2021-07-22  0:12 ` Michael Eager
2021-07-22  0:22   ` Joel Sherrill
2021-07-22  0:31     ` Michael Eager
2021-07-22  3:08       ` Jeff Law
2021-07-22 14:12         ` Joel Sherrill
2021-07-23 16:42           ` Jeff Law [this message]
2021-07-22 14:34         ` David Edelsohn

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=5fb4113a-ba8c-1fba-f210-925978e316e1@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=eager@eagercon.com \
    --cc=gcc@gcc.gnu.org \
    --cc=joel@rtems.org \
    /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).