* [PATCH v5 57/68] selftests/sgx: Compile with -D_GNU_SOURCE
[not found] <20240522005913.3540131-1-edliaw@google.com>
@ 2024-05-22 0:57 ` Edward Liaw
2024-05-22 12:02 ` Jarkko Sakkinen
0 siblings, 1 reply; 2+ messages in thread
From: Edward Liaw @ 2024-05-22 0:57 UTC (permalink / raw)
To: shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexei Starovoitov, Daniel Borkmann, David S. Miller,
Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
Jarkko Sakkinen, Dave Hansen, Andrew Morton, Edward Liaw,
Muhammad Usama Anjum
Cc: linux-kernel, linux-kselftest, kernel-team, linux-security-module,
netdev, linux-riscv, bpf, kernel test robot, linux-sgx
Add -D_GNU_SOURCE to HOST_CFLAGS and remove #define _GNU_SOURCE.
Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.sang@intel.com
Signed-off-by: Edward Liaw <edliaw@google.com>
---
tools/testing/selftests/sgx/Makefile | 2 +-
tools/testing/selftests/sgx/sigstruct.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile
index 867f88ce2570..272da790d9ae 100644
--- a/tools/testing/selftests/sgx/Makefile
+++ b/tools/testing/selftests/sgx/Makefile
@@ -12,7 +12,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy
endif
INCLUDES := -I$(top_srcdir)/tools/include
-HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC
+HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC -D_GNU_SOURCE
HOST_LDFLAGS := -z noexecstack -lcrypto
ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \
-fno-stack-protector -mrdrnd $(INCLUDES)
diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
index d73b29becf5b..200034a0fee5 100644
--- a/tools/testing/selftests/sgx/sigstruct.c
+++ b/tools/testing/selftests/sgx/sigstruct.c
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2016-20 Intel Corporation. */
-#define _GNU_SOURCE
#include <assert.h>
#include <getopt.h>
#include <stdbool.h>
--
2.45.1.288.g0e0cd299f1-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v5 57/68] selftests/sgx: Compile with -D_GNU_SOURCE
2024-05-22 0:57 ` [PATCH v5 57/68] selftests/sgx: Compile with -D_GNU_SOURCE Edward Liaw
@ 2024-05-22 12:02 ` Jarkko Sakkinen
0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2024-05-22 12:02 UTC (permalink / raw)
To: Edward Liaw, shuah, Mickaël Salaün, Günther Noack,
Christian Brauner, Richard Cochran, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexei Starovoitov, Daniel Borkmann, David S. Miller,
Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
Dave Hansen, Andrew Morton, Muhammad Usama Anjum
Cc: linux-kernel, linux-kselftest, kernel-team, linux-security-module,
netdev, linux-riscv, bpf, kernel test robot, linux-sgx
On Wed May 22, 2024 at 3:57 AM EEST, Edward Liaw wrote:
> Add -D_GNU_SOURCE to HOST_CFLAGS and remove #define _GNU_SOURCE.
>
> Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.sang@intel.com
> Signed-off-by: Edward Liaw <edliaw@google.com>
> ---
> tools/testing/selftests/sgx/Makefile | 2 +-
> tools/testing/selftests/sgx/sigstruct.c | 1 -
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile
> index 867f88ce2570..272da790d9ae 100644
> --- a/tools/testing/selftests/sgx/Makefile
> +++ b/tools/testing/selftests/sgx/Makefile
> @@ -12,7 +12,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy
> endif
>
> INCLUDES := -I$(top_srcdir)/tools/include
> -HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC
> +HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC -D_GNU_SOURCE
> HOST_LDFLAGS := -z noexecstack -lcrypto
> ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \
> -fno-stack-protector -mrdrnd $(INCLUDES)
> diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
> index d73b29becf5b..200034a0fee5 100644
> --- a/tools/testing/selftests/sgx/sigstruct.c
> +++ b/tools/testing/selftests/sgx/sigstruct.c
> @@ -1,7 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0
> /* Copyright(c) 2016-20 Intel Corporation. */
>
> -#define _GNU_SOURCE
> #include <assert.h>
> #include <getopt.h>
> #include <stdbool.h>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-22 12:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240522005913.3540131-1-edliaw@google.com>
2024-05-22 0:57 ` [PATCH v5 57/68] selftests/sgx: Compile with -D_GNU_SOURCE Edward Liaw
2024-05-22 12:02 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox