mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
Revert "selftests: Compile kselftest headers with -D_GNU_SOURCE"
This reverts commit daef47b89e
.
This framework change to add D_GNU_SOURCE to KHDR_INCLUDES
to Makefile, lib.mk, and kselftest_harness.h is causing build
failures and warnings.
Revert this change.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
ea5f6ad9ad
commit
cee27ae5f1
@ -170,11 +170,11 @@ ifneq ($(KBUILD_OUTPUT),)
|
||||
# $(realpath ...) resolves symlinks
|
||||
abs_objtree := $(realpath $(abs_objtree))
|
||||
BUILD := $(abs_objtree)/kselftest
|
||||
KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_objtree}/usr/include
|
||||
KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include
|
||||
else
|
||||
BUILD := $(CURDIR)
|
||||
abs_srctree := $(shell cd $(top_srcdir) && pwd)
|
||||
KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_srctree}/usr/include
|
||||
KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include
|
||||
DEFAULT_INSTALL_HDR_PATH := 1
|
||||
endif
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
#define __KSELFTEST_HARNESS_H
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
static_assert(0, "kselftest harness requires _GNU_SOURCE to be defined");
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <asm/types.h>
|
||||
#include <ctype.h>
|
||||
|
@ -67,7 +67,7 @@ MAKEFLAGS += --no-print-directory
|
||||
endif
|
||||
|
||||
ifeq ($(KHDR_INCLUDES),)
|
||||
KHDR_INCLUDES := -D_GNU_SOURCE -isystem $(top_srcdir)/usr/include
|
||||
KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include
|
||||
endif
|
||||
|
||||
# The following are built by lib.mk common compile rules.
|
||||
|
Loading…
Reference in New Issue
Block a user