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] make it possible for the target to rename ".tm_clone_table"


On Fri, 18 Nov 2011, Iain Sandoe wrote:

> > > Index: gcc/defaults.h
> > > ===================================================================
> > > --- gcc/defaults.h	(revision 181476)
> > > +++ gcc/defaults.h	(working copy)
> > > @@ -392,6 +392,14 @@ see the files COPYING3 and COPYING.RUNTIME respect
> > > #endif
> > > #endif
> > > 
> > > +/* If we have named sections, provide a name for the transaction clone
> > > +   table section.  */
> > > +#if defined (TARGET_ASM_NAMED_SECTION)
> > > +#ifndef TM_CLONE_TABLE_SECTION_NAME
> > > +#define TM_CLONE_TABLE_SECTION_NAME ".tm_clone_table"
> > > +#endif
> > > +#endif
> > > +
> > 
> > This, together with the unconditional use in varasm.c, will lead to a
> > bootstrap failure on Tru64 UNIX, which lacks named sections completely.
> 
> right, it was worrying me what a target without named sections does -
> ... I can easily remove the #if defined (TARGET_ASM_NAMED_SECTION)
> ... what happens when the code runs then?

Conditions on definedness of TARGET_ASM_NAMED_SECTION are rather fragile - 
it's a target hook not properly a target macro, it shouldn't need to be 
defined in tm.h.  There are two such tests in defaults.h and two in 
target-def.h, but we should remove them rather than adding to them.  
TM_CLONE_TABLE_SECTION_NAME would better be a target hook, not a macro.

As I noted in <http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01642.html> 
(when cleaning up another such #ifdef conditional) there are actually very 
few targets without named sections.  And if we deprecate the a.out OpenBSD 
targets then there will be even fewer.

-- 
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]