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