On Tue, Jan 17, 2017 at 10:48 PM, Stephen Smalley <sds@xxxxxxxxxxxxx> wrote:
On Sat, 2017-01-14 at 15:38 +0100, Nicolas Iooss wrote:
> After libsepol is modified (for example while developing new features
> or
> fixing bugs), running "make install" in the top-level directory does
> not
> update the programs which use libsepol.a. Add this static library to
> the
> target dependencies in order to force their updates. This makes
> "make"
> use libsepol.a in the linking command without using LDLIBS.
>
> While at it, copy what commit 14d706434846 ("libselinux: Allow
> overriding libsepol.a location during build") introduced in
> libselinux
> Makefile by using a new LIBSEPOLA variable in all Makefiles.
Why did you change this?> diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
> index d17792c13350..5640a57d2768 100644
> --- a/libselinux/src/Makefile
> +++ b/libselinux/src/Makefile
> @@ -155,8 +155,8 @@ selinuxswig_python_exception.i:
> ../include/selinux/selinux.h
> $(AUDIT2WHYLOBJ): audit2why.c
> $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC
> -DSHARED -c -o $@ $<
>
> -$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ)
> - $(CC) $(CFLAGS) -shared -o $@ $^ -L. $(LDFLAGS) -lselinux
> $(LIBSEPOLA) $(PYLIBS) -L$(LIBDIR)
> +$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) $(LIBSEPOLA)
> + $(CC) $(CFLAGS) -shared -o $@ $^ -L. $(LDFLAGS) -lselinux
> $(PYLIBS) -L$(LIBDIR)
When libsepol.a is updated, $(AUDIT2WHYSO) (which is a Python extension, named something like python3audit2why.so and installed as module "selinux.audit2why") was not rebuilt. Adding $(LIBSEPOLA) to the dependencies (in order to fix this) makes libsepol.a appear in the command line through $^ so I removed $(LIBSEPOLA) from the "$(CC)..." line.
Thanks for your review,
Nicolas
_______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.