config/libc/uClibc.in.2
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Thu Jul 28 22:09:31 2011 +0200 (2011-07-28)
changeset 2573 424fa2092ace
parent 2039 c5a2e4ee7fb8
child 3276 22239d19ad65
permissions -rw-r--r--
scripts/libc: do not build add-ons by default

Currently, no --enable-add-ons option is passed to libc configure when
"$(do_libc_add_ons_list ,)" is empty, which makes configure automatically search
for present add-ons. In that case, all present add-ons are built, although
no add-on was selected by the user in the config. Moreover, this can make the
configure fail if some non-standard add-ons like eglibc-localedef are present.

This behavior also leads to an inconsistency from a user point of view between
the following cases:
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS="none" in the config,
which makes "$(do_libc_add_ons_list ,)" return "", so all present add-ons
are built.
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS!="none" in the
config, which makes "$(do_libc_add_ons_list ,)" return the add-on supporting
the chosen threading implementation, e.g. "nptl", so only this add-on is
built.

This patch disables the building of all add-ons in that case.

It is still possible to build all present add-ons by adding --enable-add-ons to
LIBC_GLIBC_EXTRA_CONFIG_ARRAY.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
     1 # uClibc second-part option
     2 
     3 if THREADS_LINUXTHREADS
     4 
     5 choice
     6     bool
     7     prompt "Linuxthread implementation: "
     8     default LIBC_UCLIBC_LNXTHRD_OLD
     9 
    10 config LIBC_UCLIBC_LNXTHRD_OLD
    11     bool
    12     prompt "old/stable"
    13     help
    14       From the uClibc config option help:
    15         There are two versions of linuxthreads.  The older (stable) version
    16         has been in uClibc for quite a long time but hasn't seen too many
    17         updates other than bugfixes.
    18 
    19 config LIBC_UCLIBC_LNXTHRD_NEW
    20     bool
    21     prompt "new"
    22     help
    23       From the uClibc config option help:
    24         The new version has not been tested much, and lacks ports for arches
    25         which glibc does not support (like bfin/frv/etc...), but is based on
    26         the latest code from glibc, so it may be the only choice for the
    27         newer ports (like alpha/amd64/64bit arches and hppa).
    28 
    29 endchoice
    30 
    31 endif # THREADS_LINUXTHREADS
    32 
    33 config LIBC_UCLIBC_LNXTHRD
    34     string
    35     default ""      if THREADS_NONE
    36     default ""      if THREADS_NPTL
    37     default "old"   if LIBC_UCLIBC_LNXTHRD_OLD
    38     default "new"   if LIBC_UCLIBC_LNXTHRD_NEW
    39 
    40 config LIBC_UCLIBC_LOCALES
    41     bool
    42     select LIBC_UCLIBC_WCHAR
    43     prompt "Add support for locales"
    44     help
    45       Say y if you want uClibc to support localisation.
    46 
    47       Note that seems to be broken on recent uClibc releases.
    48 
    49 config LIBC_UCLIBC_LOCALES_PREGEN_DATA
    50     bool
    51     prompt "Use pregen locales"
    52     depends on LIBC_UCLIBC_LOCALES
    53     default y
    54     help
    55       If you see issues with using pre-generated locales data,
    56       you can try switching this off.
    57 
    58       If so, please report the issue, so we can default this
    59       to off if too many people complain.
    60 
    61 config LIBC_UCLIBC_WCHAR
    62     bool
    63     prompt "Add support for WCHAR"
    64     help
    65       Say y if you want uClibc to support WCHAR.
    66 
    67       Maybe this is needed, if you're building a C++-Compiler