config/libc/uClibc.in.2
author Bryan Hundven <bryanhundven@gmail.com>
Sun Jun 26 03:26:54 2011 -0700 (2011-06-26)
changeset 2515 364b06df9e3a
parent 2039 c5a2e4ee7fb8
child 3276 22239d19ad65
permissions -rw-r--r--
glibc: Refactor startfiles/headers into do_libc_backend()

Refactor the contents of 'do_libc_start_files()' and 'do_libc()' into a
parameterized 'do_libc_backend()'. 'do_libc_start_files()' and 'do_libc()'
call 'do_libc_backend()' with either 'libc_mode=startfiles' or
'libc_mode=final' (respectively) so that the startfiles/headers and
the final libc builds are configured and built with the same options.

One example of where this is needed is when building a mips toolchain.
Previously, if you were building an n32 toolchain, you wouldn't have
noticed an issue, because if '-mabi' is not in CFLAGS, n32 is the
default:

http://sourceware.org/git/?p=glibc-ports.git;a=blob;f=sysdeps/mips/preconfigure;hb=HEAD

But when trying to build an o32 or n64 toolchain the build would
have failed. This is because (e)glibc expects "-mabi={o32,n32,n64}" to be
in CFLAGS, but was not previously provided in 'do_libc_start_files()'.
The build failure would happen in the shared-core gcc when it tries to
configure an n64 or o32 gcc with an n32 libc.

A simpler solution would have been to just add TARGET_CFLAGS to configure
in 'do_libc_start_files()', but this way makes configure and make
consistent for both steps.

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