libc/newlib: add option to optimise for size

Add an option to build with -Os instead of the default -O.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
This commit is contained in:
Zhenqiang Chen 2011-11-22 14:18:14 +08:00
parent f8d8029026
commit 91eb66a629
2 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,15 @@ config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
_write... If you plan to port newlib to a new
platform/board, say Yes.
config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
bool
prompt "Optimize newlib for size"
default y
help
Pass --enable-target-optspace to newlib configure.
This will compile newlib with -Os.
config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
string
prompt "Extra config for newlib"

View File

@ -85,6 +85,8 @@ do_libc_start_files() {
newlib_opts+=( "--enable-newlib-supplied-syscalls" )
fi
[ "${CT_LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE}" = "y" ] && newlib_opts+=("--enable-target-optspace")
# Note: newlib handles the build/host/target a little bit differently
# than one would expect:
# build : not used