diff mbox series

[for_v25,1/4] selftests/x86: Fix INCLUDES definition in SGX Makefile

Message ID 20191220225501.23476-2-sean.j.christopherson@intel.com (mailing list archive)
State New, archived
Headers show
Series selftests/x86: x86/sgx: Minor selftest cleanup | expand

Commit Message

Sean Christopherson Dec. 20, 2019, 10:54 p.m. UTC
Define INCLUDES to reference the top-level tools/include when building
SGX selftests in preparation of adding a missing linux/bits.h include
in sgx/arch.h.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 tools/testing/selftests/x86/sgx/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/x86/sgx/Makefile b/tools/testing/selftests/x86/sgx/Makefile
index a09ef5f965dc..f838700029e2 100644
--- a/tools/testing/selftests/x86/sgx/Makefile
+++ b/tools/testing/selftests/x86/sgx/Makefile
@@ -6,6 +6,7 @@  ifndef OBJCOPY
 OBJCOPY := $(CROSS_COMPILE)objcopy
 endif
 
+INCLUDES := -I$(top_srcdir)/tools/include
 HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC -z noexecstack
 ENCL_CFLAGS := -Wall -Werror -static -nostdlib -nostartfiles -fPIC \
 	       -fno-stack-protector -mrdrnd $(INCLUDES)
@@ -33,7 +34,7 @@  $(OUTPUT)/encl.ss: $(OUTPUT)/encl.bin
 	$(OUTPUT)/sgxsign signing_key.pem $(OUTPUT)/encl.bin $(OUTPUT)/encl.ss
 
 $(OUTPUT)/sgxsign: sgxsign.c
-	$(CC) -o $@ $< -lcrypto
+	$(CC) $(INCLUDES) -o $@ $< -lcrypto
 
 EXTRA_CLEAN := \
 	$(OUTPUT)/encl.bin \