* [LTP] [PATCH] Fix static linking with musl-fts
@ 2019-11-15 22:10 Fabrice Fontaine
2019-11-18 20:32 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2019-11-15 22:10 UTC (permalink / raw)
To: ltp
Don't append libraries to LDLIBS but prepend them in cpuset_lib/Makefile
and cpuset/Makefile.inc to allow the user to provide its FTS library
such as -lfts for musl/uclibc through LDLIBS
This will fix static build of ltp with musl-fts on uclibc
Fixes:
- http://autobuild.buildroot.org/results/9155326e1ff7c2bb2218122c453872c2fc76f65e
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
testcases/kernel/controllers/cpuset/Makefile.inc | 2 +-
testcases/kernel/controllers/cpuset/cpuset_lib/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc
index db6a84305..c03dd77d7 100644
--- a/testcases/kernel/controllers/cpuset/Makefile.inc
+++ b/testcases/kernel/controllers/cpuset/Makefile.inc
@@ -41,7 +41,7 @@ MAKE_DEPS := $(LIBCONTROLLERS) $(LIBCPUSET)
LDFLAGS += -L$(abs_builddir)/$(LIBCPUSET_DIR) -L$(abs_builddir)/$(LIBCONTROLLERS_DIR)
-LDLIBS += -lcpu_set -lcontrollers -lltp
+LDLIBS := -lcpu_set -lcontrollers -lltp $(LDLIBS)
INSTALL_TARGETS ?= *.sh
diff --git a/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile b/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
index 322d03cac..069ebc38c 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
+++ b/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
@@ -25,7 +25,7 @@ top_srcdir ?= ../../../../..
include $(top_srcdir)/include/mk/testcases.mk
-LDLIBS += -lm -lcontrollers -lltp
+LDLIBS := -lm -lcontrollers -lltp $(LDLIBS)
LIB := libcpu_set.a
--
2.24.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] Fix static linking with musl-fts
2019-11-15 22:10 [LTP] [PATCH] Fix static linking with musl-fts Fabrice Fontaine
@ 2019-11-18 20:32 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2019-11-18 20:32 UTC (permalink / raw)
To: ltp
Hi Fabrice,
> Don't append libraries to LDLIBS but prepend them in cpuset_lib/Makefile
> and cpuset/Makefile.inc to allow the user to provide its FTS library
> such as -lfts for musl/uclibc through LDLIBS
> This will fix static build of ltp with musl-fts on uclibc
> Fixes:
> - http://autobuild.buildroot.org/results/9155326e1ff7c2bb2218122c453872c2fc76f65e
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> -LDLIBS += -lcpu_set -lcontrollers -lltp
> +LDLIBS := -lcpu_set -lcontrollers -lltp $(LDLIBS)
Thanks a lot, merged!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-18 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-15 22:10 [LTP] [PATCH] Fix static linking with musl-fts Fabrice Fontaine
2019-11-18 20:32 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox