build: unify target independent optimization options
[openwrt/staging/chunkeey.git] / target / linux / generic / patches-3.10 / 201-extra_optimization.patch
index 6af3d01ba225a7c4689852157e5d9a316fb9793d..ccb7fcfb3b2c5d41e992f6cb11e7eadcfff2e3b6 100644 (file)
@@ -5,10 +5,10 @@
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 -KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
-+KBUILD_CFLAGS += -Os -fno-caller-saves $(call cc-disable-warning,maybe-uninitialized,)
++KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION) $(call cc-disable-warning,maybe-uninitialized,)
  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