diff options
author | Shuah Khan <skhan@linuxfoundation.org> | 2019-10-03 02:14:30 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-10-03 13:07:58 +0300 |
commit | 6e06983dde969c15eb4fdab77f0eda8b18ea28e6 (patch) | |
tree | 86198dddfa5865a13c334bc6d82bc597ce1a459a /arch/x86 | |
parent | e1fba49cc1e965a3dacd897367ba1e7b340cf0f4 (diff) | |
download | linux-6e06983dde969c15eb4fdab77f0eda8b18ea28e6.tar.xz |
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>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions