when using -O2 instead of -Os, get rid of the two optimizations that are causing...
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.31 / 004-extra_optimization.patch
index 333acb612b57496e65c3324e8de68bb478323d22..e0ba51598e4a24569ac0be442bd21c34bfb70d7f 100644 (file)
@@ -1,5 +1,14 @@
 --- a/Makefile
 +++ b/Makefile
+@@ -521,7 +521,7 @@ all: vmlinux
+ ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+ KBUILD_CFLAGS += -Os
+ else
+-KBUILD_CFLAGS += -O2
++KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch
+ endif
+ include $(srctree)/arch/$(SRCARCH)/Makefile
 @@ -559,6 +559,9 @@ endif
  NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
  CHECKFLAGS     += $(NOSTDINC_FLAGS)