[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180316084944.3997-1-caoj.fnst@cn.fujitsu.com>
Date: Fri, 16 Mar 2018 16:49:44 +0800
From: Cao jin <caoj.fnst@...fujitsu.com>
To: <x86@...nel.org>, <linux-kernel@...r.kernel.org>
CC: <tglx@...utronix.de>, <mingo@...hat.com>, <hpa@...or.com>
Subject: [PATCH] x86/build: drop a superfluous macro
Some .<target>.cmd files under arch/x86 report -D__KERNEL__ appears two
times in the command line, like arch/x86/boot, arch/x86/realmode/rm.
It is already defined in KBUILD_CPPFLAGS from top Makefile. so it can be
dropped saftely from these Makefiles.
Signed-off-by: Cao jin <caoj.fnst@...fujitsu.com>
---
arch/x86/Makefile | 3 +--
arch/x86/boot/compressed/Makefile | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index a20eacd9c7e9..592489a15d94 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -31,8 +31,7 @@ endif
CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
-REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -D__KERNEL__ \
- -DDISABLE_BRANCH_PROFILING \
+REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 4b7575b00563..78e3400c22d7 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -26,7 +26,7 @@ KCOV_INSTRUMENT := n
targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4
-KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ -O2
+KBUILD_CFLAGS := -m$(BITS) -O2
KBUILD_CFLAGS += -fno-strict-aliasing $(call cc-option, -fPIE, -fPIC)
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
cflags-$(CONFIG_X86_32) := -march=i386
--
2.14.3
Powered by blists - more mailing lists