config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jan 31 19:52:18 2011 +0100 (2011-01-31)
changeset 2289 165eff2a1e10
parent 2181 a797ad9c7bd5
child 2312 8b9938edd3d8
permissions -rw-r--r--
libc/glibc: add option to force unwind

We make it an option, as not all combinations of architectures
vs. compiler vs. glibc/eglibc exhibit the issue. Mostly visible
on old glibc versions, it seems...

This is a missing part from the glibc/eglibc merger... :-/

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_DISABLE_VERSIONING
    62     bool
    63     prompt "Disable symbols versioning"
    64     default n
    65     help
    66       Do not include versioning information in the library objects.
    67 
    68 config LIBC_OLDEST_ABI
    69     string
    70     prompt "Oldest supported ABI"
    71     default ""
    72     help
    73       Set the oldest ABI supported by the C library.
    74       
    75       Setting this option, for example, to 2.2 will provide ABI support
    76       back to (e)glibc-2.2.
    77 
    78       If this option is not set, (e)glibc will choose for you.
    79 
    80 config LIBC_GLIBC_FORCE_UNWIND
    81     bool
    82     prompt "Force unwind support (READ HELP!)"
    83     default n
    84     help
    85       If your toolchain fails building while building the C library
    86       start files, or the complete C library, with a message like:
    87         configure: error: forced unwind support is required
    88       
    89       then you may try setting this to 'y'. Otherwise, leave it to 'n'.
    90       
    91       The issue seems to be related to building NPTL on old versions
    92       of glibc (and possibly eglibc as well) on some architectures
    93       (seen on s390, s390x and x86_64).
    94 
    95 config LIBC_GLIBC_USE_PORTS
    96     bool
    97     prompt "Use the ports addon"
    98     default n
    99     help
   100       The ports addon contains some architecture ports that are not available
   101       in the official distribution.
   102 
   103       For example, this is the case for ARM with glibc-2.4 and above.
   104 
   105       Say n only if you're sure that your architecture is in the official
   106       distribution for your chosen version.
   107 
   108 config LIBC_ADDONS_LIST
   109     string
   110     prompt "Extra addons"
   111     default ""
   112     help
   113       Extra addons to include. Space separated list.
   114 
   115       You need to specify neither linuxthreads nor nptl, as they are added
   116       automagically for you depending on the threading model you choosed
   117       earlier.
   118 
   119       Eg.: crypt        (for very old libces)
   120 
   121 if LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" )
   122 comment "WARNING !!!                                            "
   123 comment "|  For glibc >= 2.8, it can happen that the tarballs    "
   124 comment "|  for the addons are not available for download.       "
   125 comment "|  If that happens, bad luck... Try a previous version  "
   126 comment "|  or try again later... :-(                            "
   127 endif
   128 
   129 if KERNEL_linux
   130 
   131 choice
   132     bool
   133     prompt "Minimum supported kernel version"
   134     default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   135 
   136 config LIBC_GLIBC_KERNEL_VERSION_NONE
   137     bool
   138     prompt "Let ./configure decide"
   139     help
   140       Let ./configure decide what minimum kernel version glibc/eglibc
   141       will be able to run against.
   142       
   143       This will inclde legacy compatibility code for older kernels in
   144       the C library, thus ensuring that it will run on a large number
   145       of old kernels.
   146       
   147       The minimum kernel version supported will be dependent upon the
   148       target you build for. For example:
   149         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   150         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   151         powerpc*                Requires Linux 2.4.19
   152         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   153 
   154 config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   155     bool
   156     prompt "Same as kernel headers (default)"
   157     help
   158       Normaly, you'll want glibc/eglibc to run against the same kernel
   159       version as the one used for the headers.
   160       
   161       This is the default.
   162       
   163       If enabled, crosstool-ng will use the chosen version of kernel
   164       headers for the glibc minimum kernel version supported, which is
   165       what gets passed to "--enable-kernel=" when configuring glibc.
   166       
   167       Enabling this will ensure that no legacy compatibility code for
   168       older kernels is built into your C libraries, but it will
   169       be unable to run on kernel versions older than whichever kernel
   170       headers version you've built the toolchain for.
   171       
   172       If you know for sure that your toolchain will never need to build
   173       applications that will run under a kernel version older than your
   174       chosen kernel headers version (CT_KERNEL_VERSION), you can choose
   175       "y" here.
   176 
   177 config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   178     bool
   179     prompt "Specific kernel version"
   180     help
   181       Specify the earliest Linux kernel version you want glibc to
   182       include support for.  This does not have to match the kernel
   183       headers version used for your toolchain.  This controls what is
   184       passed to the "--enable-kernel=" option to the glibc configure
   185       script.
   186 
   187       If you want to be able to statically link programs with your
   188       toolchain's C library, make sure this kernel version is lower than
   189       all kernels you wish to support to avoid "FATAL: kernel too old"
   190       errors.  The higher the version you specify, the less legacy code
   191       will be built into libc.
   192 
   193       Most people can leave this at the default value of "2.6.9".
   194 
   195 if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   196 
   197 config LIBC_GLIBC_MIN_KERNEL_VERSION
   198     string
   199     prompt "Minimum kernel version to support"
   200     default "2.6.9"
   201     help
   202       Enter here the lowest kernel version glibc/eglibc will be able to
   203       run against.
   204       
   205       The minimum kernel version supported will be dependent upon the
   206       target you build for. For example:
   207         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   208         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   209         powerpc*                Requires Linux 2.4.19
   210         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   211       
   212       Note that no sanity check is performed by crosstool-NG to ensure
   213       that the value you enter here is appropriate for your target.
   214 
   215 endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   216 
   217 endchoice
   218 
   219 config LIBC_GLIBC_MIN_KERNEL
   220     string
   221     default ""                            if LIBC_GLIBC_KERNEL_VERSION_NONE
   222     default KERNEL_VERSION                if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   223     default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   224 
   225 endif # KERNEL_linux
   226 
   227 endif # LIBC_glibc || LIBC_eglibc