Re: [PATCH] policycoreutils: fix sandbox Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2011-09-15 at 19:38 +0200, Guido Trentalancia wrote:
> On Thu, 2011-09-15 at 13:13 -0400, Stephen Smalley wrote:
> > Fix sandbox Makefile so that make DESTDIR=~/out install works again.
> > 
> > Signed-off-by:  Stephen Smalley <sds@xxxxxxxxxxxxx>
> > 
> > ---
> > 
> >  policycoreutils/sandbox/Makefile |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/policycoreutils/sandbox/Makefile b/policycoreutils/sandbox/Makefile
> > index 21df0c4..4566810 100644
> > --- a/policycoreutils/sandbox/Makefile
> > +++ b/policycoreutils/sandbox/Makefile
> > @@ -2,6 +2,7 @@
> >  PREFIX ?= ${DESTDIR}/usr
> >  INITDIR ?= ${DESTDIR}/etc/rc.d/init.d/
> >  SYSCONFDIR ?= ${DESTDIR}/etc/sysconfig
> > +LIBDIR ?= $(PREFIX)/lib
> >  BINDIR ?= $(PREFIX)/bin
> >  SBINDIR ?= $(PREFIX)/sbin
> >  MANDIR ?= $(PREFIX)/share/man
> > @@ -13,7 +14,7 @@ LDLIBS += -lselinux -lcap-ng
> >  all: sandbox seunshare sandboxX.sh start
> >  
> >  seunshare: seunshare.o $(EXTRA_OBJS)
> > -	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
> > +	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) -L$(LIBDIR)
> 
> EXTRA_OBJS is not defined therefore it is empty unless passed from the
> command-line...

I didn't introduce or modify the use of EXTRA_OBJS; that isn't affected
by my patch.

> Perhaps you meant the -L flag goes before the LDLIBS (which is made just
> of -l flags) ?
> 
> as in: 
> 
> -	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
> +	$(CC) $(LDFLAGS) -o $@ $^ -L$(LIBDIR) $(LDLIBS)

It doesn't matter.  Per man ld:
 "All -L options apply to all -l options, regardless of the order in
which the options appear."

And my patch does fix the problem.

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux