This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/8] add default for PCC_BITFIELD_TYPE_MATTERS


On Thu, 30 Apr 2015, Jakub Jelinek wrote:

> > I guess the "best" thing to do is justadd a
> > __PCC_BITFIELD_TYPE_MATTERS__ that gcc defines and use that in libobjc?
> 
> I think adding way too many predefines, especially rarely used ones, is
> harmful, certainly it isn't free, consider -g3 or -dD where it will all end
> up in, additional gcc start overhead, ... 

That's why we have -fbuilding-libgcc.  It would seem reasonable enough to 
me to use that when building other target libraries that need such 
information.

(See bug 24775 regarding the general issue with libobjc using GCC's struct 
layout target macros - I think there was an idea of a way to rework that 
libobjc code, but haven't looked at the details of Andrew Pinski's old 
work referred to in that bug; -fbuilding-libgcc may not be the optimal way 
of dealing with PCC_BITFIELD_TYPE_MATTERS, but ought to work as an interim 
fix.  More generally, regarding host-side target macros used in target 
code, see my suggestions at 
<https://gcc.gnu.org/wiki/Top-Level_Libgcc_Migration>.  It's always 
necessary, when changing the semantics of a target macro or converting it 
into a hook, to watch out for uses outside the gcc/ directory, until all 
the remaining uses in target code have been dealt with.)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]