aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libselinux/Makefile
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2021-09-23 23:47:31 -0700
committerDaniel Golle <daniel@makrotopia.org>2022-04-10 16:26:01 +0100
commitce7ee54c550aca656d932b742de8d2b7d7eb1286 (patch)
tree9e6481c26fd1ef25f52fa416c66c521580cb7437 /package/libs/libselinux/Makefile
parentd0965dc174b52da767e8eb8962c33d5b7af866d1 (diff)
downloadupstream-ce7ee54c550aca656d932b742de8d2b7d7eb1286.tar.gz
upstream-ce7ee54c550aca656d932b742de8d2b7d7eb1286.tar.bz2
upstream-ce7ee54c550aca656d932b742de8d2b7d7eb1286.zip
libselinux: use musl-fts for host builds
Fixes compilation under musl based distros like Alpine Linux. Also add pcre/host as a build dependency as it's needed. Signed-off-by: Rosen Penev <rosenp@gmail.com> (cherry picked from commit abb2683de36ffe7b29a1b6ea5a8d7edf73719152)
Diffstat (limited to 'package/libs/libselinux/Makefile')
-rw-r--r--package/libs/libselinux/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/libs/libselinux/Makefile b/package/libs/libselinux/Makefile
index 3969ef38d9..9520afc771 100644
--- a/package/libs/libselinux/Makefile
+++ b/package/libs/libselinux/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libselinux
PKG_VERSION:=3.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
@@ -18,6 +18,8 @@ PKG_LICENSE:=libselinux-1.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+HOST_BUILD_DEPENDS:=musl-fts/host pcre/host
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
@@ -107,7 +109,8 @@ HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
HOST_MAKE_FLAGS += \
PREFIX=$(STAGING_DIR_HOSTPKG) \
- SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
+ SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib \
+ FTS_LDLIBS=-lfts
ifeq ($(CONFIG_USE_MUSL),y)
MAKE_FLAGS += FTS_LDLIBS=-lfts