config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat May 02 22:21:53 2009 +0000 (2009-05-02)
changeset 1315 655ee0516997
parent 1314 34d1b285c5db
child 1337 7f742f73c2d1
permissions -rw-r--r--
For glibc & eglibc, try to auto-select the ports addon for those
architectures that require it (curently, ARM and MIPS are known to).

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