config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Feb 17 17:06:04 2009 +0000 (2009-02-17)
changeset 1211 5dc29dbd1523
parent 1178 41a84f7d3b4f
child 1232 80c5723e06fc
permissions -rw-r--r--
Fix using minimum kernel version for glibc/eglibc.
Spotted by "Kim B. Heino" <Kim.Heino@bluegiga.com>.

/trunk/config/libc/glibc-eglibc.in-common | 2 1 1 0 +-
1 file changed, 1 insertion(+), 1 deletion(-)
     1 # This file contains the common configuration options
     2 # that apply to both glibc and eglibc.
     3 
     4 if LIBC_glibc || LIBC_eglibc
     5 
     6 comment "glibc/eglibc common options"
     7 
     8 config LIBC_GLIBC_EXTRA_CONFIG
     9     string
    10     prompt "extra config"
    11     default ""
    12     help
    13       Extra flags to pass onto ./configure when configuring.
    14 
    15       Eg.: --enable-static-nss
    16 
    17 config LIBC_GLIBC_EXTRA_CFLAGS
    18     string
    19     prompt "extra target CFLAGS"
    20     default ""
    21     help
    22       Extra target CFLAGS to use when building.
    23 
    24 config LIBC_EXTRA_CC_ARGS
    25     string
    26     prompt "gcc extra flags"
    27     default ""
    28     help
    29       Extra flags to pass gcc when building.
    30 
    31       Seldom used, except for sparc64 which seems to need the flag -64
    32       to be passed onto gcc.
    33 
    34 config LIBC_GLIBC_USE_PORTS
    35     bool
    36     prompt "Use the ports addon"
    37     default n
    38     help
    39       The ports addon contains some architecture ports that are not available
    40       in the official distribution.
    41 
    42       For example, this is the case for ARM with for 2.4 and above.
    43 
    44       Say n only if you're sure that your architecture is in the official
    45       distribution for your chosen version.
    46 
    47 config LIBC_ADDONS_LIST
    48     string
    49     prompt "Extra addons"
    50     default ""
    51     help
    52       Extra addons to include. Space separated list.
    53 
    54       You need to specify neither linuxthreads nor nptl, as they are added
    55       automagically for you depending on the threading model you choosed
    56       earlier.
    57 
    58       Eg.: crypt        (for very old libces)
    59 
    60 if KERNEL_linux
    61 
    62 choice
    63     bool
    64     prompt "Minimum supported kernel version"
    65     default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
    66 
    67 config LIBC_GLIBC_KERNEL_VERSION_NONE
    68     bool
    69     prompt "Let ./configure decide"
    70     help
    71       Let ./configure decide what minimum kernel version glibc/eglibc
    72       will be able to run against.
    73       
    74       This will inclde legacy compatibility code for older kernels in
    75       the C library, thus ensuring that it will run on a large number
    76       of old kernels.
    77       
    78       The minimum kernel version supported will be dependent upon the
    79       target you build for. For example:
    80         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
    81         sh[34]-*-linux-gnu      Requires Linux 2.6.11
    82         powerpc*                Requires Linux 2.4.19
    83         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
    84 
    85 config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
    86     bool
    87     prompt "Same as kernel headers (default)"
    88     help
    89       Normaly, you'll want glibc/eglibc to run against the same kernel
    90       version as the one used for the headers.
    91       
    92       This is the default.
    93       
    94       If enabled, crosstool-ng will use the chosen version of kernel
    95       headers for the glibc minimum kernel version supported, which is
    96       what gets passed to "--enable-kernel=" when configuring glibc.
    97       
    98       Enabling this will ensure that no legacy compatibility code for
    99       older kernels is built into your C libraries, but it will
   100       be unable to run on kernel versions older than whichever kernel
   101       headers version you've built the toolchain for.
   102       
   103       If you know for sure that your toolchain will never need to build
   104       applications that will run under a kernel version older than your
   105       chosen kernel headers version (CT_KERNEL_VERSION), you can choose
   106       "y" here.
   107 
   108 config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   109     bool
   110     prompt "Specific kernel version"
   111     help
   112       Specify the earliest Linux kernel version you want glibc to
   113       include support for.  This does not have to match the kernel
   114       headers version used for your toolchain.  This controls what is
   115       passed to the "--enable-kernel=" option to the glibc configure
   116       script.
   117 
   118       If you want to be able to statically link programs with your
   119       toolchain's C library, make sure this kernel version is lower than
   120       all kernels you wish to support to avoid "FATAL: kernel too old"
   121       errors.  The higher the version you specify, the less legacy code
   122       will be built into libc.
   123 
   124       Most people can leave this at the default value of "2.6.9".
   125 
   126 if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   127 
   128 config LIBC_GLIBC_MIN_KERNEL_VERSION
   129     string
   130     prompt "Minimum kernel version to support"
   131     default "2.6.9"
   132     help
   133       Enter here the lowest kernel version glibc/eglibc will be able to
   134       run against.
   135       
   136       The minimum kernel version supported will be dependent upon the
   137       target you build for. For example:
   138         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   139         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   140         powerpc*                Requires Linux 2.4.19
   141         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   142       
   143       Note that no sanity check is performed by crosstool-NG to ensure
   144       that the value you enter here is appropriate for your target.
   145 
   146 endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   147 
   148 endchoice
   149 
   150 config LIBC_GLIBC_MIN_KERNEL
   151     string
   152     default ""                            if LIBC_GLIBC_KERNEL_VERSION_NONE
   153     default KERNEL_VERSION                if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   154     default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   155 
   156 endif # KERNEL_linux
   157 
   158 endif # LIBC_glibc || LIBC_eglibc