build: unify target independent optimization options
[openwrt/staging/yousong.git] / target / linux / generic / patches-3.3 / 201-extra_optimization.patch
index e724891e4f5dacfe176e2f7227df48015ffb0627..213e6d12a17a1109e5180d2ec045c7c708fad344 100644 (file)
@@ -5,10 +5,10 @@
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 -KBUILD_CFLAGS += -Os
-+KBUILD_CFLAGS += -Os -fno-caller-saves
++KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION)
  else
 -KBUILD_CFLAGS += -O2
-+KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch -fno-caller-saves
++KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION)
  endif
  
  include $(srctree)/arch/$(SRCARCH)/Makefile