From 9d5fc3fd9b1e7a13a88daedbc11b7a797ae36322 Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Wed, 13 Jan 2016 06:20:35 -0800 Subject: newlib: disable multilib if it is not enabled Signed-off-by: Bryan Hundven --- scripts/build/libc/newlib.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/build') diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index ba52268e..641ba953 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -65,6 +65,11 @@ do_libc() { CT_DoLog EXTRA "Configuring C library" + # Multilib is the default, so if it is not enabled, disable it. + if [ "${CT_MULTILIB}" != "y" ]; then + extra_config+=("--disable-multilib") + fi + if [ "${CT_LIBC_NEWLIB_IO_C99FMT}" = "y" ]; then newlib_opts+=( "--enable-newlib-io-c99-formats" ) else -- cgit v1.2.3 From 929e027500188ee1857b41c7b652ea0cdbc28b1d Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Wed, 13 Jan 2016 06:22:18 -0800 Subject: newlib: add option to enable nano malloc Signed-off-by: Bryan Hundven --- config/libc/newlib.in.2 | 11 +++++++++++ scripts/build/libc/newlib.sh | 3 +++ 2 files changed, 14 insertions(+) (limited to 'scripts/build') diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2 index b16b23a8..ed355668 100644 --- a/config/libc/newlib.in.2 +++ b/config/libc/newlib.in.2 @@ -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" diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 641ba953..1b0737e1 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -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") -- cgit v1.2.3 From 6476f8a9403bd3c4b1477a23d0bbba1961ed9f66 Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Wed, 13 Jan 2016 06:22:59 -0800 Subject: newlib: add option to enable nano formatted io Signed-off-by: Bryan Hundven --- config/libc/newlib.in.2 | 10 ++++++++++ scripts/build/libc/newlib.sh | 3 +++ 2 files changed, 13 insertions(+) (limited to 'scripts/build') diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2 index ed355668..48e5503f 100644 --- a/config/libc/newlib.in.2 +++ b/config/libc/newlib.in.2 @@ -55,6 +55,16 @@ config LIBC_NEWLIB_NANO_MALLOC with very limited memory. Note that this implementation does not support `--enable-malloc-debugging' any more. +config LIBC_NEWLIB_NANO_FORMATTED_IO + bool + prompt "Enable Nano Formatted I/O" + depends on LIBC_NEWLIB_2_2_or_later + help + This builds NEWLIB with a special implementation of formatted I/O + functions, designed to lower the size of application on small systems + with size constraint issues. This option does not affect wide-char + formatted I/O functions. + config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY string prompt "Extra config for newlib" diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 1b0737e1..e70b6690 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -99,6 +99,9 @@ do_libc() { if [ "${CT_LIBC_NEWLIB_NANO_MALLOC}" = "y" ]; then newlib_opts+=( "--enable-newlib-nano-malloc" ) fi + if [ "${CT_LIBC_NEWLIB_NANO_FORMATTED_IO}" = "y" ]; then + newlib_opts+=( "--enable-newlib-nano-formatted-io" ) + fi [ "${CT_LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE}" = "y" ] && newlib_opts+=("--enable-target-optspace") -- cgit v1.2.3