config/libc/glibc-eglibc.in-common
author Bryan Hundven <bryanhundven@gmail.com>
Thu Nov 11 00:29:53 2010 +0100 (2010-11-11)
changeset 2180 d3af3efce68c
parent 1759 2e4f5f564362
child 2181 a797ad9c7bd5
permissions -rw-r--r--
libc/*glibc: add option to disable symbols versioning

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