config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jan 31 11:29:50 2009 +0000 (2009-01-31)
changeset 1178 41a84f7d3b4f
parent 1110 c404a78bd790
child 1211 5dc29dbd1523
permissions -rw-r--r--
Add infrastructure to use common config files for generated config files.

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