1
0
Fork 0
alistair23-linux/tools/testing/selftests/kvm
Shuah Khan 6e06983dde selftests: kvm: Fix libkvm build error
Fix the following build error from "make TARGETS=kvm kselftest":

libkvm.a(assert.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC

This error is seen when build is done from the main Makefile using
kselftest target. In this case KBUILD_CPPFLAGS and CC_OPTION_CFLAGS
are defined.

When build is invoked using:

"make -C tools/testing/selftests/kvm" KBUILD_CPPFLAGS and CC_OPTION_CFLAGS
aren't defined.

There is no need to pass in KBUILD_CPPFLAGS and CC_OPTION_CFLAGS for the
check to determine if --no-pie is necessary, which is the case when these
two aren't defined when "make -C tools/testing/selftests/kvm" runs.

Fix it by simplifying the no-pie-option logic. With this change, both
build variations work.

"make TARGETS=kvm kselftest"
"make -C tools/testing/selftests/kvm"

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-10-03 12:07:58 +02:00
..
include selftests: kvm: add test for dirty logging inside nested guests 2019-09-27 13:13:40 +02:00
lib KVM: selftests: x86: clarify what is reported on KVM_GET_MSRS failure 2019-09-27 18:05:25 +02:00
s390x KVM: selftests: Test invalid bits in kvm_valid_regs and kvm_dirty_regs on s390x 2019-09-04 15:38:05 +02:00
x86_64 selftests: kvm: add test for dirty logging inside nested guests 2019-09-27 13:13:40 +02:00
.gitignore KVM: selftests: Update gitignore file for latest changes 2019-08-09 16:50:09 +02:00
Makefile selftests: kvm: Fix libkvm build error 2019-10-03 12:07:58 +02:00
clear_dirty_log_test.c kvm: introduce manual dirty log reprotect 2018-12-14 12:34:19 +01:00
config selftests: kvm: Adding config fragments 2019-08-09 16:52:38 +02:00
dirty_log_test.c KVM: selftests: Remove duplicate guest mode handling 2019-09-24 13:37:24 +02:00
kvm_create_max_vcpus.c KVM: s390: add kselftests 2019-07-15 13:28:58 +02:00