mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
Makefile: fix build with make 3.80 again
According to Documentation/Changes, make 3.80 is still being supported for building the kernel, hence make files must not make (unconditional) use of features introduced only in newer versions. Commit 8779657d29c0 ("stackprotector: Introduce CONFIG_CC_STACKPROTECTOR_STRONG") however introduced an "else ifdef" construct which make 3.80 doesn't understand. Also correct a warning message still referencing the old config option name. Apart from that I question the use of "ifdef" here (but it was used that way already prior to said commit): ifeq (,y) would seem more to the point. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Git-commit: 6c15b327ccbdce45878d4689f4d938f29dd309db Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Change-Id: I1c42238b79af04c2ad7c474d92d2af36cbf3b011 Signed-off-by: David Brown <davidb@codeaurora.org>
This commit is contained in:
parent
848c87e8cf
commit
a6a0508eca
1 changed files with 4 additions and 2 deletions
6
Makefile
6
Makefile
|
@ -600,10 +600,11 @@ endif
|
||||||
ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
|
ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
|
||||||
stackp-flag := -fstack-protector
|
stackp-flag := -fstack-protector
|
||||||
ifeq ($(call cc-option, $(stackp-flag)),)
|
ifeq ($(call cc-option, $(stackp-flag)),)
|
||||||
$(warning Cannot use CONFIG_CC_STACKPROTECTOR: \
|
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: \
|
||||||
-fstack-protector not supported by compiler)
|
-fstack-protector not supported by compiler)
|
||||||
endif
|
endif
|
||||||
else ifdef CONFIG_CC_STACKPROTECTOR_STRONG
|
else
|
||||||
|
ifdef CONFIG_CC_STACKPROTECTOR_STRONG
|
||||||
stackp-flag := -fstack-protector-strong
|
stackp-flag := -fstack-protector-strong
|
||||||
ifeq ($(call cc-option, $(stackp-flag)),)
|
ifeq ($(call cc-option, $(stackp-flag)),)
|
||||||
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
|
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
|
||||||
|
@ -613,6 +614,7 @@ else
|
||||||
# Force off for distro compilers that enable stack protector by default.
|
# Force off for distro compilers that enable stack protector by default.
|
||||||
stackp-flag := $(call cc-option, -fno-stack-protector)
|
stackp-flag := $(call cc-option, -fno-stack-protector)
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
KBUILD_CFLAGS += $(stackp-flag)
|
KBUILD_CFLAGS += $(stackp-flag)
|
||||||
|
|
||||||
# This warning generated too much noise in a regular build.
|
# This warning generated too much noise in a regular build.
|
||||||
|
|
Loading…
Reference in a new issue