[Cbe-oss-dev] [PATCH 04/28]MARS/base: optimize build options

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


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

Optimize compiler options (base)

This patch optimizes compiler options when building the base library
and MARS kernel so reduces code size.

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

Index: b/base/src/mpu/kernel/Makefile.am
===================================================================
--- a/base/src/mpu/kernel/Makefile.am	2009-01-27 15:07:05.000000000 +0900
+++ b/base/src/mpu/kernel/Makefile.am	2009-01-27 15:17:22.000000000 +0900
@@ -73,6 +73,8 @@ AM_CCASFLAGS = \
 AM_CFLAGS = \
 	$(extra_cflags) \
 	-mfixed-range=80-127 \
+	-ffunction-sections \
+	-fdata-sections \
 	-W \
 	-Wall \
 	-Wunused \
@@ -86,6 +88,8 @@ AM_LDFLAGS = \
 	$(extra_ldflags) \
 	-Wl,-Map -Wl,$@.map -Wl,--cref \
 	-Wl,-gc-sections \
+	-Wl,--sort-common \
+	-Wl,--sort-section -Wl,alignment \
 	-Wl,-N \
 	-Wl,-s
 
Index: b/base/src/mpu/lib/Makefile.am
===================================================================
--- a/base/src/mpu/lib/Makefile.am	2009-01-27 15:07:05.000000000 +0900
+++ b/base/src/mpu/lib/Makefile.am	2009-01-27 15:07:25.000000000 +0900
@@ -76,6 +76,8 @@ AM_CPPFLAGS = \
 
 AM_CFLAGS = \
 	$(extra_cflags) \
+	-ffunction-sections \
+	-fdata-sections \
 	-W \
 	-Wall \
 	-Wunused \







More information about the cbe-oss-dev mailing list