aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCao jin <caoj.fnst@cn.fujitsu.com>2018-03-16 04:49:44 -0400
committerIngo Molnar <mingo@kernel.org>2018-03-31 02:02:07 -0400
commitd6289f36aa7d5893d091a7a0c67eee7798719f03 (patch)
tree7738e6278dfad826cfee14bf9912037939eddddc
parentd0266046ad54e0c964941364cd82a0d0478ce286 (diff)
x86/build: Don't pass in -D__KERNEL__ multiple times
Some .<target>.cmd files under arch/x86 are showing two instances of -D__KERNEL__, like arch/x86/boot/ and arch/x86/realmode/rm/. __KERNEL__ is already defined in KBUILD_CPPFLAGS in the top Makefile, so it can be dropped safely. Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Michal Marek <michal.lkml@markovi.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/20180316084944.3997-1-caoj.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/Makefile3
-rw-r--r--arch/x86/boot/compressed/Makefile2
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index d798e36d103c..a517852dad55 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -31,8 +31,7 @@ endif
31CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h 31CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
32M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS)) 32M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
33 33
34REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -D__KERNEL__ \ 34REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
35 -DDISABLE_BRANCH_PROFILING \
36 -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ 35 -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
37 -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ 36 -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
38 -mno-mmx -mno-sse 37 -mno-mmx -mno-sse
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index f25e1530e064..f484ae0ece93 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -26,7 +26,7 @@ KCOV_INSTRUMENT := n
26targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ 26targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
27 vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 27 vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4
28 28
29KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ -O2 29KBUILD_CFLAGS := -m$(BITS) -O2
30KBUILD_CFLAGS += -fno-strict-aliasing $(call cc-option, -fPIE, -fPIC) 30KBUILD_CFLAGS += -fno-strict-aliasing $(call cc-option, -fPIE, -fPIC)
31KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING 31KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
32cflags-$(CONFIG_X86_32) := -march=i386 32cflags-$(CONFIG_X86_32) := -march=i386