config/libc/glibc-eglibc-common.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Sep 14 18:09:36 2008 +0000 (2008-09-14)
changeset 852 c17bb66e2aa5
parent 810 5d357e239b62
child 861 5506fbbad59b
permissions -rw-r--r--
Enhance setting the minimum kernel version glibc will run against.
Ideally, eglibc should also benefit for that, but the current code does not set it.

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