config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon May 09 20:15:39 2011 +0200 (2011-05-09)
changeset 2453 3f3774e7e3b4
parent 2444 896cb0d36c1a
child 2467 200836977ce6
permissions -rw-r--r--
libc/glibc: use the multi-inclusion capability of the new kconfig

Now that kconfig can include a file multiple times, link the glibc/eglibc
common stuff to two .in.2 files.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.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
    20     string
    21     prompt "extra config"
    22     default ""
    23     help
    24       Extra flags to pass onto ./configure when configuring.
    25 
    26       Eg.: --enable-static-nss
    27 
    28 config LIBC_GLIBC_CONFIGPARMS
    29     string
    30     prompt "Extra config params (READ HELP)"
    31     default "" if ! ARCH_sh
    32     default "no-z-defs=yes" if ARCH_sh
    33     help
    34       Some architectures need to set options in the file configparms.
    35       This is the case for sh3/4, which really need to set configparms
    36       to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
    37       
    38       Unless you are building a toolchain for sh3/4, you should leave that empty.
    39       
    40       Note: If you need to pass more than one value, separate them with
    41             '\n'. Eg.:  var1=val1\nvar2=val2
    42 
    43 config LIBC_GLIBC_EXTRA_CFLAGS
    44     string
    45     prompt "extra target CFLAGS"
    46     default ""
    47     help
    48       Extra target CFLAGS to use when building.
    49 
    50 config LIBC_EXTRA_CC_ARGS
    51     string
    52     prompt "gcc extra flags"
    53     default ""
    54     help
    55       Extra flags to pass gcc when building.
    56 
    57       Seldom used, except for sparc64 which seems to need the flag -64
    58       to be passed onto gcc.
    59 
    60 config LIBC_ENABLE_FORTIFIED_BUILD
    61     bool
    62     prompt "Enable fortified build (EXPERIMENTAL)"
    63     depends on EXPERIMENTAL
    64     default n
    65     help
    66       If you say 'y' here, then glibc will be using fortified versions
    67       of functions with format arguments (eg. vsyslog, printf...), and
    68       do a sanity check on the format at runtime, to avoid some of the
    69       common format string attacks.
    70       
    71       This is currently not supported, and will most probably result in
    72       a broken build, with an error message like:
    73         ../misc/syslog.c: In function '__vsyslog_chk':
    74         ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
    75         call to 'syslog': function body not available
    76       
    77       If you are brave enough and want to debug the issue, then say 'y'
    78       here. Otherwise, be still and say 'n' (the default). ;-)
    79 
    80 
    81 config LIBC_DISABLE_VERSIONING
    82     bool
    83     prompt "Disable symbols versioning"
    84     default n
    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 n
   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 setting this to 'y'. Otherwise, leave it to 'n'.
   110       
   111       The issue seems to be related to building NPTL on old versions
   112       of glibc (and possibly eglibc as well) on some architectures
   113       (seen on s390, s390x and x86_64).
   114 
   115 config LIBC_GLIBC_USE_PORTS
   116     bool
   117     prompt "Use the ports addon"
   118     default n
   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 choosed
   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 if KERNEL_linux
   150 
   151 choice LIBC_GLIBC_SUPPORTED_KERNEL
   152     bool
   153     prompt "Minimum supported kernel version"
   154     default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   155 
   156 config LIBC_GLIBC_KERNEL_VERSION_NONE
   157     bool
   158     prompt "Let ./configure decide"
   159     help
   160       Let ./configure decide what minimum kernel version glibc/eglibc
   161       will be able to run against.
   162       
   163       This will inclde legacy compatibility code for older kernels in
   164       the C library, thus ensuring that it will run on a large number
   165       of old kernels.
   166       
   167       The minimum kernel version supported will be dependent upon the
   168       target you build for. For example:
   169         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   170         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   171         powerpc*                Requires Linux 2.4.19
   172         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   173 
   174 config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   175     bool
   176     prompt "Same as kernel headers (default)"
   177     help
   178       Normaly, you'll want glibc/eglibc to run against the same kernel
   179       version as the one used for the headers.
   180       
   181       This is the default.
   182       
   183       If enabled, crosstool-ng will use the chosen version of kernel
   184       headers for the glibc minimum kernel version supported, which is
   185       what gets passed to "--enable-kernel=" when configuring glibc.
   186       
   187       Enabling this will ensure that no legacy compatibility code for
   188       older kernels is built into your C libraries, but it will
   189       be unable to run on kernel versions older than whichever kernel
   190       headers version you've built the toolchain for.
   191       
   192       If you know for sure that your toolchain will never need to build
   193       applications that will run under a kernel version older than your
   194       chosen kernel headers version (CT_KERNEL_VERSION), you can choose
   195       "y" here.
   196 
   197 config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   198     bool
   199     prompt "Specific kernel version"
   200     help
   201       Specify the earliest Linux kernel version you want glibc to
   202       include support for.  This does not have to match the kernel
   203       headers version used for your toolchain.  This controls what is
   204       passed to the "--enable-kernel=" option to the glibc configure
   205       script.
   206 
   207       If you want to be able to statically link programs with your
   208       toolchain's C library, make sure this kernel version is lower than
   209       all kernels you wish to support to avoid "FATAL: kernel too old"
   210       errors.  The higher the version you specify, the less legacy code
   211       will be built into libc.
   212 
   213       Most people can leave this at the default value of "2.6.9".
   214 
   215 if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   216 
   217 config LIBC_GLIBC_MIN_KERNEL_VERSION
   218     string
   219     prompt "Minimum kernel version to support"
   220     default "2.6.9"
   221     help
   222       Enter here the lowest kernel version glibc/eglibc will be able to
   223       run against.
   224       
   225       The minimum kernel version supported will be dependent upon the
   226       target you build for. For example:
   227         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   228         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   229         powerpc*                Requires Linux 2.4.19
   230         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   231       
   232       Note that no sanity check is performed by crosstool-NG to ensure
   233       that the value you enter here is appropriate for your target.
   234 
   235 endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   236 
   237 endchoice
   238 
   239 config LIBC_GLIBC_MIN_KERNEL
   240     string
   241     default ""                            if LIBC_GLIBC_KERNEL_VERSION_NONE
   242     default KERNEL_VERSION                if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   243     default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   244 
   245 endif # KERNEL_linux