[patch] optional -lsepol

Denis Vlasenko vda.linux at googlemail.com
Fri Jun 8 07:47:12 UTC 2007


On Wednesday 06 June 2007 02:52, Yuichi Nakamura wrote:
> On Wed, 6 Jun 2007 00:53:00 +0200
> Denis Vlasenko  wrote:
> >  ifeq ($(CONFIG_SELINUX),y)
> > -LDLIBS += -lselinux -lsepol
> > +LDLIBS += -lselinux
> >  endif
> >  
> > +ifeq ($(CONFIG_SELINUX_SEPOL),y)
> > +LDLIBS += -lsepol
> > +endif
> > 
> > This will work, yes. But ideally I want a system which
> > links in -lsepol only if otherwise link fails.
> > 
> > See how trylink script does it for libm and libcrypt.
> > Ugly hack, but needs no build magic and avoids situations when
> > CONFIG_LIBM etc are set needlessly.
> I see.
> I fixed trylink and included -lsepol check.
> Please review attached one.

Thanks, but it isn't good enough.

Current trylink, it's a hack because of combinatorial explosion.
Even now it will link busybox up to three times (bad, but tolerable),
but throw in a few more libs and we're in trouble...

Need better solution...
--
vda



More information about the busybox mailing list