[Cbe-oss-dev] [PATCH 20/28]MARS/task: optimize build options

Yuji Mano yuji.mano at am.sony.com
Fri Feb 6 13:32:40 EST 2009


From: Kazunori Asayama <asayama at sm.sony.co.jp>

Optimize compiler options (task module)

This patch optimizes compiler options when building the task library
and task module so reduces code size.

Signed-off-by: Kazunori Asayama <asayama at sm.sony.co.jp>
---
 task/src/mpu/lib/Makefile.am    |    2 ++
 task/src/mpu/module/Makefile.am |    4 ++++
 2 files changed, 6 insertions(+)

Index: b/task/src/mpu/lib/Makefile.am
===================================================================
--- a/task/src/mpu/lib/Makefile.am	2009-01-27 15:13:41.000000000 +0900
+++ b/task/src/mpu/lib/Makefile.am	2009-01-27 15:14:35.000000000 +0900
@@ -81,6 +81,8 @@ AM_CPPFLAGS = \
 
 AM_CFLAGS = \
 	$(extra_cflags) \
+	-ffunction-sections \
+	-fdata-sections \
 	-W \
 	-Wall \
 	-Wunused \
Index: b/task/src/mpu/module/Makefile.am
===================================================================
--- a/task/src/mpu/module/Makefile.am	2009-01-27 15:13:41.000000000 +0900
+++ b/task/src/mpu/module/Makefile.am	2009-01-27 15:15:49.000000000 +0900
@@ -76,6 +76,8 @@ AM_CCASFLAGS = \
 AM_CFLAGS = \
 	$(extra_cflags) \
 	-mfixed-range=80-127 \
+	-ffunction-sections \
+	-fdata-sections \
 	-W \
 	-Wall \
 	-Wunused \
@@ -91,6 +93,8 @@ AM_LDFLAGS = \
 	-Wl,--entry,mars_module_entry -Wl,-u,mars_module_entry \
 	-Wl,-Map -Wl,$@.map -Wl,--cref \
 	-Wl,-gc-sections \
+	-Wl,--sort-common \
+	-Wl,--sort-section -Wl,alignment \
 	-Wl,-N \
 	-Wl,-s
 







More information about the cbe-oss-dev mailing list