Commit 1189f487 authored by Adrian Bunk's avatar Adrian Bunk

kbuild: explicitly turn off gcc stack-protector

Ubuntu has enabled -fstack-protector per default in gcc
breaking kernel build. Explicit turn it off for now.

Backported based on several patches by Sam Ravnborg <sam@ravnborg.org>.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent a248193a
...@@ -511,6 +511,8 @@ CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LABELS,-labels) ...@@ -511,6 +511,8 @@ CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LABELS,-labels)
CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops) CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops)
CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps) CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps)
include $(srctree)/arch/$(ARCH)/Makefile
ifdef CONFIG_FRAME_POINTER ifdef CONFIG_FRAME_POINTER
CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
else else
...@@ -521,7 +523,8 @@ ifdef CONFIG_DEBUG_INFO ...@@ -521,7 +523,8 @@ ifdef CONFIG_DEBUG_INFO
CFLAGS += -g CFLAGS += -g
endif endif
include $(srctree)/arch/$(ARCH)/Makefile # Force gcc to behave correct even for buggy distributions
CFLAGS += $(call cc-option, -fno-stack-protector)
# arch Makefile may override CC so keep this after arch Makefile is included # arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment