Skip to contentSkip to conversation

Fix static linking with musl-fts

PATCH New Fabrice Fontaine 2 participants 2 messages Nov 15, 2019 – Nov 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix static linking with musl-fts

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

---
 testcases/kernel/controllers/cpuset/Makefile.inc        | 2 +-
 testcases/kernel/controllers/cpuset/cpuset_lib/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/controllers/cpuset/Makefile.inc +1 -1
index db6a84305..c03dd77d7 100644
@@ -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
 
testcases/kernel/controllers/cpuset/cpuset_lib/Makefile +1 -1
index 322d03cac..069ebc38c 100644
@@ -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
 
Signature · 1 line
2.24.0
#1 lore raw

PATCH 1/1 Fix static linking with musl-fts

Hi Fabrice,

testcases/kernel/controllers/cpuset/Makefile.inc MAKE_DEPS := $(LIBCONTROLLERS) $(LIBCPUSET) · line 44

Quoted 13 lines

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

testcases/kernel/controllers/cpuset/Makefile.inc +1 -1
-LDLIBS			+= -lcpu_set -lcontrollers -lltp
+LDLIBS			:= -lcpu_set -lcontrollers -lltp $(LDLIBS)

Thanks a lot, merged!

Kind regards,
Petr