diff options
author | Yuji Mano <yuji.mano@am.sony.com> | 2009-01-20 16:29:57 -0800 |
---|---|---|
committer | Yuji Mano <yuji.mano@am.sony.com> | 2009-01-23 11:01:44 -0800 |
commit | 70660ee0b2712f4c37dcff39aa42d2378d690c74 (patch) | |
tree | ff0290d56cc4dc3e3a5a906dac407dda15b127da | |
parent | 1324135dd1e77d4599e761f5223f18ed04f96cbc (diff) | |
download | mars-src-70660ee0b2712f4c37dcff39aa42d2378d690c74.tar.gz |
task: Force size optimization cflag
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@am.sony.com>
Acked-by: Kazunori Asayama <asayama@sm.sony.co.jp>
-rw-r--r-- | task/src/mpu/lib/Makefile.am | 2 | ||||
-rw-r--r-- | task/src/mpu/module/Makefile.am | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/task/src/mpu/lib/Makefile.am b/task/src/mpu/lib/Makefile.am index a9ff458..b768d6f 100644 --- 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 diff --git a/task/src/mpu/module/Makefile.am b/task/src/mpu/module/Makefile.am index 15cbc7b..5c30a76 100644 --- 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 |