summaryrefslogtreecommitdiffstats
path: root/package/libsepol/0003-support-static-only.patch
diff options
context:
space:
mode:
authorMarcus Folkesson <marcus.folkesson@gmail.com>2018-01-16 09:22:18 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2018-01-16 23:22:03 +0100
commit65de266c23eb07670a3dba95aa44e5fb57729371 (patch)
tree5b5955809b93b6d9f903749598e2a741a061b7e4 /package/libsepol/0003-support-static-only.patch
parentc85e86c555930c242689e135b0c60559849fdbcd (diff)
downloadbuildroot-65de266c23eb07670a3dba95aa44e5fb57729371.tar.gz
buildroot-65de266c23eb07670a3dba95aa44e5fb57729371.zip
libsepol: add patch to make the build process more standard
Patch the Makefiles to make PREFIX and DESTDIR follow standard semantics to get rid of DESTDIR during compile time in libsepol.mk and generate proper pkg-config files. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/libsepol/0003-support-static-only.patch')
-rw-r--r--package/libsepol/0003-support-static-only.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/package/libsepol/0003-support-static-only.patch b/package/libsepol/0003-support-static-only.patch
new file mode 100644
index 0000000000..8cf9a180ff
--- /dev/null
+++ b/package/libsepol/0003-support-static-only.patch
@@ -0,0 +1,45 @@
+From 2140db697c7f1da2a0a3f7bbcb14c1a0dade84e5 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <Adamduskett@outlook.com>
+Date: Mon, 9 Oct 2017 16:28:12 -0400
+Subject: [PATCH] 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 <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
+---
+ src/Makefile | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff -durNw libsepol-2.7.orig/src/Makefile libsepol-2.7/src/Makefile
+--- libsepol-2.7.orig/src/Makefile 2018-01-15 21:07:51.285183415 +0100
++++ libsepol-2.7/src/Makefile 2018-01-15 21:08:56.515182717 +0100
+@@ -39,7 +39,12 @@
+ LN=gln
+ endif
+
+-all: $(LIBA) $(LIBSO) $(LIBPC)
++ALL_TARGETS = $(LIBA) $(LIBPC)
++ifeq ($(STATIC),)
++ALL_TARGETS += $(LIBSO)
++endif
++
++all: $(ALL_TARGETS)
+
+
+ $(LIBA): $(OBJS)
+@@ -81,8 +86,10 @@
+ install: all
+ test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
+ install -m 644 $(LIBA) $(LIBINSTALL)
++ifeq ($(STATIC),)
+ test -d $(LIBINSTALL) || install -m 755 -d $(LIBINSTALL)
+ install -m 755 $(LIBSO) $(LIBINSTALL)
++endif
+ test -d $(LIBINSTALL)/pkgconfig || install -m 755 -d $(LIBINSTALL)/pkgconfig
+ install -m 644 $(LIBPC) $(LIBINSTALL)/pkgconfig
+ $(LN) -sf --relative $(LIBINSTALL)/$(LIBSO) $(LIBINSTALL)/$(TARGET)
OpenPOWER on IntegriCloud