config/libc/glibc-eglibc.in-common
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Wed May 25 20:23:48 2011 +0200 (2011-05-25)
changeset 2476 7690196856ce
parent 2467 200836977ce6
child 2484 d1a8c2ae7946
permissions -rw-r--r--
debug/gdb: fix runtime sysroot

This patch sets the runtime sysroot to fix the following GDB warning:
"Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code."

The sysroot can later be changed within gdb with the `set sysroot`
command if necessary.

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