From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by sourceware.org (Postfix) with ESMTPS id ED7033861C64 for ; Thu, 22 Jul 2021 14:12:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED7033861C64 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f48.google.com with SMTP id i5so8782698lfe.2 for ; Thu, 22 Jul 2021 07:12:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=h6FoQdhm8kBUY8aFle+AP6rKi7x0L3VOgOJJ/C4iQc8=; b=A8ouNLl6OTOCiNJTErDGWvk0PNL58xS5mx8Uz9VNyGCUx3dm4H1Ac/JER012mT/iBj 3PbYv4Y4WpQcagBU5cdPntl0vzDqzZJgCQb5BxEyV3C6sNd6rTq5YBE+LXlu1ObG8FGR NpS8+bOFTFG1PW/sjgIVcR6Td+lxClSwUFPNTw1dRQ10HLuBro/RvVm8Y3hDAsVX3rfD DELrRne5FCKR0eyu0O1tB0z3UpRHAoKajrNsw31DQAW/+eiUH/tj0S0RmVaXFl22k8Rm LVXkymNx5nDAgR82RGjLRsIFQz/4UjUMncO8Q3h2uzGcfW1IXa2omSQqak6poEjP82bi sb8Q== X-Gm-Message-State: AOAM531Md8aFu3XvIQnDOUEwU1kzgiTRAbWxJDzj4GcOfvx3uQptt1Bn BNMcK4UJDqp61NXL2ZHc6tG3T1mLmYpzIw== X-Google-Smtp-Source: ABdhPJyxUkYGpeHiXcv92QWfJUSZf+5JN6xQUWZ7Q7YOJPn5UPZK7vP3804yeDqhDFj3phuICk4evQ== X-Received: by 2002:ac2:4845:: with SMTP id 5mr8031383lfy.313.1626963162044; Thu, 22 Jul 2021 07:12:42 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id f1sm1718434lfm.62.2021.07.22.07.12.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jul 2021 07:12:41 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id g22so8829383lfu.0 for ; Thu, 22 Jul 2021 07:12:41 -0700 (PDT) X-Received: by 2002:ac2:44c2:: with SMTP id d2mr2057598lfm.50.1626963160663; Thu, 22 Jul 2021 07:12:40 -0700 (PDT) MIME-Version: 1.0 References: <2edcb737-484b-41ed-f05d-4e005cf5759f@eagercon.com> In-Reply-To: Reply-To: joel@rtems.org From: Joel Sherrill Date: Thu, 22 Jul 2021 09:12:29 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Proper Place for builtin_define(__ELF__) To: Jeff Law Cc: Michael Eager , GCC Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3031.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2021 14:12:45 -0000 On Wed, Jul 21, 2021 at 10:08 PM Jeff Law 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 >> > 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. 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. --joel > > jeff >