config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jan 23 18:41:59 2010 +0100 (2010-01-23)
changeset 1748 54bbdbf316f3
parent 1337 7f742f73c2d1
child 1759 2e4f5f564362
permissions -rw-r--r--
libc/uclibc: use CT_ARCH, in place of CT_KERNEL_ARCH

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