From 6f31a202409bf9d1fd007ad3e5acdd6b36be9464 Mon Sep 17 00:00:00 2001 From: cal Date: Fri, 1 May 2015 17:39:47 +0200 Subject: [PATCH] Makefile fix: "-Os" was overridden by "-O2" --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 85bc27a9..19feb38d 100644 --- a/Makefile +++ b/Makefile @@ -103,9 +103,15 @@ OIMAGES := $(GEN_IMAGES:%=$(IMAGEODIR)/%) BINODIR := $(ODIR)/$(TARGET)/$(FLAVOR)/bin OBINS := $(GEN_BINS:%=$(BINODIR)/%) +# +# Note: +# https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html +# If you add global optimize options like "-O2" here +# they will override "-Os" defined above. +# "-Os" should be used to reduce code size +# CCFLAGS += \ -g \ - -O2 \ -Wpointer-arith \ -Wundef \ -Werror \