summaryrefslogtreecommitdiff
path: root/config/libc
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-05-30 05:32:38 (GMT)
committerAlexey Neyman <stilor@att.net>2017-07-08 17:57:56 (GMT)
commit567277099a487508fd228a4c56f3583db3fa96c9 (patch)
tree19b7f40c0f6e4e6284e799dbac1098bd8805dc2d /config/libc
parent57426168ad2c7e8367786ed466c86f6aeb49b3c3 (diff)
Fix the references to old config variables
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'config/libc')
-rw-r--r--config/libc/bionic.in2
-rw-r--r--config/libc/glibc.in43
-rw-r--r--config/libc/glibc.in.286
-rw-r--r--config/libc/newlib.in8
-rw-r--r--config/libc/newlib.in.24
5 files changed, 85 insertions, 58 deletions
diff --git a/config/libc/bionic.in b/config/libc/bionic.in
index ab51e6b..6bf708b 100644
--- a/config/libc/bionic.in
+++ b/config/libc/bionic.in
@@ -3,7 +3,7 @@
## depends on ! WINDOWS && ! BARE_METAL
## depends on ARCH_arm || ARCH_mips || ARCH_x86
## depends on EXPERIMENTAL
-## depends on CC_GCC_6_or_later
+## depends on GCC_6_or_later
##
## select LIBC_SUPPORT_THREADS_POSIX
##
diff --git a/config/libc/glibc.in b/config/libc/glibc.in
index c0c633d..803ba29 100644
--- a/config/libc/glibc.in
+++ b/config/libc/glibc.in
@@ -1,9 +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?
+
## 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
##
@@ -16,39 +20,6 @@
# are still using quite ancient versions. Please do not retire versions
# (including versions in between) until the EOL dates indicated in version.desc.
source "config/versions/glibc.in"
-
-config THREADS
- default "nptl"
-
-# SPARCv8 support retired in 2.23
-config GLIBC_NO_SPARC_V8
- def_bool y
- depends on GLIBC_2_23_or_later
-
-# With 2.20, NPTL is in default glibc
-config GLIBC_HAS_NPTL_ADDON
- def_bool y
- depends on !GLIBC_2_20_or_later
-
-# With 2.20, all architectures are in main tree
-config GLIBC_HAS_PORTS_ADDON
- def_bool y
- depends on !GLIBC_2_20_or_later
-
-# With 2.17 and later, 'ports' addon is shipped in glibc tarball
-config GLIBC_PORTS_EXTERNAL
- def_bool y
- depends on !GLIBC_2_17_or_later
-
-# 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_NEEDS_PORTS
- def_bool y
- depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc
-
-# Ports are no longer an add-on starting with 2.20
-config GLIBC_USE_PORTS
- def_bool y
- depends on GLIBC_NEEDS_PORTS && GLIBC_HAS_PORTS_ADDON
-
+if GLIBC_USE_PORTS_EXTERNAL
+source "config/versions/glibc-ports.in"
+endif
diff --git a/config/libc/glibc.in.2 b/config/libc/glibc.in.2
index f1c224c..7785aca 100644
--- a/config/libc/glibc.in.2
+++ b/config/libc/glibc.in.2
@@ -1,6 +1,70 @@
# 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"
@@ -88,22 +152,6 @@ config GLIBC_FORCE_UNWIND
of glibc on some architectures
(seen on s390, s390x and x86_64).
-config GLIBC_ADDONS_LIST
- string
- prompt "Extra addons"
- default ""
- help
- Extra addons to include. Space separated list.
-
- You need to specify neither linuxthreads nor nptl, as they are added
- automagically for you depending on the threading model you chose
- earlier and on libc version selected.
-
- Also, do not specify ports even if applicable to the selected libc
- version/architecture; it is selected automatically.
-
- Eg.: libidn
-
config GLIBC_LOCALES
bool
prompt "Build and install locales"
@@ -111,7 +159,7 @@ config GLIBC_LOCALES
Whether to build and install the libc locale files for the target,
which is required in order to support internationalization.
-if LIBC_glibc && LIBC_LOCALES
+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: "
@@ -121,7 +169,7 @@ 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 && LIBC_LOCALES
+endif # LIBC_glibc && GLIBC_LOCALES
if KERNEL_linux
@@ -215,7 +263,7 @@ endchoice
config GLIBC_MIN_KERNEL
string
default "" if GLIBC_KERNEL_VERSION_NONE
- default KERNEL_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS
+ 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/newlib.in b/config/libc/newlib.in
index 5354fef..a37eca7 100644
--- a/config/libc/newlib.in
+++ b/config/libc/newlib.in
@@ -21,3 +21,11 @@ config NEWLIB_CXA_ATEXIT
def_bool y
depends on NEWLIB_2_0_or_later
select LIBC_PROVIDES_CXA_ATEXIT
+
+config NEWLIB_HAS_NANO_MALLOC
+ def_bool y
+ depends on NEWLIB_2_1_or_later
+
+config NEWLIB_HAS_NANO_FORMATTED_IO
+ def_bool y
+ depends on NEWLIB_2_2_or_later
diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2
index f73128c..ed27e7a 100644
--- a/config/libc/newlib.in.2
+++ b/config/libc/newlib.in.2
@@ -164,7 +164,7 @@ config LIBC_NEWLIB_LTO
config LIBC_NEWLIB_NANO_MALLOC
bool
prompt "Enable Nano Malloc"
- depends on LIBC_NEWLIB_2_1_or_later
+ 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
@@ -175,7 +175,7 @@ config LIBC_NEWLIB_NANO_MALLOC
config LIBC_NEWLIB_NANO_FORMATTED_IO
bool
prompt "Enable Nano Formatted I/O"
- depends on LIBC_NEWLIB_2_2_or_later
+ 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