config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 08 19:02:44 2011 +0200 (2011-05-08)
changeset 2444 896cb0d36c1a
parent 2377 32c08de1d54f
child 2453 3f3774e7e3b4
permissions -rw-r--r--
config: fix recursive deps

The latest kconfig stuff is more stringent when it comes to validating
the dependency of the symbols. It is no longer possible to have a symbol
depend on itself (such as our construct for arch/cc/libc/... was doing).

Fix our generated-file infrastructure to avoid these situations when the
new kconfig stuff will be merged (in a following changeset).

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