Skip to content

Commit

Permalink
libselinux: use musl-fts for host builds
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
neheb authored and chunkeey committed Mar 25, 2022
1 parent 1fb0993 commit abb2683
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package/libs/libselinux/Makefile
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit abb2683

Please sign in to comment.