kbuild: Remove check from non-existing options
This patch removes the checks related to CONFIG_CC_STACKPROTECTOR_ REGULAR and CONFIG_CC_STACKPROTECTOR_STRONG options since these options don't exist in Zephyr. According to 186ab6552, they were copied from Linux but further clean up was missing. Change-Id: I1d8b4f47319a54b68b6f0b5aec1feb0a247e72e9 Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
parent
123c33a836
commit
eda4d59404
1 changed files with 0 additions and 34 deletions
34
Makefile
34
Makefile
|
@ -580,40 +580,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
|
|||
$(call cc-option,-fno-partial-inlining)
|
||||
endif
|
||||
|
||||
# Handle stack protector mode.
|
||||
#
|
||||
# Since kbuild can potentially perform two passes (first with the old
|
||||
# .config values and then with updated .config values), we cannot error out
|
||||
# if a desired compiler option is unsupported. If we were to error, kbuild
|
||||
# could never get to the second pass and actually notice that we changed
|
||||
# the option to something that was supported.
|
||||
#
|
||||
# Additionally, we don't want to fallback and/or silently change which compiler
|
||||
# flags will be used, since that leads to producing kernels with different
|
||||
# security feature characteristics depending on the compiler used. ("But I
|
||||
# selected CC_STACKPROTECTOR_STRONG! Why did it build with _REGULAR?!")
|
||||
#
|
||||
# The middle ground is to warn here so that the failed option is obvious, but
|
||||
# to let the build fail with bad compiler flags so that we can't produce a
|
||||
# kernel when there is a CONFIG and compiler mismatch.
|
||||
#
|
||||
ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
|
||||
stackp-flag := -fstack-protector
|
||||
ifeq ($(call cc-option, $(stackp-flag)),)
|
||||
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: \
|
||||
-fstack-protector not supported by compiler)
|
||||
endif
|
||||
else
|
||||
ifdef CONFIG_CC_STACKPROTECTOR_STRONG
|
||||
stackp-flag := -fstack-protector-strong
|
||||
ifeq ($(call cc-option, $(stackp-flag)),)
|
||||
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
|
||||
-fstack-protector-strong not supported by compiler)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
KBUILD_CFLAGS += $(stackp-flag)
|
||||
|
||||
ifeq ($(CONFIG_DEBUG),y)
|
||||
KBUILD_CFLAGS += -O0
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue