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