config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sun May 11 13:38:12 2014 +0200 (2014-05-11)
changeset 3313 ad14212ebf54
parent 2693 c2b14d2fa5f3
permissions -rw-r--r--
config: switch cc with libc in the config order

Some of the compiler options depend on the C library choice, (e.g.
whether core passes are needed).

Since the compiler menu comes before the C library menu, those options
may or may not be visible until the C library is chosen, leading to
either options being visible by the user (thus be puzzling as they would
not apply to his case), or invisible to him (yet again puzzling him).

Invert the order of the compiler and the C library in the menuconfig. It
anyway looks more rational, in the end.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.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@2444
     4
# Some architectures require the ports addon. List them one by one here:
yann@2444
     5
# This list must be carefully in sync with the architectures names
yann@2444
     6
# we can find in config/arch/*
netzimme@3251
     7
netzimme@3251
     8
config LIBC_GLIBC_PORTS_EXTERNAL
netzimme@3251
     9
    bool
netzimme@3251
    10
    default n
netzimme@3251
    11
yann@2444
    12
config LIBC_GLIBC_MAY_FORCE_PORTS
yann@2444
    13
    bool
yann@2444
    14
    default y if ARCH_arm
yann@2444
    15
    default y if ARCH_mips
yann@2444
    16
    select LIBC_GLIBC_USE_PORTS
yann@2444
    17
yann@2377
    18
# Force using the BFD linker during the toolchain build
yann@2377
    19
config LIBC_glibc_familly
yann@2377
    20
    bool
yann@2377
    21
    default y
yann@2377
    22
    select BINUTILS_FORCE_LD_BFD
yann@2377
    23
yann@2467
    24
config LIBC_GLIBC_EXTRA_CONFIG_ARRAY
yann@922
    25
    string
yann@922
    26
    prompt "extra config"
yann@922
    27
    default ""
yann@922
    28
    help
yann@922
    29
      Extra flags to pass onto ./configure when configuring.
yann@922
    30
yann@2469
    31
      You can enter multiple arguments here, and arguments can contain spaces
yann@2469
    32
      if they are properly quoted (or escaped, but prefer quotes). Eg.:
yann@2469
    33
          --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
yann@922
    34
yann@1232
    35
config LIBC_GLIBC_CONFIGPARMS
yann@1232
    36
    string
yann@1232
    37
    prompt "Extra config params (READ HELP)"
yann@1232
    38
    default "" if ! ARCH_sh
yann@1232
    39
    default "no-z-defs=yes" if ARCH_sh
yann@1232
    40
    help
yann@1232
    41
      Some architectures need to set options in the file configparms.
yann@1232
    42
      This is the case for sh3/4, which really need to set configparms
yann@1232
    43
      to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
yann@1232
    44
      
yann@1232
    45
      Unless you are building a toolchain for sh3/4, you should leave that empty.
yann@1232
    46
      
yann@1627
    47
      Note: If you need to pass more than one value, separate them with
yann@1627
    48
            '\n'. Eg.:  var1=val1\nvar2=val2
yann@1232
    49
yann@922
    50
config LIBC_GLIBC_EXTRA_CFLAGS
yann@922
    51
    string
yann@922
    52
    prompt "extra target CFLAGS"
yann@922
    53
    default ""
yann@922
    54
    help
yann@922
    55
      Extra target CFLAGS to use when building.
yann@922
    56
yann@922
    57
config LIBC_EXTRA_CC_ARGS
yann@922
    58
    string
yann@922
    59
    prompt "gcc extra flags"
yann@922
    60
    default ""
yann@922
    61
    help
yann@922
    62
      Extra flags to pass gcc when building.
yann@922
    63
yann@922
    64
      Seldom used, except for sparc64 which seems to need the flag -64
yann@922
    65
      to be passed onto gcc.
yann@922
    66
yann@2312
    67
config LIBC_ENABLE_FORTIFIED_BUILD
yann@2312
    68
    bool
yann@2312
    69
    prompt "Enable fortified build (EXPERIMENTAL)"
yann@2312
    70
    depends on EXPERIMENTAL
yann@2312
    71
    help
yann@2312
    72
      If you say 'y' here, then glibc will be using fortified versions
yann@2312
    73
      of functions with format arguments (eg. vsyslog, printf...), and
yann@2312
    74
      do a sanity check on the format at runtime, to avoid some of the
yann@2312
    75
      common format string attacks.
yann@2312
    76
      
yann@2312
    77
      This is currently not supported, and will most probably result in
yann@2312
    78
      a broken build, with an error message like:
yann@2312
    79
        ../misc/syslog.c: In function '__vsyslog_chk':
yann@2312
    80
        ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
yann@2312
    81
        call to 'syslog': function body not available
yann@2312
    82
      
yann@2312
    83
      If you are brave enough and want to debug the issue, then say 'y'
yann@2312
    84
      here. Otherwise, be still and say 'n' (the default). ;-)
yann@2312
    85
yann@2312
    86
bryanhundven@2180
    87
config LIBC_DISABLE_VERSIONING
bryanhundven@2180
    88
    bool
bryanhundven@2180
    89
    prompt "Disable symbols versioning"
bryanhundven@2180
    90
    help
bryanhundven@2180
    91
      Do not include versioning information in the library objects.
bryanhundven@2180
    92
bryanhundven@2181
    93
config LIBC_OLDEST_ABI
bryanhundven@2181
    94
    string
bryanhundven@2181
    95
    prompt "Oldest supported ABI"
bryanhundven@2181
    96
    default ""
bryanhundven@2181
    97
    help
bryanhundven@2181
    98
      Set the oldest ABI supported by the C library.
bryanhundven@2181
    99
      
bryanhundven@2181
   100
      Setting this option, for example, to 2.2 will provide ABI support
bryanhundven@2181
   101
      back to (e)glibc-2.2.
bryanhundven@2181
   102
bryanhundven@2181
   103
      If this option is not set, (e)glibc will choose for you.
bryanhundven@2181
   104
yann@2289
   105
config LIBC_GLIBC_FORCE_UNWIND
yann@2289
   106
    bool
yann@2289
   107
    prompt "Force unwind support (READ HELP!)"
yann@2618
   108
    default y
yann@2289
   109
    help
yann@2289
   110
      If your toolchain fails building while building the C library
yann@2289
   111
      start files, or the complete C library, with a message like:
yann@2289
   112
        configure: error: forced unwind support is required
yann@2289
   113
      
michael@2693
   114
      then you may try changing this option. Otherwise, leave it to
yann@2618
   115
      the default 'y'.
yann@2289
   116
      
yann@2289
   117
      The issue seems to be related to building NPTL on old versions
yann@2289
   118
      of glibc (and possibly eglibc as well) on some architectures
yann@2289
   119
      (seen on s390, s390x and x86_64).
yann@2289
   120
yann@922
   121
config LIBC_GLIBC_USE_PORTS
yann@922
   122
    bool
yann@922
   123
    prompt "Use the ports addon"
yann@922
   124
    help
yann@922
   125
      The ports addon contains some architecture ports that are not available
yann@922
   126
      in the official distribution.
yann@922
   127
yann@1315
   128
      For example, this is the case for ARM with glibc-2.4 and above.
yann@922
   129
yann@922
   130
      Say n only if you're sure that your architecture is in the official
yann@922
   131
      distribution for your chosen version.
yann@922
   132
yann@922
   133
config LIBC_ADDONS_LIST
yann@922
   134
    string
yann@922
   135
    prompt "Extra addons"
yann@922
   136
    default ""
yann@922
   137
    help
yann@922
   138
      Extra addons to include. Space separated list.
yann@922
   139
yann@922
   140
      You need to specify neither linuxthreads nor nptl, as they are added
michael@2693
   141
      automagically for you depending on the threading model you chose
yann@922
   142
      earlier.
yann@922
   143
yann@922
   144
      Eg.: crypt        (for very old libces)
yann@922
   145
yann@1759
   146
if LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" )
yann@1759
   147
comment "WARNING !!!                                            "
yann@1759
   148
comment "|  For glibc >= 2.8, it can happen that the tarballs    "
yann@1759
   149
comment "|  for the addons are not available for download.       "
yann@1759
   150
comment "|  If that happens, bad luck... Try a previous version  "
yann@1759
   151
comment "|  or try again later... :-(                            "
yann@1314
   152
endif
yann@1314
   153
benoit@2585
   154
config LIBC_LOCALES
benoit@2585
   155
    bool
benoit@2585
   156
    prompt "Build and install locales"
benoit@2585
   157
    help
benoit@2585
   158
      Whether to build and install the libc locale files for the target,
benoit@2585
   159
      which is required in order to support internationalization.
benoit@2585
   160
benoit@2587
   161
if LIBC_glibc && LIBC_LOCALES
benoit@2587
   162
comment "WARNING!                                                     "
benoit@2587
   163
comment "|  The built locales will be usable if and only if the build  "
benoit@2587
   164
comment "|  machine and the target:                                    "
benoit@2587
   165
comment "|   - have the same endianness,                               "
benoit@2587
   166
comment "|   - and have the same alignment requirements for uint32_t.  "
benoit@2587
   167
comment "|  You will have to check by yourself (for now).              "
benoit@2587
   168
endif # LIBC_glibc && LIBC_LOCALES
benoit@2587
   169
yann@922
   170
if KERNEL_linux
yann@922
   171
yann@2453
   172
choice LIBC_GLIBC_SUPPORTED_KERNEL
yann@922
   173
    bool
yann@922
   174
    prompt "Minimum supported kernel version"
yann@922
   175
    default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
yann@922
   176
yann@922
   177
config LIBC_GLIBC_KERNEL_VERSION_NONE
yann@922
   178
    bool
yann@922
   179
    prompt "Let ./configure decide"
yann@922
   180
    help
yann@922
   181
      Let ./configure decide what minimum kernel version glibc/eglibc
yann@922
   182
      will be able to run against.
yann@922
   183
      
antony@2564
   184
      This will include legacy compatibility code for older kernels in
yann@922
   185
      the C library, thus ensuring that it will run on a large number
yann@922
   186
      of old kernels.
yann@922
   187
      
yann@922
   188
      The minimum kernel version supported will be dependent upon the
yann@922
   189
      target you build for. For example:
yann@922
   190
        alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
yann@922
   191
        sh[34]-*-linux-gnu      Requires Linux 2.6.11
yann@922
   192
        powerpc*                Requires Linux 2.4.19
yann@922
   193
        arm*-*-linux-*gnueabi   Requires Linux 2.6.16
yann@922
   194
yann@922
   195
config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
yann@922
   196
    bool
yann@922
   197
    prompt "Same as kernel headers (default)"
yann@922
   198
    help
antony@2564
   199
      Normally, you'll want glibc/eglibc to run against the same kernel
yann@922
   200
      version as the one used for the headers.
yann@922
   201
      
yann@922
   202
      This is the default.
yann@922
   203
      
yann@922
   204
      If enabled, crosstool-ng will use the chosen version of kernel
yann@922
   205
      headers for the glibc minimum kernel version supported, which is
yann@922
   206
      what gets passed to "--enable-kernel=" when configuring glibc.
yann@922
   207
      
yann@922
   208
      Enabling this will ensure that no legacy compatibility code for
yann@922
   209
      older kernels is built into your C libraries, but it will
yann@922
   210
      be unable to run on kernel versions older than whichever kernel
yann@922
   211
      headers version you've built the toolchain for.
yann@922
   212
      
yann@922
   213
      If you know for sure that your toolchain will never need to build
yann@922
   214
      applications that will run under a kernel version older than your
yann@922
   215
      chosen kernel headers version (CT_KERNEL_VERSION), you can choose
yann@922
   216
      "y" here.
yann@922
   217
yann@922
   218
config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
yann@922
   219
    bool
yann@922
   220
    prompt "Specific kernel version"
yann@922
   221
    help
yann@922
   222
      Specify the earliest Linux kernel version you want glibc to
yann@922
   223
      include support for.  This does not have to match the kernel
yann@922
   224
      headers version used for your toolchain.  This controls what is
yann@922
   225
      passed to the "--enable-kernel=" option to the glibc configure
yann@922
   226
      script.
yann@922
   227
yann@922
   228
      If you want to be able to statically link programs with your
yann@922
   229
      toolchain's C library, make sure this kernel version is lower than
yann@922
   230
      all kernels you wish to support to avoid "FATAL: kernel too old"
yann@922
   231
      errors.  The higher the version you specify, the less legacy code
yann@922
   232
      will be built into libc.
yann@922
   233
yann@922
   234
      Most people can leave this at the default value of "2.6.9".
yann@922
   235
yann@922
   236
if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
yann@922
   237
yann@922
   238
config LIBC_GLIBC_MIN_KERNEL_VERSION
yann@922
   239
    string
yann@922
   240
    prompt "Minimum kernel version to support"
yann@922
   241
    default "2.6.9"
yann@922
   242
    help
yann@922
   243
      Enter here the lowest kernel version glibc/eglibc will be able to
yann@922
   244
      run against.
yann@922
   245
      
yann@922
   246
      The minimum kernel version supported will be dependent upon the
yann@922
   247
      target you build for. For example:
yann@922
   248
        alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
yann@922
   249
        sh[34]-*-linux-gnu      Requires Linux 2.6.11
yann@922
   250
        powerpc*                Requires Linux 2.4.19
yann@922
   251
        arm*-*-linux-*gnueabi   Requires Linux 2.6.16
yann@922
   252
      
yann@922
   253
      Note that no sanity check is performed by crosstool-NG to ensure
yann@922
   254
      that the value you enter here is appropriate for your target.
yann@922
   255
yann@922
   256
endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
yann@922
   257
yann@922
   258
endchoice
yann@922
   259
yann@922
   260
config LIBC_GLIBC_MIN_KERNEL
yann@922
   261
    string
yann@922
   262
    default ""                            if LIBC_GLIBC_KERNEL_VERSION_NONE
yann@922
   263
    default KERNEL_VERSION                if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
yann@1211
   264
    default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
yann@922
   265
yann@922
   266
endif # KERNEL_linux