[LTP] [PATCH 1/2] KVM test infrastructure

Martin Doucha mdoucha@suse.cz
Thu Mar 10 15:10:10 CET 2022


On 09. 03. 22 20:13, Petr Vorel wrote:
> Hi Martin,
> 
> this patchset looks really great.
> 
> Unfortunately there are some compilation time errors [1]. Various
> Debian/Ubuntu versions (but not all) and Alpine have problem to
> compile it [1]: /usr/bin/ld: bootstrap_x86_64.o: relocation
> R_X86_64_16 against symbol `kvm_gdt32_desc' can not be used when
> making a PIE object; recompile with -fPIE
> 
> Can you please have look into it?

Can you try whether this one-liner fixes the error? The diff will
probably get corrupted by my mail client because GUEST_CFLAGS is too
long but it's trivial to apply this by hand:

diff --git a/testcases/kernel/kvm/Makefile b/testcases/kernel/kvm/Makefile
index 139358961..24ca91fc3 100644
--- a/testcases/kernel/kvm/Makefile
+++ b/testcases/kernel/kvm/Makefile
@@ -9,7 +9,7 @@ ASFLAGS =
 CPPFLAGS += -I$(abs_srcdir)/include
 GUEST_CPPFLAGS = $(CPPFLAGS) -DCOMPILE_PAYLOAD
 GUEST_CFLAGS = -ffreestanding -O2 -Wall -fno-asynchronous-unwind-tables
-mno-mmx -mno-sse
-GUEST_LDFLAGS = -nostdlib -Wl,--build-id=none
+GUEST_LDFLAGS = -nostdlib -Wl,--build-id=none,-no-pie
 GUEST_LDLIBS =

 FILTER_OUT_MAKE_TARGETS := lib_guest lib_host lib_x86

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list