public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagercon.com>
To: gcc@gcc.gnu.org
Subject: Re: Proper Place for builtin_define(__ELF__)
Date: Wed, 21 Jul 2021 17:12:25 -0700	[thread overview]
Message-ID: <2edcb737-484b-41ed-f05d-4e005cf5759f@eagercon.com> (raw)
In-Reply-To: <CAF9ehCVUJ4eiyZO2MF_bq30EmXcqVLg1-HEAvHjgqsYY-2NiBw@mail.gmail.com>

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.

Why don't you put this in rtems.h?

Alternately, you might put it in microblaze-s.c, wrapped with
#ifdef OBJECT_FORMAT_ELF/#endif.

-- 
Michael Eager

  reply	other threads:[~2021-07-22  0:12 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 [this message]
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
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=2edcb737-484b-41ed-f05d-4e005cf5759f@eagercon.com \
    --to=eager@eagercon.com \
    --cc=gcc@gcc.gnu.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).