Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Pankratov committed Mar 30, 2016
2 parents 78c683c + e1d494a commit f6d8dc4
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
20 changes: 17 additions & 3 deletions config/libc/newlib.in
Expand Up @@ -17,7 +17,7 @@ config LIBC_NEWLIB_CUSTOM
bool
prompt "Custom newlib"
depends on EXPERIMENTAL
select LIBC_NEWLIB_2_2_or_later
select LIBC_NEWLIB_2_3_or_later
help
The choosen newlib version shall be not downloaded. Instead use
a custom location to get the source.
Expand Down Expand Up @@ -71,6 +71,11 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW

config LIBC_NEWLIB_V_2_3_0
bool
prompt "2.3.0.20160226"
select LIBC_NEWLIB_2_3

config LIBC_NEWLIB_LINARO_V_2_2_0
bool
prompt "Linaro 2.2.0-2015.01"
Expand All @@ -79,7 +84,7 @@ config LIBC_NEWLIB_LINARO_V_2_2_0

config LIBC_NEWLIB_V_2_2_0
bool
prompt "2.2.0"
prompt "2.2.0.20151023"
select LIBC_NEWLIB_2_2

config LIBC_NEWLIB_LINARO_V_2_1_0
Expand Down Expand Up @@ -118,6 +123,10 @@ endchoice

endif # ! LIBC_NEWLIB_CUSTOM

config LIBC_NEWLIB_2_3
bool
select LIBC_NEWLIB_2_3_or_later

config LIBC_NEWLIB_2_2
bool
select LIBC_NEWLIB_2_2_or_later
Expand All @@ -130,6 +139,10 @@ config LIBC_NEWLIB_2_0
bool
select LIBC_NEWLIB_2_0_or_later

config LIBC_NEWLIB_2_3_or_later
bool
select LIBC_NEWLIB_2_2_or_later

config LIBC_NEWLIB_2_2_or_later
bool
select LIBC_NEWLIB_2_1_or_later
Expand All @@ -149,8 +162,9 @@ config LIBC_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
default "2.3.0.20160226" if LIBC_NEWLIB_V_2_3_0
default "linaro-2.2.0-2015.01" if LIBC_NEWLIB_LINARO_V_2_2_0
default "2.2.0" if LIBC_NEWLIB_V_2_2_0
default "2.2.0.20151023" if LIBC_NEWLIB_V_2_2_0
default "linaro-2.1.0-2014.09" if LIBC_NEWLIB_LINARO_V_2_1_0
default "2.1.0" if LIBC_NEWLIB_V_2_1_0
default "2.0.0" if LIBC_NEWLIB_V_2_0_0
Expand Down
21 changes: 21 additions & 0 deletions config/libc/newlib.in.2
Expand Up @@ -44,6 +44,27 @@ 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_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"
Expand Down
11 changes: 11 additions & 0 deletions scripts/build/libc/newlib.sh
Expand Up @@ -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
Expand All @@ -91,6 +96,12 @@ 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
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")

Expand Down

0 comments on commit f6d8dc4

Please sign in to comment.