This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/8] add default for PCC_BITFIELD_TYPE_MATTERS
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Trevor Saunders <tbsaunde at tbsaunde dot org>, Andreas Schwab <schwab at linux-m68k dot org>, Jeff Law <law at redhat dot com>, <tbsaunde+gcc at tbsaunde dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 30 Apr 2015 17:41:57 +0000
- Subject: Re: [PATCH 3/8] add default for PCC_BITFIELD_TYPE_MATTERS
- Authentication-results: sourceware.org; auth=none
- References: <1430114140-15817-1-git-send-email-tbsaunde+gcc at tbsaunde dot org> <1430114140-15817-4-git-send-email-tbsaunde+gcc at tbsaunde dot org> <87oam7nmck dot fsf at igel dot home> <20150429212811 dot GA17482 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <87383iob0i dot fsf at igel dot home> <5541548F dot 40608 at redhat dot com> <20150429222548 dot GB17482 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <87r3r2i0el dot fsf at igel dot home> <20150430122513 dot GB1508 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <20150430123344 dot GQ1751 at tucnak dot redhat dot com>
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