build: unify target independent optimization options
[openwrt/staging/dedeckeh.git] / target / linux / generic / patches-3.6 / 201-extra_optimization.patch
index f255a01c1ad9b31fdc57599751865c9f8d01fe53..10b2c4dfa84262a575e6c2f97d250540b7b0707e 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