selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: selinux@vger.kernel.org
Cc: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Subject: [PATCH] libselinux: utils: link with shared libfts
Date: Fri, 22 May 2020 14:46:48 +0700	[thread overview]
Message-ID: <20200522074648.24538-1-congdanhqx@gmail.com> (raw)

On Linux with musl libc, libfts isn't shipped with libc.
Hence, we link with $(FTS_LIBS) in src.

Some (most) musl-based distribution choose to ship libfts as
a standalone shared object because their libfts is licensed under either
very permissive license or that implementation of libfts requires
attribution in every usage.

Always link with $(FTS_LIBS) in utils to prevent undefined reference
problem on those platforms.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 libselinux/utils/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
index aa2d3e1b..1a7da223 100644
--- a/libselinux/utils/Makefile
+++ b/libselinux/utils/Makefile
@@ -45,6 +45,8 @@ override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
 override LDFLAGS += -L../src
 override LDLIBS += -lselinux $(FTS_LDLIBS)
 PCRE_LDLIBS ?= -lpcre
+FTS_LDLIBS ?=
+override LDLIBS += $(FTS_LDLIBS)
 
 ifeq ($(ANDROID_HOST),y)
 TARGETS=sefcontext_compile
-- 
2.26.2.672.g232c24e857


             reply	other threads:[~2020-05-22  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  7:46 Đoàn Trần Công Danh [this message]
2020-05-22 18:59 ` [PATCH] libselinux: utils: link with shared libfts Nicolas Iooss
2020-05-23  1:23   ` Đoàn Trần Công Danh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200522074648.24538-1-congdanhqx@gmail.com \
    --to=congdanhqx@gmail.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).