source: trunk/target/linux/generic/patches-2.6.38/012-extra_optimization.patch @ 26301

Last change on this file since 26301 was 26301, checked in by nbd, 6 years ago

kernel: use -fno-caller-saves

File size: 675 bytes
  • Makefile

    a b endif # $(dot-config) 
    539539all: vmlinux 
    540540 
    541541ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 
    542 KBUILD_CFLAGS   += -Os 
     542KBUILD_CFLAGS   += -Os -fno-caller-saves 
    543543else 
    544 KBUILD_CFLAGS   += -O2 
     544KBUILD_CFLAGS   += -O2 -fno-reorder-blocks -fno-tree-ch -fno-caller-saves 
    545545endif 
    546546 
    547547include $(srctree)/arch/$(SRCARCH)/Makefile 
    endif 
    596596NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) 
    597597CHECKFLAGS     += $(NOSTDINC_FLAGS) 
    598598 
     599# improve gcc optimization 
     600CFLAGS += $(call cc-option,-funit-at-a-time,) 
     601 
    599602# warn about C99 declaration after statement 
    600603KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) 
    601604 
Note: See TracBrowser for help on using the repository browser.