From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6343 invoked by alias); 27 Sep 2011 16:47:33 -0000 Received: (qmail 6330 invoked by uid 22791); 27 Sep 2011 16:47:30 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Sep 2011 16:47:13 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8RGl3FN000769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Sep 2011 12:47:03 -0400 Received: from [10.36.6.165] (vpn1-6-165.ams2.redhat.com [10.36.6.165]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8RGksAa017632; Tue, 27 Sep 2011 12:46:58 -0400 Message-ID: <4E81FE66.5000206@redhat.com> Date: Tue, 27 Sep 2011 17:17:00 -0000 From: Nick Clifton User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.22) Gecko/20110906 Fedora/3.1.14-1.fc14 Thunderbird/3.1.14 MIME-Version: 1.0 To: Ramana Radhakrishnan CC: richard.earnshaw@arm.com, paul@codesourcery.com, gcc-patches@gcc.gnu.org Subject: Re: RFC: ARM: Add comment enumerating emitted .eabi_attribute tags References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg01745.txt.bz2 Hi Ramana, >> +/* Get the definitions of the ARM EABI Attribute tag values. */ >> +#define BFD_ARCH_SIZE >> +#include "elf/arm.h" > > Defining BFD_ARCH_SIZE appears to be a bit of a hack. I would also > ifdef this inclusion on TARGET_AAPCS since we shouldn't really be > caring about object attributes for non AAPCS configurations. Hmm, there does not appear to be any compile-time define that I can reliably use for this. > Does elf/arm.h get installed by bfd / binutils in some form as a part > of it's build process ? Can the compiler find elf/arm.h by default for > a non-combined-tree arm-linux-gnueabi / arm-eabi cross-build or a > native boostrap ? Err, probably not. I forgot that the elf/ subdirectory of the include/ directory is not shared between gcc and binutils. > Instead may I suggest rejigging this in a form so that we share this > header file between gcc and binutils and make sure that this is > sufficiently documented that one master copy lives in one repository > while the other is a copy of this is in the other repository ? This would be a good idea. > It > has the same problems that we have with sharing other files between > these 2 repositories but causing pain to every single script out there > to add an include path to a default build sounds wrong to me. Agreed. I think that there are two possible ways to go: 1. Create a new file include/arm-eabi-attrs.h to be shared between gcc and binutils and alter include/elf/arm.h to use this file. The problem with this idea is that it adds a target specific file to the include/ directory, which really should be target agnostic. (I know that there are some xtensa header files there, but IMHO that was a mistake). 2. Abandon using a header file at all. Instead use a configure test to see if we are using an assembler that supports textual names in a .eabi_attribute directive and if so use the names rather than the numbers. Any preference ? Cheers Nick