This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 v2] intl: reintroduce unintentionally disabled optimization


On Mon, Feb 22, 2016 at 04:17:46AM -0500, Mike Frysinger wrote:
> On 24 Jan 2016 21:13, Dmitry V. Levin wrote:
> > HAVE_BUILTIN_EXPECT macro was removed by commit glibc-2.14-280-g3ce1f29,
> > but then its use was unintentionally reintroduced during merge with GNU
> > gettext 0.19.3 by commit glibc-2.20-324-g6d24885, effectively disabling
> > all optimization based on __builtin_expect.  As intl files are also part
> > of GNU gettext, HAVE_BUILTIN_EXPECT macro cannot be removed, so define
> > it unconditionally in config.h.in instead.
> > 
> > [BZ #19512]
> > * config.h.in (HAVE_BUILTIN_EXPECT): New macro.
> > ---
> >  config.h.in | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/config.h.in b/config.h.in
> > index ec9c8bc..13c0044 100644
> > --- a/config.h.in
> > +++ b/config.h.in
> > @@ -37,6 +37,11 @@
> >  /* Define if static NSS modules are wanted.  */
> >  #undef	DO_STATIC_NSS
> >  
> > +/* Assume that the compiler supports __builtin_expect.
> > +   This macro is necessary for proper compilation of code
> > +   shared between GNU libc and GNU gettext projects.  */
> > +#define HAVE_BUILTIN_EXPECT 1
> > +
> >  /* Define if the compiler supports __builtin_memset.  */
> >  #undef	HAVE_BUILTIN_MEMSET
> 
> shouldn't this be an AC_DEFINE in configure.ac instead ?
> or do we not have a policy for that ?

We certainly do have some macros defined directly in this file:
$ grep '#define' config.h.in
#define HAVE_IFUNC 0
#define	HAVE_STRERROR	1
#define HAVE_REGEX 1
#define ARM_PCREL_MOVW_OK 0
#define HAVE_PT_CHOWN 0
#define HAVE_BUILTIN_TRAP 0
#define HAVE_PPC_FCFID 0
#define HAVE_PPC_FCTIDZ 0


-- 
ldv

Attachment: pgpGVoONHxO_v.pgp
Description: PGP signature


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