X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Flibsepol%2F0001-support-static-only.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Flibsepol%2F0001-support-static-only.patch;h=b9746807bab997349bd660f564c6f34d71434f9f;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/libsepol/0001-support-static-only.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/libsepol/0001-support-static-only.patch new file mode 100644 index 0000000..b974680 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/libsepol/0001-support-static-only.patch @@ -0,0 +1,44 @@ +Add support for static-only build + +Instead of unconditionally building shared libraries, this patch +improves the libsepol build system with a "STATIC" variable, which +when defined to some non-empty value, will disable the build of shared +libraries. It allows to support cases where the target architecture +does not have support for shared libraries. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -17,7 +17,12 @@ + CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute + override CFLAGS += -I. -I../include -D_GNU_SOURCE + +-all: $(LIBA) $(LIBSO) $(LIBPC) ++ALL_TARGETS = $(LIBA) $(LIBPC) ++ifeq ($(STATIC),) ++ALL_TARGETS += $(LIBSO) ++endif ++ ++all: $(ALL_TARGETS) + + $(LIBA): $(OBJS) + $(AR) rcs $@ $^ +@@ -39,11 +44,13 @@ + install: all + test -d $(LIBDIR) || install -m 755 -d $(LIBDIR) + install -m 644 $(LIBA) $(LIBDIR) +- test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR) +- install -m 755 $(LIBSO) $(SHLIBDIR) + test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig + install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig ++ifeq ($(STATIC),) ++ test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR) ++ install -m 755 $(LIBSO) $(SHLIBDIR) + cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET) ++endif + + relabel: + /sbin/restorecon $(SHLIBDIR)/$(LIBSO)