config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sun Nov 11 21:42:47 2012 +0100 (2012-11-11)
branch1.16
changeset 3107 91a52bc04af9
parent 2618 041d0cf137c4
child 3251 ec603d1371b9
permissions -rw-r--r--
1.16: close branch

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