config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Mar 03 23:29:07 2011 +0100 (2011-03-03)
changeset 2333 cd7bcbbd5cc9
parent 2289 165eff2a1e10
child 2377 32c08de1d54f
permissions -rw-r--r--
binutils/binutils: use log level CFG for ./configure

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