summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2021-11-26 16:03:45 +0300
committerAnup Patel <anup@brainfault.org>2022-01-06 12:47:46 +0300
commit788490e798a707cea75d80448f5c6c5f322ada6e (patch)
tree816e1df8f1e79b2e5680d923b002d4d5fe1aa2bf /tools
parenta457fd5660efa9cf960d2461156a1025bfdb13fa (diff)
downloadlinux-788490e798a707cea75d80448f5c6c5f322ada6e.tar.xz
KVM: selftests: Add EXTRA_CFLAGS in top-level Makefile
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> Reviewed-and-tested-by: Atish Patra <atishp@rivosinc.com> Reviewed-and-tested-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/kvm/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index 17342b575e85..869edc2a5a34 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -133,7 +133,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)