aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2014-02-25 18:01:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-02-25 18:25:47 -0500
commit6c15b327ccbdce45878d4689f4d938f29dd309db (patch)
treef5d3ae9dd3dcfee1c34506a44c7a204e36ec31d6 /Makefile
parentcf015e9f279f100e3c2a826217a4ab5dba3eb5ed (diff)
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 15e90be5c027..81f1bf390310 100644
--- a/Makefile
+++ b/Makefile
@@ -605,10 +605,11 @@ endif
605ifdef CONFIG_CC_STACKPROTECTOR_REGULAR 605ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
606 stackp-flag := -fstack-protector 606 stackp-flag := -fstack-protector
607 ifeq ($(call cc-option, $(stackp-flag)),) 607 ifeq ($(call cc-option, $(stackp-flag)),)
608 $(warning Cannot use CONFIG_CC_STACKPROTECTOR: \ 608 $(warning Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: \
609 -fstack-protector not supported by compiler) 609 -fstack-protector not supported by compiler)
610 endif 610 endif
611else ifdef CONFIG_CC_STACKPROTECTOR_STRONG 611else
612ifdef CONFIG_CC_STACKPROTECTOR_STRONG
612 stackp-flag := -fstack-protector-strong 613 stackp-flag := -fstack-protector-strong
613 ifeq ($(call cc-option, $(stackp-flag)),) 614 ifeq ($(call cc-option, $(stackp-flag)),)
614 $(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \ 615 $(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
@@ -618,6 +619,7 @@ else
618 # Force off for distro compilers that enable stack protector by default. 619 # Force off for distro compilers that enable stack protector by default.
619 stackp-flag := $(call cc-option, -fno-stack-protector) 620 stackp-flag := $(call cc-option, -fno-stack-protector)
620endif 621endif
622endif
621KBUILD_CFLAGS += $(stackp-flag) 623KBUILD_CFLAGS += $(stackp-flag)
622 624
623# This warning generated too much noise in a regular build. 625# This warning generated too much noise in a regular build.