aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 6ea306b28ae9..8ef9c02747fa 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -131,6 +131,21 @@ cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.
131 131
132cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ 132cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
133 -fno-omit-frame-pointer 133 -fno-omit-frame-pointer
134
135# Some distribution-specific toolchains might pass the -fstack-check
136# option during the build, which adds a simple stack-probe at the beginning
137# of every function. This stack probe is to ensure that there is enough
138# stack space, else a SEGV is generated. This is not desirable for MIPS
139# as kernel stacks are small, placed in unmapped virtual memory, and do not
140# grow when overflowed. Especially on SGI IP27 platforms, this check will
141# lead to a NULL pointer dereference in _raw_spin_lock_irq.
142#
143# In disassembly, this stack probe appears at the top of a function as:
144# sd zero,<offset>(sp)
145# Where <offset> is a negative value.
146#
147cflags-y += -fno-stack-check
148
134# 149#
135# CPU-dependent compiler/assembler options for optimization. 150# CPU-dependent compiler/assembler options for optimization.
136# 151#