Message ID | 20211126154020.342924-4-anup.patel@wdc.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | KVM RISC-V 64-bit selftests support | expand |
On 11/26/21 16:40, Anup Patel wrote: > We add EXTRA_CFLAGS to the common CFLAGS of top-level Makefile > which will allow users to pass additional compile-time flags such > as "-static". Is this just for debugging? I cannot understand if it's used in patch 4. Paolo
On Fri, Nov 26, 2021 at 9:45 PM Paolo Bonzini <pbonzini@redhat.com> wrote: > > On 11/26/21 16:40, Anup Patel wrote: > > We add EXTRA_CFLAGS to the common CFLAGS of top-level Makefile > > which will allow users to pass additional compile-time flags such > > as "-static". > > Is this just for debugging? I cannot understand if it's used in patch 4. Yes, this is just for debugging. I am using it to add selftests ELFs to any arbitrary initrd so that I can try selftests on Spike, FPGA, or even HW simulators. Regards, Anup > > Paolo >
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index c4e34717826a..ee6740e9ecdb 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -131,7 +131,7 @@ endif CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ - -I$(<D) -Iinclude/$(UNAME_M) -I.. + -I$(<D) -Iinclude/$(UNAME_M) -I.. $(EXTRA_CFLAGS) no-pie-option := $(call try-run, echo 'int main() { return 0; }' | \ $(CC) -Werror -no-pie -x c - -o "$$TMP", -no-pie)
We add EXTRA_CFLAGS to the common CFLAGS of top-level Makefile which will allow users to pass additional compile-time flags such as "-static". Signed-off-by: Anup Patel <anup.patel@wdc.com> --- tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)