x86: Prevent GCC 4.4.x (pentium-mmx et al) function prologue wreckage
[sfrench/cifs-2.6.git] / arch / x86 / Makefile_32.cpu
index 30e9a264f69d8f2216b3a2e80806e0c79b0063cc..df7fdf811997b7c9e5b9bbcb814c1daf7b7068e8 100644 (file)
@@ -46,6 +46,12 @@ cflags-$(CONFIG_MGEODEGX1)   += -march=pentium-mmx
 # cpu entries
 cflags-$(CONFIG_X86_GENERIC)   += $(call tune,generic,$(call tune,i686))
 
 # cpu entries
 cflags-$(CONFIG_X86_GENERIC)   += $(call tune,generic,$(call tune,i686))
 
+# Work around the pentium-mmx code generator madness of gcc4.4.x which
+# does stack alignment by generating horrible code _before_ the mcount
+# prologue (push %ebp, mov %esp, %ebp) which breaks the function graph
+# tracer assumptions 
+cflags-$(CONFIG_FUNCTION_GRAPH_TRACER) += $(call cc-option,-mtune=generic)
+
 # Bug fix for binutils: this option is required in order to keep
 # binutils from generating NOPL instructions against our will.
 ifneq ($(CONFIG_X86_P6_NOP),y)
 # Bug fix for binutils: this option is required in order to keep
 # binutils from generating NOPL instructions against our will.
 ifneq ($(CONFIG_X86_P6_NOP),y)