newlib: add option to enable nano malloc

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
This commit is contained in:
Bryan Hundven 2016-01-13 06:22:18 -08:00
parent 9d5fc3fd9b
commit 929e027500
2 changed files with 14 additions and 0 deletions

View File

@ -44,6 +44,17 @@ config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
This will compile newlib with -Os.
config LIBC_NEWLIB_NANO_MALLOC
bool
prompt "Enable Nano Malloc"
depends on LIBC_NEWLIB_2_1_or_later
help
NEWLIB has two implementations of malloc family's functions, one in
`mallocr.c' and the other one in `nano-mallocr.c'. This options
enables the nano-malloc implementation, which is for small systems
with very limited memory. Note that this implementation does not
support `--enable-malloc-debugging' any more.
config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
string
prompt "Extra config for newlib"

View File

@ -96,6 +96,9 @@ do_libc() {
else
newlib_opts+=( "--enable-newlib-supplied-syscalls" )
fi
if [ "${CT_LIBC_NEWLIB_NANO_MALLOC}" = "y" ]; then
newlib_opts+=( "--enable-newlib-nano-malloc" )
fi
[ "${CT_LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE}" = "y" ] && newlib_opts+=("--enable-target-optspace")