summaryrefslogtreecommitdiff
path: root/arch/x86/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-06-26 21:59:13 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2020-07-07 05:13:10 +0300
commit685969e0bd732ff92e6626acc0c05f7204aa7ea6 (patch)
tree731dbff8b3d5604a980508895eccfbd6447904ae /arch/x86/Makefile
parent893ab00439a45513cae55781fc8e3b7108ee1cda (diff)
downloadlinux-685969e0bd732ff92e6626acc0c05f7204aa7ea6.tar.xz
kbuild: remove cc-option test of -ffreestanding
Some Makefiles already pass -ffreestanding unconditionally. For example, arch/arm64/lib/Makefile, arch/x86/purgatory/Makefile. No problem report so far about hard-coding this option. So, we can assume all supported compilers know -ffreestanding. I confirmed GCC 4.8 and Clang manuals document this option. Get rid of cc-option from -ffreestanding. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/x86/Makefile')
-rw-r--r--arch/x86/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 89c3cdfba753..edc68538a04e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -36,7 +36,7 @@ REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse
-REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding)
+REALMODE_CFLAGS += -ffreestanding
REALMODE_CFLAGS += -fno-stack-protector
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member)
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4))