config/libc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jun 08 23:26:54 2010 +0200 (2010-06-08)
changeset 1976 2d90ec981ba3
parent 1870 a4c4e51aa541
child 2016 46366b11da3d
permissions -rw-r--r--
config: add support for a second part of the generated choices

Some components have configuration options that can depend on
generic options, so they should go below those.

uClibc for example:
- has its own options (wchar...)
- uses the generic options (threads...)
- if linuxthreads chosen, offers two impls

So we need to be able to split the components options in 2,
one part that is above the generic options, and one part that
ends up below the generic options.
yann@1
     1
# C library options
yann@1
     2
yann@1585
     3
menu "C-library"
yann@1585
     4
yann@850
     5
config LIBC
yann@850
     6
    string
yann@850
     7
yann@852
     8
config LIBC_VERSION
yann@852
     9
    string
yann@852
    10
    help
yann@852
    11
      Enter the date of the snapshot you want to use in the form: YYYYMMDD
yann@852
    12
      where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit
yann@852
    13
      day in the month.
yann@852
    14
      
yann@852
    15
      Please note:
yann@852
    16
      - glibc has snapshots done every monday, and only the last ten are kept.
yann@852
    17
      - uClibc has daily snapshots, and only the last 30-or-so are kept.
yann@852
    18
      
yann@852
    19
      So if you want to be able to re-build your toolchain later, you will
yann@852
    20
      have to save your C library tarball by yourself.
yann@852
    21
yann@1870
    22
source "config.gen/libc.in"
yann@1
    23
yann@95
    24
config LIBC_SUPPORT_NPTL
yann@95
    25
    bool
yann@95
    26
    default n
yann@95
    27
yann@95
    28
config LIBC_SUPPORT_LINUXTHREADS
yann@95
    29
    bool
yann@95
    30
    default n
yann@95
    31
yann@852
    32
config THREADS
yann@852
    33
    string
yann@852
    34
    default "nptl"          if THREADS_NPTL
yann@852
    35
    default "linuxthreads"  if THREADS_LINUXTHREADS
yann@1591
    36
    default "none"          if THREADS_NONE || LIBC_none
yann@1591
    37
#                              No C library, no threads!
yann@1591
    38
yann@1591
    39
if ! LIBC_none
yann@1591
    40
yann@1591
    41
comment "Common C library options"
yann@852
    42
yann@802
    43
choice
yann@802
    44
    bool
yann@802
    45
    prompt "Threading implementation to use:"
yann@802
    46
    default THREADS_NPTL           if LIBC_SUPPORT_NPTL
yann@802
    47
    default THREADS_LINUXTHREADS   if LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
yann@802
    48
    default THREADS_NONE           if ! LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
yann@1
    49
yann@802
    50
config THREADS_NPTL
yann@802
    51
    bool
yann@802
    52
    prompt "nptl"
yann@802
    53
    depends on LIBC_SUPPORT_NPTL
yann@787
    54
yann@802
    55
config THREADS_LINUXTHREADS
yann@802
    56
    bool
yann@802
    57
    prompt "linuxthreads"
yann@802
    58
    depends on LIBC_SUPPORT_LINUXTHREADS
yann@802
    59
yann@802
    60
config THREADS_NONE
yann@802
    61
    bool
yann@802
    62
    prompt "none"
yann@802
    63
yann@802
    64
endchoice
yann@802
    65
yann@1976
    66
source "config.gen/libc.in.2"
yann@1976
    67
yann@1591
    68
endif # ! LIBC_none
yann@1591
    69
yann@1
    70
endmenu