gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: [libobjc-noheaders] First patch to the branch

Subject: Re: [libobjc-noheaders] First patch to the branch
From: Richard Earnshaw
Date: Thu, 17 Nov 2005 13:26:40 +0000
On Thu, 2005-11-17 at 12:40, Paolo Bonzini wrote:
> > This assumes that the definitions for the target are in
> > <target>/<target>.h, which isn't entirely true for ARM. 
> 
> It is as far as grep is concerned
> 
> ~/cvs/gcc/gcc/config/arm bonzinip$ egrep 
> 'BIGGEST_FIELD_ALIGNMENT|ROUND_TYPE_(ALIGN|SIZE)|PCC_BITFIELD_TYPE_MATTERS' 
> *.h
> arm.h:   on BIGGEST_FIELD_ALIGNMENT.  */
> arm.h:#define BIGGEST_FIELD_ALIGNMENT 64
> arm.h:#ifndef PCC_BITFIELD_TYPE_MATTERS
> arm.h:#define PCC_BITFIELD_TYPE_MATTERS TARGET_AAPCS_BASED
> 
> It is not perfect, actually it *is* buggy.  But it's no worse than it 
> was before.  libobjc was using this hack to ignore target options:
> 
> /* Some ROUND_TYPE_ALIGN macros use TARGET_foo, and consequently
>     target_flags.  Define a dummy entry here to so we don't die.
>     We have to rename it because target_flags may already have been
>     declared extern.  */
> #define target_flags not_target_flags
> static int __attribute__ ((__unused__)) not_target_flags = 0;

I guess what I'm trying to suggest is that these should really be
exposed as potential multilib variants.  

OK, if the system doesn't support all the relevant variants you will
sometimes get the wrong thing, but at least the default values will
correspond to the way the compiler is set up by default, instead of
guessing (and normally guessing wrongly).

R.

<Prev in Thread] Current Thread [Next in Thread>