summaryrefslogtreecommitdiff
path: root/config/libc/newlib.in
diff options
context:
space:
mode:
Diffstat (limited to 'config/libc/newlib.in')
-rw-r--r--config/libc/newlib.in299
1 files changed, 143 insertions, 156 deletions
diff --git a/config/libc/newlib.in b/config/libc/newlib.in
index 166130f..f1cb29b 100644
--- a/config/libc/newlib.in
+++ b/config/libc/newlib.in
@@ -1,220 +1,207 @@
# newlib options
## depends on BARE_METAL
-##
+## select LIBC_PROVIDES_CXA_ATEXIT
## select LIBC_SUPPORT_THREADS_NONE
-## select CC_CORE_PASSES_NEEDED if CANADIAN
-## select CC_CORE_PASS_2_NEEDED if ! CANADIAN
-##
+## select CC_CORE_NEEDED
+
## help Newlib is a C library intended for use on embedded systems. It is a
## help conglomeration of several library parts, all under free software
## help licenses that make them easily usable on embedded products. Newlib
## help is only available in source form. It can be compiled for a wide
## help array of processors, and will usually work on any architecture with
## help the addition of a few low-level routines.
-#
-config LIBC_NEWLIB_CUSTOM
- bool
- prompt "Custom newlib"
- depends on EXPERIMENTAL
- select LIBC_NEWLIB_2_5_or_later
- help
- The choosen newlib version shall be not downloaded. Instead use
- a custom location to get the source.
-if LIBC_NEWLIB_CUSTOM
-
-config LIBC_NEWLIB_CUSTOM_LOCATION
- string
- prompt "Full path to custom newlib source"
- help
- Enter the path to the directory or tarball of your source for newlib.
-
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, newlib, and the version is set
- below in the custom version string.
-
-config LIBC_NEWLIB_CUSTOM_VERSION
+config LIBC_NEWLIB_TARGET_CFLAGS
string
- prompt "Custom NEWLIB version"
+ prompt "Target CFLAGS for newlib"
+ default ""
help
- Enter the version number for your custom newlib.
-
-config LIBC_VERSION
- string
- default LIBC_NEWLIB_CUSTOM_VERSION
-
-endif # LIBC_NEWLIB_CUSTOM
+ Used to add specific options when compiling the target libraries
+ (eg. -ffunction-sections -fdata-sections), which can't be defined
+ in global TARGET_CFLAGS, because they shall be not used for the
+ gcc target libraries.
+ Note: Both TARGET_CFLAGS and LIBC_NEWLIB_TARGET_CFLAGS are used
+ to compile the libraries.
-if ! LIBC_NEWLIB_CUSTOM
+ Leave blank if you don't know better.
-config CC_NEWLIB_SHOW_LINARO
+config LIBC_NEWLIB_IO_C99FMT
bool
- prompt "Show Linaro versions"
+ prompt "Enable IOs on C99 formats"
help
- Linaro is maintaining some advanced/more stable/experimental versions
- of newlib, especially for the ARM architecture.
-
- Those versions have not been blessed by the newlib comunity (nor have they
- been cursed either!), but they look to be pretty much stable, and even
- more stable than the upstream versions. YMMV...
-
- If you do not know what this Linaro stuff is, then simply say 'n' here,
- and rest in peace. OTOH, if you know what you are doing, you will be
- able to use and enjoy :-) the Linaro versions by saying 'y' here.
-
- Linaro: http://www.linaro.org/
-
-choice
- bool
- prompt "newlib version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-config LIBC_NEWLIB_V_2_5_0
- bool
- prompt "2.5.0"
- select LIBC_NEWLIB_2_5
-
-config LIBC_NEWLIB_V_2_4_0
- bool
- prompt "2.4.0.20161025"
- select LIBC_NEWLIB_2_4
+ Enable support for IOs on C99 formats.
-config LIBC_NEWLIB_V_2_3_0
+config LIBC_NEWLIB_IO_LL
bool
- prompt "2.3.0.20160226"
- select LIBC_NEWLIB_2_3
+ prompt "Enable IOs on long long"
+ help
+ Enable support for IOs on long long integers.
-config LIBC_NEWLIB_LINARO_V_2_2_0
+config LIBC_NEWLIB_IO_FLOAT
bool
- prompt "Linaro 2.2.0-2015.01"
- depends on CC_NEWLIB_SHOW_LINARO
- select LIBC_NEWLIB_2_2
+ prompt "Enable IOs on floats and doubles"
+ help
+ Enable support for IOs on floating point
+ values (float and double).
-config LIBC_NEWLIB_V_2_2_0
+config LIBC_NEWLIB_IO_LDBL
bool
- prompt "2.2.0.20151023"
- select LIBC_NEWLIB_2_2
+ prompt "Enable IOs on long doubles"
+ depends on LIBC_NEWLIB_IO_FLOAT
+ help
+ Enable support for IOs on long doubles.
-config LIBC_NEWLIB_LINARO_V_2_1_0
+config LIBC_NEWLIB_IO_POS_ARGS
bool
- prompt "Linaro 2.1.0-2014.09"
- depends on CC_NEWLIB_SHOW_LINARO
- select LIBC_NEWLIB_2_1
+ prompt "Enable printf-family positional arg support"
+ help
+ Enable printf-family positional arg support.
-config LIBC_NEWLIB_V_2_1_0
+config LIBC_NEWLIB_FVWRITE_IN_STREAMIO
bool
- prompt "2.1.0"
- select LIBC_NEWLIB_2_1
+ prompt "Vector buffer mechanism to support stream IO buffering"
+ default y
+ help
+ NEWLIB implements the vector buffer mechanism to support stream IO
+ buffering required by C standard. This feature is possibly
+ unnecessary for embedded systems which won't change file buffering
+ with functions like `setbuf' or `setvbuf'. The buffering mechanism
+ still acts as default for STDIN/STDOUT/STDERR even if this option
+ is specified.
-config LIBC_NEWLIB_V_2_0_0
+config LIBC_NEWLIB_UNBUF_STREAM_OPT
bool
- prompt "2.0.0"
- select LIBC_NEWLIB_2_0
+ prompt "Optimize fprintf to unbuffered unix file"
+ default y
+ help
+ NEWLIB does optimization when `fprintf to write only unbuffered unix
+ file'. It creates a temorary buffer to do the optimization that
+ increases stack consumption by about `BUFSIZ' bytes. Disabling this option
+ disables the optimization and saves size of text and stack.
-config LIBC_NEWLIB_V_1_20_0
+config LIBC_NEWLIB_FSEEK_OPTIMIZATION
bool
- prompt "1.20.0"
+ prompt "Fseek optimisation"
+ default y
+ help
+ Disabling fseek optimisation can decrease code size.
-config LIBC_NEWLIB_V_1_19_0
+config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
bool
- prompt "1.19.0"
+ prompt "Disable the syscalls supplied with newlib"
+ help
+ Disable the syscalls that come with newlib. You
+ will have to implement your own _sbrk, _read,
+ _write... If you plan to port newlib to a new
+ platform/board, say Yes.
-config LIBC_NEWLIB_V_1_18_0
+config LIBC_NEWLIB_REGISTER_FINI
bool
- prompt "1.18.0"
+ prompt "Enable finalization function registration using atexit"
+ help
+ Enable finalization function registration using atexit.
-config LIBC_NEWLIB_V_1_17_0
+config LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC
bool
- prompt "1.17.0"
-
-endchoice
-
-endif # ! LIBC_NEWLIB_CUSTOM
+ prompt "Enable dynamic allocation of atexit entries"
+ default y
+ help
+ Enable dynamic allocation of atexit entries.
-config LIBC_NEWLIB_2_5
+config LIBC_NEWLIB_GLOBAL_ATEXIT
bool
- select LIBC_NEWLIB_2_5_or_later
+ prompt "Enable atexit data structure as global variable"
+ help
+ Enable atexit data structure as global variable. By doing so it is
+ move out of _reent structure, and can be garbage collected if atexit
+ is not referenced.
-config LIBC_NEWLIB_2_4
+config LIBC_NEWLIB_LITE_EXIT
bool
- select LIBC_NEWLIB_2_4_or_later
+ prompt "Enable lite exit"
+ help
+ Enable lite exit, a size-reduced implementation of exit that doesn't
+ invoke clean-up functions such as _fini or global destructors.
-config LIBC_NEWLIB_2_3
+config LIBC_NEWLIB_REENT_SMALL
bool
- select LIBC_NEWLIB_2_3_or_later
+ prompt "Enable small reentrant struct support"
+ help
+ Enable small reentrant struct support.
-config LIBC_NEWLIB_2_2
+config LIBC_NEWLIB_MULTITHREAD
bool
- select LIBC_NEWLIB_2_2_or_later
+ prompt "Enable support for multiple threads"
+ default y
+ help
+ Enable support for multiple threads.
-config LIBC_NEWLIB_2_1
+config LIBC_NEWLIB_RETARGETABLE_LOCKING
bool
- select LIBC_NEWLIB_2_1_or_later
+ prompt "Enable retargetable locking"
+ help
+ Enable retargetable locking to allow the operating system to override
+ the dummy lock functions defined within the newlib.
-config LIBC_NEWLIB_2_0
+config LIBC_NEWLIB_EXTRA_SECTIONS
bool
- select LIBC_NEWLIB_2_0_or_later
+ prompt "Place each function & data element in their own section"
+ help
+ Place each function & data symbol in their own section. This allows
+ the linker to garbage collect unused symbols at link time.
-config LIBC_NEWLIB_2_5_or_later
+config LIBC_NEWLIB_WIDE_ORIENT
bool
- select LIBC_NEWLIB_2_4_or_later
+ prompt "Allow wide C99 stream orientation"
+ default y
+ help
+ C99 states that each stream has an orientation, wide or byte. This
+ feature is possibly unnecessary for embedded systems which only do
+ byte input/output operations on stream. Disabling this feature can
+ decrease code size.
-config LIBC_NEWLIB_2_4_or_later
+config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
bool
- select LIBC_NEWLIB_2_3_or_later
+ prompt "Optimize newlib for size"
+ default y
+ help
+ Pass --enable-target-optspace to newlib configure.
-config LIBC_NEWLIB_2_3_or_later
- bool
- select LIBC_NEWLIB_2_2_or_later
+ This will compile newlib with -Os.
-config LIBC_NEWLIB_2_2_or_later
+config LIBC_NEWLIB_LTO
bool
- select LIBC_NEWLIB_2_1_or_later
+ prompt "Enable Link Time Optimization"
+ depends on CC_GCC_USE_LTO
+ help
+ Builds the libraries with -flto to enable more aggressive link time
+ optimization. You will need to add -flto-partition=one to your
+ application's link line to keep the RETURN assembler macro together
+ with it's consumers.
-config LIBC_NEWLIB_2_1_or_later
+config LIBC_NEWLIB_NANO_MALLOC
bool
- select LIBC_NEWLIB_2_0_or_later
+ prompt "Enable Nano Malloc"
+ 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.
-# maybe older versions of newlib will support it too, but this
-# needs to be checked
-config LIBC_NEWLIB_2_0_or_later
+config LIBC_NEWLIB_NANO_FORMATTED_IO
bool
- select LIBC_PROVIDES_CXA_ATEXIT
-
-if ! LIBC_NEWLIB_CUSTOM
-config LIBC_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2.5.0" if LIBC_NEWLIB_V_2_5_0
- default "2.4.0.20161025" if LIBC_NEWLIB_V_2_4_0
- 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.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
- default "1.20.0" if LIBC_NEWLIB_V_1_20_0
- default "1.19.0" if LIBC_NEWLIB_V_1_19_0
- default "1.18.0" if LIBC_NEWLIB_V_1_18_0
- default "1.17.0" if LIBC_NEWLIB_V_1_17_0
- help
- Enter the tag you want to use.
- Leave empty to use the 'head' of the repository.
-
-endif # ! LIBC_NEWLIB_CUSTOM
+ prompt "Enable Nano Formatted I/O"
+ 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_TARGET_CFLAGS
+config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
string
- prompt "Target CFLAGS for newlib"
+ prompt "Extra config for newlib"
default ""
help
- Used to add specific options when compiling the target libraries
- (eg. -ffunction-sections -fdata-sections), which can't be defined
- in global TARGET_CFLAGS, because they shall be not used for the
- gcc target libraries.
- Note: Both TARGET_CFLAGS and LIBC_NEWLIB_TARGET_CFLAGS are used
- to compile the libraries.
-
- Leave blank if you don't know better.
+ Extra flags to pass onto ./configure when configuring the newlib.