File tree Expand file tree Collapse file tree 1 file changed +45
-2
lines changed Expand file tree Collapse file tree 1 file changed +45
-2
lines changed Original file line number Diff line number Diff line change @@ -570,9 +570,52 @@ endif # $(dot-config)
570570all : vmlinux
571571
572572ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
573- KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
573+ KBUILD_CFLAGS += -Os -mthumb
574+ LDFLAGS += -Os --as-needed --sort-common
575+
574576else
575- KBUILD_CFLAGS += -O3 -fno-tree-vectorize
577+
578+ LDFLAGS += -Ofast --as-needed --sort-common
579+ KBUILD_CFLAGS += -Ofast -marm \
580+ -ftree-vectorize \
581+ -funsafe-loop-optimizations \
582+ -fno-keep-static-consts \
583+ -fmerge-all-constants \
584+ -fmodulo-sched \
585+ -fmodulo-sched-allow-regmoves \
586+ -fgcse-sm \
587+ -fgcse-las \
588+ -fgcse-after-reload \
589+ -fira-region=all \
590+ -fsched-pressure \
591+ -fsched-spec-load \
592+ -fsched-spec-load-dangerous \
593+ -fselective-scheduling \
594+ -fsel-sched-pipelining \
595+ -fsel-sched-pipelining-outer-loops \
596+ -fipa-pta \
597+ -fno-check-data-deps \
598+ -ftree-loop-if-convert \
599+ -ftree-loop-distribution \
600+ -ftree-loop-im \
601+ -ftree-loop-ivcanon \
602+ -fivopts \
603+ -ftree-coalesce-inlined-vars \
604+ -ftracer \
605+ -fprefetch-loop-arrays \
606+ -fweb \
607+ -fuse-linker-plugin \
608+ -ffat-lto-objects \
609+ -fprofile-correction \
610+ -frename-registers \
611+ -fsection-anchors \
612+ -funswitch-loops \
613+ -DNDEBUG \
614+ -frerun-cse-after-loop \
615+ -fpeel-loops \
616+ -fbtr-bb-exclusive \
617+ -fcx-fortran-rules
618+
576619endif
577620
578621include $(srctree ) /arch/$(SRCARCH ) /Makefile
You can’t perform that action at this time.
0 commit comments