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] nscd: fix compilation flags


On Tue, Oct 02, 2012 at 12:17:33AM -0400, Mike Frysinger wrote:
> On Monday 01 October 2012 18:50:56 Dmitry V. Levin wrote:
> > Commit 61653dfb81b776bb72ce4304175b861d77c357a8 added support for
> > compilers predefining _FORTIFY_SOURCE by adding -U_FORTIFY_SOURCE to
> > CPPFLAGS for these compilers, but that change doesn't work quite well in
> > case of nscd: its Makefile sets _FORTIFY_SOURCE using CFLAGS instead of
> > CPPFLAGS and, thanks to compilation rules defined in Makerules, CPPFLAGS
> > are passed to compiler after CFLAGS, resulting to a build with
> > _FORTIFY_SOURCE turned off.
> 
> LGTM
> 
> independent but related, i wonder about nscd_helper.c nscd_getserv_r.c 
> nscd_netgroup.c ... shouldn't they also be listed ?

These files go to libc_pic.a, so -DIS_IN_nscd=1 is probably not appropriate
for them.  I suppose -D_FORTIFY_SOURCE=2 is perfectly OK for that part of nss,
but I haven't tested it.

> should we be able to 
> express CFLAGS/CPPFLAGS via the active directory so that we don't have this 
> out-of-sync behavior ?  CFLAGS-nscd/ rather than nscd-cflags so that all files 
> automatically get built with it ?

Yes, and there is no surprise that selinux.c was forgotten as result.
I'm testing a patch that would replace those 27 repeating
"CFLAGS-*.c += $(nscd-cflags)" lines with a more robust approach.


-- 
ldv

Attachment: pgp00000.pgp
Description: PGP signature


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