summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-07-12 15:37:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-14 10:08:57 +0100
commite65ee81d621e679107b5f4ef2dbbb8d1786e93ad (patch)
tree3325786357ff174d8e279ae3dfb5105899afd0d2 /meta
parentd22eb3c31a244e8dcdeb99fc01702d803d4a3e4b (diff)
downloadpoky-e65ee81d621e679107b5f4ef2dbbb8d1786e93ad.tar.gz
ltp: fix builds when host ld doesn't know about target ELF formats
The kvm tests use the host ld, which doesn't necessarily know about the target ELF format. It should be using the cross ld we built, so call $(LD) instead. (From OE-Core rev: 4065c5b69830ea81fbde23263ece55f6f12e5d71) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-kvm-use-LD-instead-of-hardcoding-ld.patch37
-rw-r--r--meta/recipes-extended/ltp/ltp_20220527.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-kvm-use-LD-instead-of-hardcoding-ld.patch b/meta/recipes-extended/ltp/ltp/0001-kvm-use-LD-instead-of-hardcoding-ld.patch
new file mode 100644
index 0000000000..23634d0c86
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-kvm-use-LD-instead-of-hardcoding-ld.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/948]
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From 7670233e43df2aed6d44b96c51b034f8e2d28a19 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@arm.com>
6Date: Tue, 12 Jul 2022 15:03:54 +0100
7Subject: [PATCH] kvm: use $(LD) instead of hardcoding ld
8
9In cross-compiled builds the host ld may not know the required ELF format,
10so ensure we use $(LD) which will be the cross-capable ld binary.
11
12Signed-off-by: Ross Burton <ross.burton@arm.com>
13---
14 testcases/kernel/kvm/Makefile | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/testcases/kernel/kvm/Makefile b/testcases/kernel/kvm/Makefile
18index 69a9946fe..4ddef9f95 100644
19--- a/testcases/kernel/kvm/Makefile
20+++ b/testcases/kernel/kvm/Makefile
21@@ -50,11 +50,11 @@ include $(top_srcdir)/include/mk/generic_leaf_target.mk
22 ifdef VERBOSE
23 $(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS)
24 objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin
25- ld -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin
26+ $(LD) -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin
27 else
28 @$(CC) $(GUEST_CPPFLAGS) $(GUEST_CFLAGS) $(GUEST_LDFLAGS) -o $*-payload.elf $^ $(GUEST_LDLIBS)
29 @objcopy -O binary -j .init.boot -j .text -j .data -j .init -j .preinit_array -j .init_array --gap-fill=0 $*-payload.elf $*-payload.bin
30- @ld -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin
31+ @$(LD) -r -T $(abs_srcdir)/linker/payload.lds --oformat=$(BIN_FORMAT) -o $@ $*-payload.bin
32 @echo KVM_CC $(target_rel_dir)$@
33 endif
34 @rm $*-payload.elf $*-payload.bin
35--
362.34.1
37
diff --git a/meta/recipes-extended/ltp/ltp_20220527.bb b/meta/recipes-extended/ltp/ltp_20220527.bb
index 56fa83f5a0..094251ec81 100644
--- a/meta/recipes-extended/ltp/ltp_20220527.bb
+++ b/meta/recipes-extended/ltp/ltp_20220527.bb
@@ -28,6 +28,7 @@ SRCREV = "6f88e0f6f1d6eb12c48c902f50f47ecbd3b0f18a"
28SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ 28SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \
29 file://0001-Remove-OOM-tests-from-runtest-mm.patch \ 29 file://0001-Remove-OOM-tests-from-runtest-mm.patch \
30 file://disable_hanging_tests.patch \ 30 file://disable_hanging_tests.patch \
31 file://0001-kvm-use-LD-instead-of-hardcoding-ld.patch \
31 " 32 "
32 33
33S = "${WORKDIR}/git" 34S = "${WORKDIR}/git"