summaryrefslogtreecommitdiff
path: root/config/libc
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-07-05 02:19:42 (GMT)
committerAlexey Neyman <stilor@att.net>2017-07-08 17:57:56 (GMT)
commitff0a1a3da605ca157e3f3d0ed2d8b9acb30c2f69 (patch)
tree3866631ee0fa3fc650fd71de948f9a8b32bfc359 /config/libc
parent50a387afa7abd24255ef865dada5d324265e1250 (diff)
Switch gen-kconfig to new framework
Also: - Move companion_* to comp_* to match the kconfig symbols - Replace bootstrap with former gen-versions.sh - Fold *.in.2 into their respective first parts; this moves common options to the end - if it is undesirable, inclusion of *.in can be moved where *.in.2 used to be (but that will also move version selection after common options). - Retire addToolVersion.sh (may later replace with a more comprehensive script that tries to download the added tarballs, copy the patches and try to apply them, and create a version.desc). Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'config/libc')
-rw-r--r--config/libc/avr-libc.in7
-rw-r--r--config/libc/avr-libc.in.28
-rw-r--r--config/libc/glibc.in276
-rw-r--r--config/libc/glibc.in.2269
-rw-r--r--config/libc/musl.in57
-rw-r--r--config/libc/musl.in.251
-rw-r--r--config/libc/newlib.in192
-rw-r--r--config/libc/newlib.in.2190
-rw-r--r--config/libc/uClibc.in95
-rw-r--r--config/libc/uClibc.in.296
10 files changed, 615 insertions, 626 deletions
diff --git a/config/libc/avr-libc.in b/config/libc/avr-libc.in
index 6abbe01..42500f0 100644
--- a/config/libc/avr-libc.in
+++ b/config/libc/avr-libc.in
@@ -10,3 +10,10 @@
## help provides the basic startup code needed by most applications.
source "config/versions/avr-libc.in"
+
+config LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY
+ string
+ prompt "Extra config for avr-libc"
+ default ""
+ help
+ Extra flags to pass onto ./configure when configuring the avr-libc.
diff --git a/config/libc/avr-libc.in.2 b/config/libc/avr-libc.in.2
deleted file mode 100644
index 89a182f..0000000
--- a/config/libc/avr-libc.in.2
+++ /dev/null
@@ -1,8 +0,0 @@
-# avr-libc second-part options
-
-config LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY
- string
- prompt "Extra config for avr-libc"
- default ""
- help
- Extra flags to pass onto ./configure when configuring the avr-libc.
diff --git a/config/libc/glibc.in b/config/libc/glibc.in
index 803ba29..bbf893d 100644
--- a/config/libc/glibc.in
+++ b/config/libc/glibc.in
@@ -1,16 +1,13 @@
-# glibc options
-
-# TBD move all the remaining parts into glibc.in.2 and move the sourcing of versions
-# into the auto-generated choice/menus?
+# This file contains the common configuration options
+# that apply to both glibc.
## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU
-##
## select LIBC_SUPPORT_THREADS_NATIVE
## select CC_CORE_PASSES_NEEDED
# TBD: select GETTEXT for build only, not for host
## select GETTEXT_NEEDED
## select BINUTILS_FORCE_LD_BFD_DEFAULT
-##
+
## help The de-facto standard for Linux distributions.
## help Feature-rich, but large... Most useful for desktop-like systems.
@@ -23,3 +20,270 @@ source "config/versions/glibc.in"
if GLIBC_USE_PORTS_EXTERNAL
source "config/versions/glibc-ports.in"
endif
+
+config THREADS
+ default "nptl"
+
+# Known add-ons and when they exist(ed)
+# crypt external in 2.1, no longer an add-on since 2.2
+# libidn external in 2.3.4 .. 2.10, still an add-on
+# linuxthreads external in 2.0.1 .. 2.5, no longer available since 2.6 [*]
+# localedata external in 2.0.1 .. 2.0.6, no longer an add-on since 2.1 [*]
+# ports external in 2.3.4 .. 2.16, no longer an add-on since 2.20
+# nptl never external, no longer an add-on since 2.20
+#
+# Given the list of currently supported glibc releases, we only need to worry about
+# 'libidn', 'ports' and 'nptl' add-ons. Of these, only 'ports' can be an external
+# tarball; and only 'libidn' is user-selectable ('ports' & 'nptl' are selected
+# by crosstool-NG, as dictated by the architecture and thread model).
+#
+# I had trouble locating the sources in the repository for some of the released
+# versions. E.g., there is a 2.5 version of linuxthreads, but the tag for 2.5 in Git
+# does not have the linuxthreads directory at all. Similarly, 2.0.6 tag did not have
+# localedata. Since these releases are no longer supported by crosstool-NG, this is
+# of pure historical interest now, however.
+
+config GLIBC_HAS_NPTL_ADDON
+ def_bool y
+ depends on !GLIBC_2_20_or_later
+
+config GLIBC_HAS_PORTS_ADDON
+ def_bool y
+ depends on !GLIBC_2_20_or_later
+
+config GLIBC_HAS_PORTS_ADDON_EXTERNAL
+ def_bool y
+ depends on !GLIBC_2_17_or_later
+
+# In case it folds into main distribution in some future release, too
+config GLIBC_HAS_LIBIDN_ADDON
+ def_bool y
+
+# Some architectures require the ports addon. List them one by one here:
+# This list must be carefully in sync with the architectures names
+# we can find in config/arch/*
+config GLIBC_USE_PORTS_ADDON
+ def_bool y
+ depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc
+ depends on GLIBC_HAS_PORTS_ADDON
+
+config GLIBC_USE_PORTS_EXTERNAL
+ def_bool y
+ depends on GLIBC_USE_PORTS_ADDON && GLIBC_HAS_PORTS_ADDON_EXTERNAL
+
+config GLIBC_USE_NPTL_ADDON
+ def_bool y
+ depends on THREADS_NATIVE && GLIBC_HAS_NPTL_ADDON
+
+config GLIBC_USE_LIBIDN_ADDON
+ bool "Build libidn add-on"
+ help
+ Enables the libidn add-on in GNU libc.
+
+# SPARCv8 support retired in 2.23
+config GLIBC_NO_SPARC_V8
+ def_bool y
+ depends on GLIBC_2_23_or_later
+
+config GLIBC_EXTRA_CONFIG_ARRAY
+ string
+ prompt "extra config"
+ default ""
+ help
+ Extra flags to pass onto ./configure when configuring.
+
+ You can enter multiple arguments here, and arguments can contain spaces
+ if they are properly quoted (or escaped, but prefer quotes). Eg.:
+ --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
+
+config GLIBC_CONFIGPARMS
+ string
+ prompt "Extra config params (READ HELP)"
+ default "" if ! ARCH_sh
+ default "no-z-defs=yes" if ARCH_sh
+ help
+ Some architectures need to set options in the file configparms.
+ This is the case for sh3/4, which really need to set configparms
+ to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
+
+ Unless you are building a toolchain for sh3/4, you should leave that empty.
+
+ Note: If you need to pass more than one value, separate them with
+ '\n'. Eg.: var1=val1\nvar2=val2
+
+config GLIBC_EXTRA_CFLAGS
+ string
+ prompt "extra target CFLAGS"
+ default ""
+ help
+ Extra target CFLAGS to use when building.
+
+config GLIBC_ENABLE_FORTIFIED_BUILD
+ bool
+ prompt "Enable fortified build (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ If you say 'y' here, then glibc will be using fortified versions
+ of functions with format arguments (eg. vsyslog, printf...), and
+ do a sanity check on the format at runtime, to avoid some of the
+ common format string attacks.
+
+ This is currently not supported, and will most probably result in
+ a broken build, with an error message like:
+ ../misc/syslog.c: In function '__vsyslog_chk':
+ ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
+ call to 'syslog': function body not available
+
+ If you are brave enough and want to debug the issue, then say 'y'
+ here. Otherwise, be still and say 'n' (the default). ;-)
+
+
+config GLIBC_DISABLE_VERSIONING
+ bool
+ prompt "Disable symbols versioning"
+ help
+ Do not include versioning information in the library objects.
+
+config GLIBC_OLDEST_ABI
+ string
+ prompt "Oldest supported ABI"
+ default ""
+ help
+ Set the oldest ABI supported by the C library.
+
+ Setting this option, for example, to 2.2 will provide ABI support
+ back to (e)glibc-2.2.
+
+ If this option is not set, (e)glibc will choose for you.
+
+config GLIBC_FORCE_UNWIND
+ bool
+ prompt "Force unwind support (READ HELP!)"
+ default y
+ help
+ If your toolchain fails building while building the C library
+ start files, or the complete C library, with a message like:
+ configure: error: forced unwind support is required
+
+ then you may try changing this option. Otherwise, leave it to
+ the default 'y'.
+
+ The issue seems to be related to building NPTL on old versions
+ of glibc on some architectures
+ (seen on s390, s390x and x86_64).
+
+config GLIBC_LOCALES
+ bool
+ prompt "Build and install locales"
+ help
+ Whether to build and install the libc locale files for the target,
+ which is required in order to support internationalization.
+
+if LIBC_glibc && GLIBC_LOCALES
+comment "WARNING! "
+comment "| The built locales will be usable if and only if the build "
+comment "| machine and the target: "
+comment "| - have the same endianness, "
+comment "| - and have the same alignment requirements for uint32_t. "
+comment "| You will have to check by yourself (for now). "
+comment "WARNING! "
+comment "| Building GLIBC locales requires that GLIBC supports "
+comment "| the build machine as the target. "
+endif # LIBC_glibc && GLIBC_LOCALES
+
+if KERNEL_linux
+
+choice GLIBC_SUPPORTED_KERNEL
+ bool
+ prompt "Minimum supported kernel version"
+ default GLIBC_KERNEL_VERSION_AS_HEADERS
+
+config GLIBC_KERNEL_VERSION_NONE
+ bool
+ prompt "Let ./configure decide"
+ help
+ Let ./configure decide what minimum kernel version glibc will be
+ able to run against.
+
+ This will include legacy compatibility code for older kernels in
+ the C library, thus ensuring that it will run on a large number
+ of old kernels.
+
+ The minimum kernel version supported will be dependent upon the
+ target you build for. For example:
+ alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
+ sh[34]-*-linux-gnu Requires Linux 2.6.11
+ powerpc* Requires Linux 2.4.19
+ arm*-*-linux-*gnueabi Requires Linux 2.6.16
+
+config GLIBC_KERNEL_VERSION_AS_HEADERS
+ bool
+ prompt "Same as kernel headers (default)"
+ help
+ Normally, you'll want glibc to run against the same kernel
+ version as the one used for the headers.
+
+ This is the default.
+
+ If enabled, crosstool-ng will use the chosen version of kernel
+ headers for the glibc minimum kernel version supported, which is
+ what gets passed to "--enable-kernel=" when configuring glibc.
+
+ Enabling this will ensure that no legacy compatibility code for
+ older kernels is built into your C libraries, but it will
+ be unable to run on kernel versions older than whichever kernel
+ headers version you've built the toolchain for.
+
+ If you know for sure that your toolchain will never need to build
+ applications that will run under a kernel version older than your
+ chosen kernel headers version (CT_KERNEL_VERSION), you can choose
+ "y" here.
+
+config GLIBC_KERNEL_VERSION_CHOSEN
+ bool
+ prompt "Specific kernel version"
+ help
+ Specify the earliest Linux kernel version you want glibc to
+ include support for. This does not have to match the kernel
+ headers version used for your toolchain. This controls what is
+ passed to the "--enable-kernel=" option to the glibc configure
+ script.
+
+ If you want to be able to statically link programs with your
+ toolchain's C library, make sure this kernel version is lower than
+ all kernels you wish to support to avoid "FATAL: kernel too old"
+ errors. The higher the version you specify, the less legacy code
+ will be built into libc.
+
+ Most people can leave this at the default value of "2.6.9".
+
+if GLIBC_KERNEL_VERSION_CHOSEN
+
+config GLIBC_MIN_KERNEL_VERSION
+ string
+ prompt "Minimum kernel version to support"
+ default "2.6.9"
+ help
+ Enter here the lowest kernel version glibc will be able to run against.
+
+ The minimum kernel version supported will be dependent upon the
+ target you build for. For example:
+ alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
+ sh[34]-*-linux-gnu Requires Linux 2.6.11
+ powerpc* Requires Linux 2.4.19
+ arm*-*-linux-*gnueabi Requires Linux 2.6.16
+
+ Note that no sanity check is performed by crosstool-NG to ensure
+ that the value you enter here is appropriate for your target.
+
+endif # GLIBC_KERNEL_VERSION_CHOSEN
+
+endchoice
+
+config GLIBC_MIN_KERNEL
+ string
+ default "" if GLIBC_KERNEL_VERSION_NONE
+ default LINUX_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS
+ default GLIBC_MIN_KERNEL_VERSION if GLIBC_KERNEL_VERSION_CHOSEN
+
+endif # KERNEL_linux
diff --git a/config/libc/glibc.in.2 b/config/libc/glibc.in.2
deleted file mode 100644
index 7785aca..0000000
--- a/config/libc/glibc.in.2
+++ /dev/null
@@ -1,269 +0,0 @@
-# This file contains the common configuration options
-# that apply to both glibc.
-
-config THREADS
- default "nptl"
-
-# Known add-ons and when they exist(ed)
-# crypt external in 2.1, no longer an add-on since 2.2
-# libidn external in 2.3.4 .. 2.10, still an add-on
-# linuxthreads external in 2.0.1 .. 2.5, no longer available since 2.6 [*]
-# localedata external in 2.0.1 .. 2.0.6, no longer an add-on since 2.1 [*]
-# ports external in 2.3.4 .. 2.16, no longer an add-on since 2.20
-# nptl never external, no longer an add-on since 2.20
-#
-# Given the list of currently supported glibc releases, we only need to worry about
-# 'libidn', 'ports' and 'nptl' add-ons. Of these, only 'ports' can be an external
-# tarball; and only 'libidn' is user-selectable ('ports' & 'nptl' are selected
-# by crosstool-NG, as dictated by the architecture and thread model).
-#
-# I had trouble locating the sources in the repository for some of the released
-# versions. E.g., there is a 2.5 version of linuxthreads, but the tag for 2.5 in Git
-# does not have the linuxthreads directory at all. Similarly, 2.0.6 tag did not have
-# localedata. Since these releases are no longer supported by crosstool-NG, this is
-# of pure historical interest now, however.
-
-config GLIBC_HAS_NPTL_ADDON
- def_bool y
- depends on !GLIBC_2_20_or_later
-
-config GLIBC_HAS_PORTS_ADDON
- def_bool y
- depends on !GLIBC_2_20_or_later
-
-config GLIBC_HAS_PORTS_ADDON_EXTERNAL
- def_bool y
- depends on !GLIBC_2_17_or_later
-
-# In case it folds into main distribution in some future release, too
-config GLIBC_HAS_LIBIDN_ADDON
- def_bool y
-
-# Some architectures require the ports addon. List them one by one here:
-# This list must be carefully in sync with the architectures names
-# we can find in config/arch/*
-config GLIBC_USE_PORTS_ADDON
- def_bool y
- depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc
- depends on GLIBC_HAS_PORTS_ADDON
-
-config GLIBC_USE_PORTS_EXTERNAL
- def_bool y
- depends on GLIBC_USE_PORTS_ADDON && GLIBC_HAS_PORTS_ADDON_EXTERNAL
-
-config GLIBC_USE_NPTL_ADDON
- def_bool y
- depends on THREADS_NATIVE && GLIBC_HAS_NPTL_ADDON
-
-config GLIBC_USE_LIBIDN_ADDON
- bool "Build libidn add-on"
- help
- Enables the libidn add-on in GNU libc.
-
-# SPARCv8 support retired in 2.23
-config GLIBC_NO_SPARC_V8
- def_bool y
- depends on GLIBC_2_23_or_later
-
-config GLIBC_EXTRA_CONFIG_ARRAY
- string
- prompt "extra config"
- default ""
- help
- Extra flags to pass onto ./configure when configuring.
-
- You can enter multiple arguments here, and arguments can contain spaces
- if they are properly quoted (or escaped, but prefer quotes). Eg.:
- --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
-
-config GLIBC_CONFIGPARMS
- string
- prompt "Extra config params (READ HELP)"
- default "" if ! ARCH_sh
- default "no-z-defs=yes" if ARCH_sh
- help
- Some architectures need to set options in the file configparms.
- This is the case for sh3/4, which really need to set configparms
- to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
-
- Unless you are building a toolchain for sh3/4, you should leave that empty.
-
- Note: If you need to pass more than one value, separate them with
- '\n'. Eg.: var1=val1\nvar2=val2
-
-config GLIBC_EXTRA_CFLAGS
- string
- prompt "extra target CFLAGS"
- default ""
- help
- Extra target CFLAGS to use when building.
-
-config GLIBC_ENABLE_FORTIFIED_BUILD
- bool
- prompt "Enable fortified build (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- If you say 'y' here, then glibc will be using fortified versions
- of functions with format arguments (eg. vsyslog, printf...), and
- do a sanity check on the format at runtime, to avoid some of the
- common format string attacks.
-
- This is currently not supported, and will most probably result in
- a broken build, with an error message like:
- ../misc/syslog.c: In function '__vsyslog_chk':
- ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
- call to 'syslog': function body not available
-
- If you are brave enough and want to debug the issue, then say 'y'
- here. Otherwise, be still and say 'n' (the default). ;-)
-
-
-config GLIBC_DISABLE_VERSIONING
- bool
- prompt "Disable symbols versioning"
- help
- Do not include versioning information in the library objects.
-
-config GLIBC_OLDEST_ABI
- string
- prompt "Oldest supported ABI"
- default ""
- help
- Set the oldest ABI supported by the C library.
-
- Setting this option, for example, to 2.2 will provide ABI support
- back to (e)glibc-2.2.
-
- If this option is not set, (e)glibc will choose for you.
-
-config GLIBC_FORCE_UNWIND
- bool
- prompt "Force unwind support (READ HELP!)"
- default y
- help
- If your toolchain fails building while building the C library
- start files, or the complete C library, with a message like:
- configure: error: forced unwind support is required
-
- then you may try changing this option. Otherwise, leave it to
- the default 'y'.
-
- The issue seems to be related to building NPTL on old versions
- of glibc on some architectures
- (seen on s390, s390x and x86_64).
-
-config GLIBC_LOCALES
- bool
- prompt "Build and install locales"
- help
- Whether to build and install the libc locale files for the target,
- which is required in order to support internationalization.
-
-if LIBC_glibc && GLIBC_LOCALES
-comment "WARNING! "
-comment "| The built locales will be usable if and only if the build "
-comment "| machine and the target: "
-comment "| - have the same endianness, "
-comment "| - and have the same alignment requirements for uint32_t. "
-comment "| You will have to check by yourself (for now). "
-comment "WARNING! "
-comment "| Building GLIBC locales requires that GLIBC supports "
-comment "| the build machine as the target. "
-endif # LIBC_glibc && GLIBC_LOCALES
-
-if KERNEL_linux
-
-choice GLIBC_SUPPORTED_KERNEL
- bool
- prompt "Minimum supported kernel version"
- default GLIBC_KERNEL_VERSION_AS_HEADERS
-
-config GLIBC_KERNEL_VERSION_NONE
- bool
- prompt "Let ./configure decide"
- help
- Let ./configure decide what minimum kernel version glibc will be
- able to run against.
-
- This will include legacy compatibility code for older kernels in
- the C library, thus ensuring that it will run on a large number
- of old kernels.
-
- The minimum kernel version supported will be dependent upon the
- target you build for. For example:
- alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
- sh[34]-*-linux-gnu Requires Linux 2.6.11
- powerpc* Requires Linux 2.4.19
- arm*-*-linux-*gnueabi Requires Linux 2.6.16
-
-config GLIBC_KERNEL_VERSION_AS_HEADERS
- bool
- prompt "Same as kernel headers (default)"
- help
- Normally, you'll want glibc to run against the same kernel
- version as the one used for the headers.
-
- This is the default.
-
- If enabled, crosstool-ng will use the chosen version of kernel
- headers for the glibc minimum kernel version supported, which is
- what gets passed to "--enable-kernel=" when configuring glibc.
-
- Enabling this will ensure that no legacy compatibility code for
- older kernels is built into your C libraries, but it will
- be unable to run on kernel versions older than whichever kernel
- headers version you've built the toolchain for.
-
- If you know for sure that your toolchain will never need to build
- applications that will run under a kernel version older than your
- chosen kernel headers version (CT_KERNEL_VERSION), you can choose
- "y" here.
-
-config GLIBC_KERNEL_VERSION_CHOSEN
- bool
- prompt "Specific kernel version"
- help
- Specify the earliest Linux kernel version you want glibc to
- include support for. This does not have to match the kernel
- headers version used for your toolchain. This controls what is
- passed to the "--enable-kernel=" option to the glibc configure
- script.
-
- If you want to be able to statically link programs with your
- toolchain's C library, make sure this kernel version is lower than
- all kernels you wish to support to avoid "FATAL: kernel too old"
- errors. The higher the version you specify, the less legacy code
- will be built into libc.
-
- Most people can leave this at the default value of "2.6.9".
-
-if GLIBC_KERNEL_VERSION_CHOSEN
-
-config GLIBC_MIN_KERNEL_VERSION
- string
- prompt "Minimum kernel version to support"
- default "2.6.9"
- help
- Enter here the lowest kernel version glibc will be able to run against.
-
- The minimum kernel version supported will be dependent upon the
- target you build for. For example:
- alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
- sh[34]-*-linux-gnu Requires Linux 2.6.11
- powerpc* Requires Linux 2.4.19
- arm*-*-linux-*gnueabi Requires Linux 2.6.16
-
- Note that no sanity check is performed by crosstool-NG to ensure
- that the value you enter here is appropriate for your target.
-
-endif # GLIBC_KERNEL_VERSION_CHOSEN
-
-endchoice
-
-config GLIBC_MIN_KERNEL
- string
- default "" if GLIBC_KERNEL_VERSION_NONE
- default LINUX_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS
- default GLIBC_MIN_KERNEL_VERSION if GLIBC_KERNEL_VERSION_CHOSEN
-
-endif # KERNEL_linux
diff --git a/config/libc/musl.in b/config/libc/musl.in
index 24f522a..e16e85a 100644
--- a/config/libc/musl.in
+++ b/config/libc/musl.in
@@ -1,17 +1,66 @@
-# musl options
+# musl second-part option
## depends on ! WINDOWS && ! BARE_METAL
## depends on EXPERIMENTAL
-##
## select LIBC_SUPPORT_THREADS_NATIVE
## select CC_CORE_PASSES_NEEDED
-##
+
## help Musl is a new standard library to power a new generation of Linux-based
## help devices. musl is lightweight, fast, simple, free, and strives to be
## help correct in the sense of standards-conformance and safety.
source "config/versions/musl.in"
-# FIXME why? it claims "native", why report "musl"?
+# TBD why? it claims "native", why report "musl"?
config THREADS
default "musl"
+
+config LIBC_MUSL_DEBUG
+ bool
+ prompt "Build with debugging information"
+ help
+ This option enables debugging information, this will increase the size of
+ the resulting library.
+
+config LIBC_MUSL_WARNINGS
+ bool
+ prompt "Build with recommended warnings flags"
+ help
+ Build musl-libc with extra warnings, useful for musl-libc development.
+
+choice
+ prompt "How to optimize musl-libc"
+ default LIBC_MUSL_OPTIMIZE_AUTO
+
+config LIBC_MUSL_OPTIMIZE_NONE
+ bool
+ prompt "Do not optimize musl-libc"
+ help
+ This option sets `--enable-optimize=no' to disable optimization.
+
+config LIBC_MUSL_OPTIMIZE_AUTO
+ bool
+ prompt "Use musl-libc's automatic optimization"
+ help
+ This option sets `--enable-optimize=auto' to automatically set optimization.
+
+config LIBC_MUSL_OPTIMIZE_SPEED
+ bool
+ prompt "Optimize musl-libc for speed"
+ help
+ This option sets `--enable-optimize=yes' to set optimization to -O3 for speed.
+
+config LIBC_MUSL_OPTIMIZE_SIZE
+ bool
+ prompt "Optimize musl-libc for size"
+ help
+ This option sets `--enable-optimize=size' to set optimization to -Os for size.
+
+endchoice
+
+config LIBC_MUSL_OPTIMIZE
+ string
+ default "no" if LIBC_MUSL_OPTIMIZE_NONE
+ default "auto" if LIBC_MUSL_OPTIMIZE_AUTO
+ default "yes" if LIBC_MUSL_OPTIMIZE_SPEED
+ default "size" if LIBC_MUSL_OPTIMIZE_SIZE
diff --git a/config/libc/musl.in.2 b/config/libc/musl.in.2
deleted file mode 100644
index f4abcc4..0000000
--- a/config/libc/musl.in.2
+++ /dev/null
@@ -1,51 +0,0 @@
-# musl second-part option
-
-config LIBC_MUSL_DEBUG
- bool
- prompt "Build with debugging information"
- help
- This option enables debugging information, this will increase the size of
- the resulting library.
-
-config LIBC_MUSL_WARNINGS
- bool
- prompt "Build with recommended warnings flags"
- help
- Build musl-libc with extra warnings, useful for musl-libc development.
-
-choice
- prompt "How to optimize musl-libc"
- default LIBC_MUSL_OPTIMIZE_AUTO
-
-config LIBC_MUSL_OPTIMIZE_NONE
- bool
- prompt "Do not optimize musl-libc"
- help
- This option sets `--enable-optimize=no' to disable optimization.
-
-config LIBC_MUSL_OPTIMIZE_AUTO
- bool
- prompt "Use musl-libc's automatic optimization"
- help
- This option sets `--enable-optimize=auto' to automatically set optimization.
-
-config LIBC_MUSL_OPTIMIZE_SPEED
- bool
- prompt "Optimize musl-libc for speed"
- help
- This option sets `--enable-optimize=yes' to set optimization to -O3 for speed.
-
-config LIBC_MUSL_OPTIMIZE_SIZE
- bool
- prompt "Optimize musl-libc for size"
- help
- This option sets `--enable-optimize=size' to set optimization to -Os for size.
-
-endchoice
-
-config LIBC_MUSL_OPTIMIZE
- string
- default "no" if LIBC_MUSL_OPTIMIZE_NONE
- default "auto" if LIBC_MUSL_OPTIMIZE_AUTO
- default "yes" if LIBC_MUSL_OPTIMIZE_SPEED
- default "size" if LIBC_MUSL_OPTIMIZE_SIZE
diff --git a/config/libc/newlib.in b/config/libc/newlib.in
index a37eca7..f43a67d 100644
--- a/config/libc/newlib.in
+++ b/config/libc/newlib.in
@@ -1,11 +1,10 @@
# newlib options
## depends on BARE_METAL
-##
## select LIBC_SUPPORT_THREADS_NONE
## select CC_CORE_PASSES_NEEDED if CANADIAN
## select CC_CORE_PASS_2_NEEDED if ! CANADIAN
-##
+
## 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
@@ -29,3 +28,192 @@ config NEWLIB_HAS_NANO_MALLOC
config NEWLIB_HAS_NANO_FORMATTED_IO
def_bool y
depends on NEWLIB_2_2_or_later
+
+config LIBC_NEWLIB_TARGET_CFLAGS
+ string
+ prompt "Target CFLAGS 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.
+
+config LIBC_NEWLIB_IO_C99FMT
+ bool
+ prompt "Enable IOs on C99 formats"
+ help
+ Enable support for IOs on C99 formats.
+
+config LIBC_NEWLIB_IO_LL
+ bool
+ prompt "Enable IOs on long long"
+ help
+ Enable support for IOs on long long integers.
+
+config LIBC_NEWLIB_IO_FLOAT
+ bool
+ prompt "Enable IOs on floats and doubles"
+ help
+ Enable support for IOs on floating point
+ values (float and double).
+
+config LIBC_NEWLIB_IO_LDBL
+ bool
+ prompt "Enable IOs on long doubles"
+ depends on LIBC_NEWLIB_IO_FLOAT
+ help
+ Enable support for IOs on long doubles.
+
+config LIBC_NEWLIB_IO_POS_ARGS
+ bool
+ prompt "Enable printf-family positional arg support"
+ help
+ Enable printf-family positional arg support.
+
+config LIBC_NEWLIB_FVWRITE_IN_STREAMIO
+ bool
+ 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_UNBUF_STREAM_OPT
+ bool
+ 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_FSEEK_OPTIMIZATION
+ bool
+ prompt "Fseek optimisation"
+ default y
+ help
+ Disabling fseek optimisation can decrease code size.
+
+config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
+ bool
+ 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_REGISTER_FINI
+ bool
+ prompt "Enable finalization function registration using atexit"
+ help
+ Enable finalization function registration using atexit.
+
+config LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC
+ bool
+ prompt "Enable dynamic allocation of atexit entries"
+ default y
+ help
+ Enable dynamic allocation of atexit entries.
+
+config LIBC_NEWLIB_GLOBAL_ATEXIT
+ bool
+ 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_LITE_EXIT
+ bool
+ 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_REENT_SMALL
+ bool
+ prompt "Enable small reentrant struct support"
+ help
+ Enable small reentrant struct support.
+
+config LIBC_NEWLIB_MULTITHREAD
+ bool
+ prompt "Enable support for multiple threads"
+ default y
+ help
+ Enable support for multiple threads.
+
+config LIBC_NEWLIB_EXTRA_SECTIONS
+ bool
+ 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_WIDE_ORIENT
+ bool
+ 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_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_LTO
+ bool
+ 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_NANO_MALLOC
+ bool
+ prompt "Enable Nano Malloc"
+ depends on NEWLIB_HAS_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.
+
+config LIBC_NEWLIB_NANO_FORMATTED_IO
+ bool
+ prompt "Enable Nano Formatted I/O"
+ depends on NEWLIB_HAS_NANO_FORMATTED_IO
+ 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"
+ default ""
+ help
+ Extra flags to pass onto ./configure when configuring the newlib.
diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2
deleted file mode 100644
index ed27e7a..0000000
--- a/config/libc/newlib.in.2
+++ /dev/null
@@ -1,190 +0,0 @@
-# newlib second-part options
-
-config LIBC_NEWLIB_TARGET_CFLAGS
- string
- prompt "Target CFLAGS 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.
-
-config LIBC_NEWLIB_IO_C99FMT
- bool
- prompt "Enable IOs on C99 formats"
- help
- Enable support for IOs on C99 formats.
-
-config LIBC_NEWLIB_IO_LL
- bool
- prompt "Enable IOs on long long"
- help
- Enable support for IOs on long long integers.
-
-config LIBC_NEWLIB_IO_FLOAT
- bool
- prompt "Enable IOs on floats and doubles"
- help
- Enable support for IOs on floating point
- values (float and double).
-
-config LIBC_NEWLIB_IO_LDBL
- bool
- prompt "Enable IOs on long doubles"
- depends on LIBC_NEWLIB_IO_FLOAT
- help
- Enable support for IOs on long doubles.
-
-config LIBC_NEWLIB_IO_POS_ARGS
- bool
- prompt "Enable printf-family positional arg support"
- help
- Enable printf-family positional arg support.
-
-config LIBC_NEWLIB_FVWRITE_IN_STREAMIO
- bool
- 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_UNBUF_STREAM_OPT
- bool
- 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_FSEEK_OPTIMIZATION
- bool
- prompt "Fseek optimisation"
- default y
- help
- Disabling fseek optimisation can decrease code size.
-
-config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
- bool
- 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_REGISTER_FINI
- bool
- prompt "Enable finalization function registration using atexit"
- help
- Enable finalization function registration using atexit.
-
-config LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC
- bool
- prompt "Enable dynamic allocation of atexit entries"
- default y
- help
- Enable dynamic allocation of atexit entries.
-
-config LIBC_NEWLIB_GLOBAL_ATEXIT
- bool
- 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_LITE_EXIT
- bool
- 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_REENT_SMALL
- bool
- prompt "Enable small reentrant struct support"
- help
- Enable small reentrant struct support.
-
-config LIBC_NEWLIB_MULTITHREAD
- bool
- prompt "Enable support for multiple threads"
- default y
- help
- Enable support for multiple threads.
-
-config LIBC_NEWLIB_EXTRA_SECTIONS
- bool
- 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_WIDE_ORIENT
- bool
- 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_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_LTO
- bool
- 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_NANO_MALLOC
- bool
- prompt "Enable Nano Malloc"
- depends on NEWLIB_HAS_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.
-
-config LIBC_NEWLIB_NANO_FORMATTED_IO
- bool
- prompt "Enable Nano Formatted I/O"
- depends on NEWLIB_HAS_NANO_FORMATTED_IO
- 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"
- default ""
- help
- Extra flags to pass onto ./configure when configuring the newlib.
diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in
index c1530b2..b384be9 100644
--- a/config/libc/uClibc.in
+++ b/config/libc/uClibc.in
@@ -110,3 +110,98 @@ config LIBC_UCLIBC_CONFIG_FILE
Path to the configuration file.
If the file is not provided, we fall back to a default config file.
+
+if THREADS_LT && !UCLIBC_MERGED_LINUXTHREADS
+
+choice
+ bool
+ prompt "Linuxthread implementation: "
+ default LIBC_UCLIBC_LNXTHRD_OLD
+
+config LIBC_UCLIBC_LNXTHRD_OLD
+ bool
+ prompt "old/stable"
+ help
+ From the uClibc config option help:
+ There are two versions of linuxthreads. The older (stable) version
+ has been in uClibc for quite a long time but hasn't seen too many
+ updates other than bugfixes.
+
+config LIBC_UCLIBC_LNXTHRD_NEW
+ bool
+ prompt "new"
+ help
+ From the uClibc config option help:
+ The new version has not been tested much, and lacks ports for arches
+ which glibc does not support (like frv, etc...), but is based on
+ the latest code from glibc, so it may be the only choice for the
+ newer ports (like alpha/amd64/64bit arches and hppa).
+
+endchoice
+
+endif # THREADS_LT
+
+config LIBC_UCLIBC_LNXTHRD
+ string
+ default "" if THREADS_NONE
+ default "" if THREADS_NATIVE
+ default "" if UCLIBC_MERGED_LINUXTHREADS
+ default "old" if LIBC_UCLIBC_LNXTHRD_OLD
+ default "new" if LIBC_UCLIBC_LNXTHRD_NEW
+
+config LIBC_UCLIBC_LOCALES
+ bool
+ select LIBC_UCLIBC_WCHAR
+ prompt "Add support for locales"
+ help
+ Say y if you want uClibc to support localisation.
+
+ Note that seems to be broken on recent uClibc releases.
+
+config LIBC_UCLIBC_IPV6
+ bool
+ prompt "Add support for IPv6"
+ help
+ Say y if you want uClibc to support IPv6.
+
+config LIBC_UCLIBC_WCHAR
+ bool
+ prompt "Add support for WCHAR"
+ help
+ Say y if you want uClibc to support WCHAR.
+
+ Maybe this is needed, if you're building a C++-Compiler
+
+config LIBC_UCLIBC_FENV
+ bool
+ prompt "Add support for fenv.h"
+ default y if ARCH_x86
+ help
+ fenv.h provides functions to control the floating point environment,
+ such as rounding mode, exceptions...
+
+ For some architectures, fenv.h is incomplete, so is not installed
+ by default. x86 is known to have a rather complete fenv.h, so it is
+ installed by default only for x86.
+
+ If you need fenv.h on other architectures, say 'y' here, but you may
+ encounter some issues.
+
+config LIBC_UCLIBC_RPC
+ bool
+ prompt "Add support for RPC"
+ help
+ Enable support for remote procedure calls (RPC) in uClibc.
+
+if ARCH_arm
+config LIBC_UCLIBC_USE_GNU_SUFFIX
+ bool
+ default y
+ prompt "Use -uclibcgnueabi suffix"
+ help
+ Depending on where the resulting toolchain will be used, you may need
+ to tweak the "system" part of the target tuple. Buildroot prefers
+ to have arm-*-linux-uclibcgnueabi; OpenEmbedded prefers
+ arm-*-linux-uclibceabi. Other tools seem to either accept both, or
+ don't care about the suffix.
+endif
diff --git a/config/libc/uClibc.in.2 b/config/libc/uClibc.in.2
deleted file mode 100644
index 2ff0d15..0000000
--- a/config/libc/uClibc.in.2
+++ /dev/null
@@ -1,96 +0,0 @@
-# uClibc second-part option
-
-if THREADS_LT && !UCLIBC_MERGED_LINUXTHREADS
-
-choice
- bool
- prompt "Linuxthread implementation: "
- default LIBC_UCLIBC_LNXTHRD_OLD
-
-config LIBC_UCLIBC_LNXTHRD_OLD
- bool
- prompt "old/stable"
- help
- From the uClibc config option help:
- There are two versions of linuxthreads. The older (stable) version
- has been in uClibc for quite a long time but hasn't seen too many
- updates other than bugfixes.
-
-config LIBC_UCLIBC_LNXTHRD_NEW
- bool
- prompt "new"
- help
- From the uClibc config option help:
- The new version has not been tested much, and lacks ports for arches
- which glibc does not support (like frv, etc...), but is based on
- the latest code from glibc, so it may be the only choice for the
- newer ports (like alpha/amd64/64bit arches and hppa).
-
-endchoice
-
-endif # THREADS_LT
-
-config LIBC_UCLIBC_LNXTHRD
- string
- default "" if THREADS_NONE
- default "" if THREADS_NATIVE
- default "" if UCLIBC_MERGED_LINUXTHREADS
- default "old" if LIBC_UCLIBC_LNXTHRD_OLD
- default "new" if LIBC_UCLIBC_LNXTHRD_NEW
-
-config LIBC_UCLIBC_LOCALES
- bool
- select LIBC_UCLIBC_WCHAR
- prompt "Add support for locales"
- help
- Say y if you want uClibc to support localisation.
-
- Note that seems to be broken on recent uClibc releases.
-
-config LIBC_UCLIBC_IPV6
- bool
- prompt "Add support for IPv6"
- help
- Say y if you want uClibc to support IPv6.
-
-config LIBC_UCLIBC_WCHAR
- bool
- prompt "Add support for WCHAR"
- help
- Say y if you want uClibc to support WCHAR.
-
- Maybe this is needed, if you're building a C++-Compiler
-
-config LIBC_UCLIBC_FENV
- bool
- prompt "Add support for fenv.h"
- default y if ARCH_x86
- help
- fenv.h provides functions to control the floating point environment,
- such as rounding mode, exceptions...
-
- For some architectures, fenv.h is incomplete, so is not installed
- by default. x86 is known to have a rather complete fenv.h, so it is
- installed by default only for x86.
-
- If you need fenv.h on other architectures, say 'y' here, but you may
- encounter some issues.
-
-config LIBC_UCLIBC_RPC
- bool
- prompt "Add support for RPC"
- help
- Enable support for remote procedure calls (RPC) in uClibc.
-
-if ARCH_arm
-config LIBC_UCLIBC_USE_GNU_SUFFIX
- bool
- default y
- prompt "Use -uclibcgnueabi suffix"
- help
- Depending on where the resulting toolchain will be used, you may need
- to tweak the "system" part of the target tuple. Buildroot prefers
- to have arm-*-linux-uclibcgnueabi; OpenEmbedded prefers
- arm-*-linux-uclibceabi. Other tools seem to either accept both, or
- don't care about the suffix.
-endif