summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-01-10 15:11:45 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-01-16 01:46:57 -0800
commite0ec876dac4a89f2d0924b2323ebf6cb3d981723 (patch)
treec1b2678b003f0e47b114a72bf4f16fdebe5a3bbe
parent7253fd834bc0255a172fb23895cd11b599ee0b20 (diff)
downloadchrome-ec-e0ec876dac4a89f2d0924b2323ebf6cb3d981723.tar.gz
minute-ia: set -O2 and omit frame ptr
There is a lot of unnecessary stack frame assembly being generated in the final image. Turn up optimization to -O2 and omit the frame pointer. BRANCH=none BUG=b:122526004 TEST=verified the disassembly is much smaller and does not write register to the stack all the time. Also loaded Arcada ISH5 with optimized image and it boots fine. Change-Id: I2a6db49d75964fa8bd6c0f58166c1e76c04a15c9 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1405770 Tested-by: Kyoung Il Kim <kyoung.il.kim@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Caveh Jalali <caveh@google.com> Reviewed-by: Kyoung Il Kim <kyoung.il.kim@intel.com>
-rw-r--r--core/minute-ia/build.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/minute-ia/build.mk b/core/minute-ia/build.mk
index c3ce902fa1..a6190663fe 100644
--- a/core/minute-ia/build.mk
+++ b/core/minute-ia/build.mk
@@ -14,7 +14,7 @@ $(call set-option,CROSS_COMPILE,$(CROSS_COMPILE_i386),\
CFLAGS_FPU-$(CONFIG_FPU)=
# CPU specific compilation flags
-CFLAGS_CPU+=-fno-omit-frame-pointer -mno-accumulate-outgoing-args \
+CFLAGS_CPU+=-O2 -fomit-frame-pointer -mno-accumulate-outgoing-args \
-ffunction-sections -fdata-sections \
-fno-builtin-printf -fno-builtin-sprintf \
-fno-stack-protector -gdwarf-2 -fno-common -ffreestanding \