testcases/kernel/include/lib.mk: re-order library link order
PATCH 1/1 testcases/kernel/include/lib.mk: re-order library link order
M.Srikanth Kumar reported a -static build failure:
gcc -static -pthread -L/home/linaro/ltp-master/testcases/kernel/lib -L../../../../lib migrate_pages01.o migrate_pages_common.o -lltp
-lnuma -lkerntest -lltp -o migrate_pages01 migrate_pages01.o: In function `test_invalid_perm':
/home/linaro/ltp-master/testcases/kernel/lib/libkerntest.a(numa_helper.o):
In function `get_max_node':
/home/linaro/ltp-master/testcases/kernel/lib/numa_helper.c:53:
undefined reference to `numa_max_possible_node'
/home/linaro/ltp-master/testcases/kernel/lib/libkerntest.a(numa_helper.o):
In function `get_allowed_nodes_arr':
/home/linaro/ltp-master/testcases/kernel/lib/numa_helper.c:177:
undefined reference to `numa_available'
...
Re-order libraries, moving libnuma to the end, to fix linking of unresolved libnuma symbols.
--- testcases/kernel/include/lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/include/lib.mk +1 -1
@@ -23,7 +23,7 @@ KERNEL_DIR := $(abs_top_builddir)/testcases/kernel LIBKERNTEST_DIR := $(KERNEL_DIR)/lib LIBKERNTEST := $(LIBKERNTEST_DIR)/libkerntest.a CPPFLAGS += $(NUMA_CPPFLAGS) -I$(KERNEL_SRCDIR)/include -LDLIBS += $(NUMA_LIBS) -lkerntest -lltp +LDLIBS += -lkerntest -lltp $(NUMA_LIBS) LDFLAGS += -L$(LIBKERNTEST_DIR) $(LIBKERNTEST_DIR):
Signature · 1 line
1.8.3.1
PATCH 1/1 testcases/kernel/include/lib.mk: re-order library link order
Hi!
testcases/kernel/include/lib.mk KERNEL_DIR := $(abs_top_builddir)/testcases/kernel · line 26
Quoted 10 lines
testcases/kernel/include/lib.mk +1
-1@@ -23,7 +23,7 @@ KERNEL_DIR := $(abs_top_builddir)/testcases/kernel LIBKERNTEST_DIR := $(KERNEL_DIR)/lib LIBKERNTEST := $(LIBKERNTEST_DIR)/libkerntest.a CPPFLAGS += $(NUMA_CPPFLAGS) -I$(KERNEL_SRCDIR)/include -LDLIBS += $(NUMA_LIBS) -lkerntest -lltp +LDLIBS += -lkerntest -lltp $(NUMA_LIBS)
Looking at the libkerntest.a it uses numa library as well as ltp library so it should passed be before them, acked.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 testcases/kernel/include/lib.mk: re-order library link order
----- Original Message -----
Quoted 7 lines
From: "Cyril Hrubis" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected]
Sent: Wednesday, 6 April, 2016 3:04:45 PM
Subject: Re: [LTP] [PATCH]testcases/kernel/include/lib.mk: re-order library link orderHi!
Quoted 14 lines
testcases/kernel/include/lib.mk KERNEL_DIR := $(abs_top_builddir)/testcases/kernel · line 26
Quoted 11 lines
testcases/kernel/include/lib.mk +1
-1@@ -23,7 +23,7 @@ KERNEL_DIR := $(abs_top_builddir)/testcases/kernel LIBKERNTEST_DIR := $(KERNEL_DIR)/lib LIBKERNTEST := $(LIBKERNTEST_DIR)/libkerntest.a CPPFLAGS += $(NUMA_CPPFLAGS) -I$(KERNEL_SRCDIR)/include -LDLIBS += $(NUMA_LIBS) -lkerntest -lltp +LDLIBS += -lkerntest -lltp $(NUMA_LIBS)Looking at the libkerntest.a it uses numa library as well as ltp library so it should passed be before them, acked.
Pushed.
Regards,
Jan
Quoted 5 lines
--
Cyril Hrubis
[email protected]