This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RFA: configure.host: Optimize RL78 for size
- From: Nick Clifton <nickc at redhat dot com>
- To: newlib at sourceware dot org
- Date: Fri, 20 Dec 2013 09:12:54 +0000
- Subject: RFA: configure.host: Optimize RL78 for size
- Authentication-results: sourceware.org; auth=none
Hi Guys,
Please may I have permission to apply the small patch below. It adds
the RL78 to the list of targets in configure.host that are optimized
for size rather than speed. In addition it adds the
-ffunction-sections and -fdata-sections options to the RL78 build
command line so that unused code and data can be garbage collected by
the linker.
OK to apply ?
Cheers
Nick
newlib/ChangeLog
2013-12-20 Nick Clifton <nickc@redhat.com>
* configure.host (newlib_cflags): Use -Os, -ffunction-sections and
-fdata-sections for RL78.
Index: configure.host
===================================================================
RCS file: /cvs/src/src/newlib/configure.host,v
retrieving revision 1.132
diff -u -3 -p -r1.132 configure.host
--- configure.host 1 Oct 2013 18:08:45 -0000 1.132
+++ configure.host 20 Dec 2013 09:12:26 -0000
@@ -79,7 +79,7 @@ case "${target_optspace}:${host}" in
yes:*)
newlib_cflags="${newlib_cflags} -Os"
;;
- :m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* | :msp430*-* | :nds32* )
+ :m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* | :msp430*-* | :nds32* | :rl78-* )
newlib_cflags="${newlib_cflags} -Os"
;;
no:* | :*)
@@ -252,6 +252,7 @@ case "${host_cpu}" in
rl78)
machine_dir=rl78
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
+ newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
;;
rx)
machine_dir=rx