Advertisement
Guest User

patch for ls-wvl: Reduce kernel size

a guest
Mar 3rd, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. --- a/Makefile
  2. +++ b/Makefile
  3. @@ -559,9 +559,9 @@ endif # $(dot-config)
  4. all: vmlinux
  5.  
  6. ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  7. -KBUILD_CFLAGS += -Os
  8. +KBUILD_CFLAGS += -Os -fno-caller-saves
  9. else
  10. -KBUILD_CFLAGS += -O2
  11. +KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch -fno-caller-saves
  12. endif
  13.  
  14. include $(srctree)/arch/$(SRCARCH)/Makefile
  15. @@ -620,6 +620,9 @@ endif
  16. NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
  17. CHECKFLAGS += $(NOSTDINC_FLAGS)
  18.  
  19. +# improve gcc optimization
  20. +CFLAGS += $(call cc-option,-funit-at-a-time,)
  21. +
  22. # warn about C99 declaration after statement
  23. KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement