The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libsepol / 0001-support-static-only.patch
1 Add support for static-only build
2
3 Instead of unconditionally building shared libraries, this patch
4 improves the libsepol build system with a "STATIC" variable, which
5 when defined to some non-empty value, will disable the build of shared
6 libraries. It allows to support cases where the target architecture
7 does not have support for shared libraries.
8
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10
11 Index: b/src/Makefile
12 ===================================================================
13 --- a/src/Makefile
14 +++ b/src/Makefile
15 @@ -17,7 +17,12 @@
16  CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute
17  override CFLAGS += -I. -I../include -D_GNU_SOURCE
18  
19 -all: $(LIBA) $(LIBSO) $(LIBPC)
20 +ALL_TARGETS = $(LIBA) $(LIBPC)
21 +ifeq ($(STATIC),)
22 +ALL_TARGETS += $(LIBSO)
23 +endif
24 +
25 +all: $(ALL_TARGETS)
26  
27  $(LIBA):  $(OBJS)
28         $(AR) rcs $@ $^
29 @@ -39,11 +44,13 @@
30  install: all
31         test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
32         install -m 644 $(LIBA) $(LIBDIR)
33 -       test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
34 -       install -m 755 $(LIBSO) $(SHLIBDIR)
35         test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
36         install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
37 +ifeq ($(STATIC),)
38 +       test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
39 +       install -m 755 $(LIBSO) $(SHLIBDIR)
40         cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET)
41 +endif
42  
43  relabel:
44         /sbin/restorecon $(SHLIBDIR)/$(LIBSO)