mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
893ab00439
Some Makefiles already pass -fno-stack-protector unconditionally. For example, arch/arm64/kernel/vdso/Makefile, arch/x86/xen/Makefile. No problem report so far about hard-coding this option. So, we can assume all supported compilers know -fno-stack-protector. GCC 4.8 and Clang support this option (https://godbolt.org/z/_HDGzN) Get rid of cc-option from -fno-stack-protector. Remove CONFIG_CC_HAS_STACKPROTECTOR_NONE, which is always 'y'. Note: arch/mips/vdso/Makefile adds -fno-stack-protector twice, first unconditionally, and second conditionally. I removed the second one. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
26 lines
796 B
Makefile
26 lines
796 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
CFLAGS_bootx_init.o += -fPIC
|
|
CFLAGS_bootx_init.o += -fno-stack-protector
|
|
|
|
KASAN_SANITIZE_bootx_init.o := n
|
|
|
|
ifdef CONFIG_KASAN
|
|
CFLAGS_bootx_init.o += -DDISABLE_BRANCH_PROFILING
|
|
endif
|
|
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
# Do not trace early boot code
|
|
CFLAGS_REMOVE_bootx_init.o = $(CC_FLAGS_FTRACE)
|
|
endif
|
|
|
|
obj-y += pic.o setup.o time.o feature.o pci.o \
|
|
sleep.o low_i2c.o cache.o pfunc_core.o \
|
|
pfunc_base.o udbg_scc.o udbg_adb.o
|
|
obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o
|
|
# CONFIG_NVRAM is an arch. independent tristate symbol, for pmac32 we really
|
|
# need this to be a bool. Cheat here and pretend CONFIG_NVRAM=m is really
|
|
# CONFIG_NVRAM=y
|
|
obj-$(CONFIG_NVRAM:m=y) += nvram.o
|
|
obj-$(CONFIG_PPC32) += bootx_init.o
|
|
obj-$(CONFIG_SMP) += smp.o
|