config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jan 31 19:52:18 2011 +0100 (2011-01-31)
changeset 2289 165eff2a1e10
parent 2181 a797ad9c7bd5
child 2312 8b9938edd3d8
permissions -rw-r--r--
libc/glibc: add option to force unwind

We make it an option, as not all combinations of architectures
vs. compiler vs. glibc/eglibc exhibit the issue. Mostly visible
on old glibc versions, it seems...

This is a missing part from the glibc/eglibc merger... :-/

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
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@1337
     7
# This list must be carefully in sync with the architectures names
yann@1337
     8
# we can find in config/arch/*
yann@1337
     9
yann@1315
    10
config ARCH_arm
yann@1315
    11
    select LIBC_GLIBC_USE_PORTS
yann@1315
    12
yann@1315
    13
config ARCH_mips
yann@1315
    14
    select LIBC_GLIBC_USE_PORTS
yann@1315
    15
yann@1337
    16
# End of arch-specific ports auto-select
yann@1337
    17
yann@922
    18
comment "glibc/eglibc common options"
yann@922
    19
yann@922
    20
config LIBC_GLIBC_EXTRA_CONFIG
yann@922
    21
    string
yann@922
    22
    prompt "extra config"
yann@922
    23
    default ""
yann@922
    24
    help
yann@922
    25
      Extra flags to pass onto ./configure when configuring.
yann@922
    26
yann@922
    27
      Eg.: --enable-static-nss
yann@922
    28
yann@1232
    29
config LIBC_GLIBC_CONFIGPARMS
yann@1232
    30
    string
yann@1232
    31
    prompt "Extra config params (READ HELP)"
yann@1232
    32
    default "" if ! ARCH_sh
yann@1232
    33
    default "no-z-defs=yes" if ARCH_sh
yann@1232
    34
    help
yann@1232
    35
      Some architectures need to set options in the file configparms.
yann@1232
    36
      This is the case for sh3/4, which really need to set configparms
yann@1232
    37
      to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
yann@1232
    38
      
yann@1232
    39
      Unless you are building a toolchain for sh3/4, you should leave that empty.
yann@1232
    40
      
yann@1627
    41
      Note: If you need to pass more than one value, separate them with
yann@1627
    42
            '\n'. Eg.:  var1=val1\nvar2=val2
yann@1232
    43
yann@922
    44
config LIBC_GLIBC_EXTRA_CFLAGS
yann@922
    45
    string
yann@922
    46
    prompt "extra target CFLAGS"
yann@922
    47
    default ""
yann@922
    48
    help
yann@922
    49
      Extra target CFLAGS to use when building.
yann@922
    50
yann@922
    51
config LIBC_EXTRA_CC_ARGS
yann@922
    52
    string
yann@922
    53
    prompt "gcc extra flags"
yann@922
    54
    default ""
yann@922
    55
    help
yann@922
    56
      Extra flags to pass gcc when building.
yann@922
    57
yann@922
    58
      Seldom used, except for sparc64 which seems to need the flag -64
yann@922
    59
      to be passed onto gcc.
yann@922
    60
bryanhundven@2180
    61
config LIBC_DISABLE_VERSIONING
bryanhundven@2180
    62
    bool
bryanhundven@2180
    63
    prompt "Disable symbols versioning"
bryanhundven@2180
    64
    default n
bryanhundven@2180
    65
    help
bryanhundven@2180
    66
      Do not include versioning information in the library objects.
bryanhundven@2180
    67
bryanhundven@2181
    68
config LIBC_OLDEST_ABI
bryanhundven@2181
    69
    string
bryanhundven@2181
    70
    prompt "Oldest supported ABI"
bryanhundven@2181
    71
    default ""
bryanhundven@2181
    72
    help
bryanhundven@2181
    73
      Set the oldest ABI supported by the C library.
bryanhundven@2181
    74
      
bryanhundven@2181
    75
      Setting this option, for example, to 2.2 will provide ABI support
bryanhundven@2181
    76
      back to (e)glibc-2.2.
bryanhundven@2181
    77
bryanhundven@2181
    78
      If this option is not set, (e)glibc will choose for you.
bryanhundven@2181
    79
yann@2289
    80
config LIBC_GLIBC_FORCE_UNWIND
yann@2289
    81
    bool
yann@2289
    82
    prompt "Force unwind support (READ HELP!)"
yann@2289
    83
    default n
yann@2289
    84
    help
yann@2289
    85
      If your toolchain fails building while building the C library
yann@2289
    86
      start files, or the complete C library, with a message like:
yann@2289
    87
        configure: error: forced unwind support is required
yann@2289
    88
      
yann@2289
    89
      then you may try setting this to 'y'. Otherwise, leave it to 'n'.
yann@2289
    90
      
yann@2289
    91
      The issue seems to be related to building NPTL on old versions
yann@2289
    92
      of glibc (and possibly eglibc as well) on some architectures
yann@2289
    93
      (seen on s390, s390x and x86_64).
yann@2289
    94
yann@922
    95
config LIBC_GLIBC_USE_PORTS
yann@922
    96
    bool
yann@922
    97
    prompt "Use the ports addon"
yann@922
    98
    default n
yann@922
    99
    help
yann@922
   100
      The ports addon contains some architecture ports that are not available
yann@922
   101
      in the official distribution.
yann@922
   102
yann@1315
   103
      For example, this is the case for ARM with glibc-2.4 and above.
yann@922
   104
yann@922
   105
      Say n only if you're sure that your architecture is in the official
yann@922
   106
      distribution for your chosen version.
yann@922
   107
yann@922
   108
config LIBC_ADDONS_LIST
yann@922
   109
    string
yann@922
   110
    prompt "Extra addons"
yann@922
   111
    default ""
yann@922
   112
    help
yann@922
   113
      Extra addons to include. Space separated list.
yann@922
   114
yann@922
   115
      You need to specify neither linuxthreads nor nptl, as they are added
yann@922
   116
      automagically for you depending on the threading model you choosed
yann@922
   117
      earlier.
yann@922
   118
yann@922
   119
      Eg.: crypt        (for very old libces)
yann@922
   120
yann@1759
   121
if LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" )
yann@1759
   122
comment "WARNING !!!                                            "
yann@1759
   123
comment "|  For glibc >= 2.8, it can happen that the tarballs    "
yann@1759
   124
comment "|  for the addons are not available for download.       "
yann@1759
   125
comment "|  If that happens, bad luck... Try a previous version  "
yann@1759
   126
comment "|  or try again later... :-(                            "
yann@1314
   127
endif
yann@1314
   128
yann@922
   129
if KERNEL_linux
yann@922
   130
yann@922
   131
choice
yann@922
   132
    bool
yann@922
   133
    prompt "Minimum supported kernel version"
yann@922
   134
    default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
yann@922
   135
yann@922
   136
config LIBC_GLIBC_KERNEL_VERSION_NONE
yann@922
   137
    bool
yann@922
   138
    prompt "Let ./configure decide"
yann@922
   139
    help
yann@922
   140
      Let ./configure decide what minimum kernel version glibc/eglibc
yann@922
   141
      will be able to run against.
yann@922
   142
      
yann@922
   143
      This will inclde legacy compatibility code for older kernels in
yann@922
   144
      the C library, thus ensuring that it will run on a large number
yann@922
   145
      of old kernels.
yann@922
   146
      
yann@922
   147
      The minimum kernel version supported will be dependent upon the
yann@922
   148
      target you build for. For example:
yann@922
   149
        alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
yann@922
   150
        sh[34]-*-linux-gnu      Requires Linux 2.6.11
yann@922
   151
        powerpc*                Requires Linux 2.4.19
yann@922
   152
        arm*-*-linux-*gnueabi   Requires Linux 2.6.16
yann@922
   153
yann@922
   154
config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
yann@922
   155
    bool
yann@922
   156
    prompt "Same as kernel headers (default)"
yann@922
   157
    help
yann@922
   158
      Normaly, you'll want glibc/eglibc to run against the same kernel
yann@922
   159
      version as the one used for the headers.
yann@922
   160
      
yann@922
   161
      This is the default.
yann@922
   162
      
yann@922
   163
      If enabled, crosstool-ng will use the chosen version of kernel
yann@922
   164
      headers for the glibc minimum kernel version supported, which is
yann@922
   165
      what gets passed to "--enable-kernel=" when configuring glibc.
yann@922
   166
      
yann@922
   167
      Enabling this will ensure that no legacy compatibility code for
yann@922
   168
      older kernels is built into your C libraries, but it will
yann@922
   169
      be unable to run on kernel versions older than whichever kernel
yann@922
   170
      headers version you've built the toolchain for.
yann@922
   171
      
yann@922
   172
      If you know for sure that your toolchain will never need to build
yann@922
   173
      applications that will run under a kernel version older than your
yann@922
   174
      chosen kernel headers version (CT_KERNEL_VERSION), you can choose
yann@922
   175
      "y" here.
yann@922
   176
yann@922
   177
config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
yann@922
   178
    bool
yann@922
   179
    prompt "Specific kernel version"
yann@922
   180
    help
yann@922
   181
      Specify the earliest Linux kernel version you want glibc to
yann@922
   182
      include support for.  This does not have to match the kernel
yann@922
   183
      headers version used for your toolchain.  This controls what is
yann@922
   184
      passed to the "--enable-kernel=" option to the glibc configure
yann@922
   185
      script.
yann@922
   186
yann@922
   187
      If you want to be able to statically link programs with your
yann@922
   188
      toolchain's C library, make sure this kernel version is lower than
yann@922
   189
      all kernels you wish to support to avoid "FATAL: kernel too old"
yann@922
   190
      errors.  The higher the version you specify, the less legacy code
yann@922
   191
      will be built into libc.
yann@922
   192
yann@922
   193
      Most people can leave this at the default value of "2.6.9".
yann@922
   194
yann@922
   195
if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
yann@922
   196
yann@922
   197
config LIBC_GLIBC_MIN_KERNEL_VERSION
yann@922
   198
    string
yann@922
   199
    prompt "Minimum kernel version to support"
yann@922
   200
    default "2.6.9"
yann@922
   201
    help
yann@922
   202
      Enter here the lowest kernel version glibc/eglibc will be able to
yann@922
   203
      run against.
yann@922
   204
      
yann@922
   205
      The minimum kernel version supported will be dependent upon the
yann@922
   206
      target you build for. For example:
yann@922
   207
        alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
yann@922
   208
        sh[34]-*-linux-gnu      Requires Linux 2.6.11
yann@922
   209
        powerpc*                Requires Linux 2.4.19
yann@922
   210
        arm*-*-linux-*gnueabi   Requires Linux 2.6.16
yann@922
   211
      
yann@922
   212
      Note that no sanity check is performed by crosstool-NG to ensure
yann@922
   213
      that the value you enter here is appropriate for your target.
yann@922
   214
yann@922
   215
endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
yann@922
   216
yann@922
   217
endchoice
yann@922
   218
yann@922
   219
config LIBC_GLIBC_MIN_KERNEL
yann@922
   220
    string
yann@922
   221
    default ""                            if LIBC_GLIBC_KERNEL_VERSION_NONE
yann@922
   222
    default KERNEL_VERSION                if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
yann@1211
   223
    default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
yann@922
   224
yann@922
   225
endif # KERNEL_linux
yann@1178
   226
yann@1178
   227
endif # LIBC_glibc || LIBC_eglibc