Commit 2c3b8f8f authored by Edward Liaw's avatar Edward Liaw Committed by Shuah Khan

selftests/sgx: Include KHDR_INCLUDES in Makefile

Add KHDR_INCLUDES to the CFLAGS to pull in the kselftest harness
dependencies (-D_GNU_SOURCE).

Also, remove redefinitions of _GNU_SOURCE in the source code.

Fixes: 80921623 ("selftests/harness: remove use of LINE_MAX")
Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.sang@intel.comSigned-off-by: default avatarEdward Liaw <edliaw@google.com>
Reviewed-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Acked-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Tested-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent daef47b8
...@@ -12,7 +12,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy ...@@ -12,7 +12,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy
endif endif
INCLUDES := -I$(top_srcdir)/tools/include INCLUDES := -I$(top_srcdir)/tools/include
HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC HOST_CFLAGS := -Wall -Werror $(KHDR_INCLUDES) -g $(INCLUDES) -fPIC
HOST_LDFLAGS := -z noexecstack -lcrypto HOST_LDFLAGS := -z noexecstack -lcrypto
ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \ ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \
-fno-stack-protector -mrdrnd $(INCLUDES) -fno-stack-protector -mrdrnd $(INCLUDES)
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2016-20 Intel Corporation. */ /* Copyright(c) 2016-20 Intel Corporation. */
#define _GNU_SOURCE
#include <assert.h> #include <assert.h>
#include <getopt.h> #include <getopt.h>
#include <stdbool.h> #include <stdbool.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment