All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libselinux: utils: link with shared libfts
@ 2020-05-22  7:46 Đoàn Trần Công Danh
  2020-05-22 18:59 ` Nicolas Iooss
  0 siblings, 1 reply; 3+ messages in thread
From: Đoàn Trần Công Danh @ 2020-05-22  7:46 UTC (permalink / raw)
  To: selinux; +Cc: Đoàn Trần Công Danh

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-23  1:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-22  7:46 [PATCH] libselinux: utils: link with shared libfts Đoàn Trần Công Danh
2020-05-22 18:59 ` Nicolas Iooss
2020-05-23  1:23   ` Đoàn Trần Công Danh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.