[Cbe-oss-dev] [PATCH 17/22]MARS/task: Force size optimization cflag
Yuji Mano
yuji.mano at am.sony.com
Wed Jan 21 11:29:57 EST 2009
This is a non-elegant solution of appending the desired optimization flags to
CFLAGS to work around the fact that autoconf by default sets CFLAGS to '-g -O2'
if no user CFLAGS variable is set.
The user should not override the optimization level due
to code size limitations.
Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>
---
task/src/mpu/lib/Makefile.am | 2 ++
task/src/mpu/module/Makefile.am | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
--- a/task/src/mpu/lib/Makefile.am
+++ b/task/src/mpu/lib/Makefile.am
@@ -42,8 +42,10 @@ extra_ldflags =
if DEBUG
extra_cppflags += "-DDEBUG"
+ CFLAGS += -O0
else
extra_cppflags += "-DNDEBUG"
+ CFLAGS += -Os
endif
if MARS_PLATFORM_CELL
--- a/task/src/mpu/module/Makefile.am
+++ b/task/src/mpu/module/Makefile.am
@@ -44,11 +44,12 @@ if DEBUG
extra_cppflags += "-DDEBUG"
# debug kernel is 64K
extra_ldflags += -Wl,--defsym=__stack=0x1fff0 -Wl,--section-start,.init=0x10000
+ CFLAGS += -O0
else
extra_cppflags += "-DNDEBUG"
# release kernel is 16K
- # ** todo **
extra_ldflags += -Wl,--defsym=__stack=0x7ff0 -Wl,--section-start,.init=0x4000
+ CFLAGS += -Os
endif
if MARS_PLATFORM_CELL
More information about the cbe-oss-dev
mailing list