config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat May 02 22:21:53 2009 +0000 (2009-05-02)
changeset 1315 655ee0516997
parent 1314 34d1b285c5db
child 1337 7f742f73c2d1
permissions -rw-r--r--
For glibc & eglibc, try to auto-select the ports addon for those
architectures that require it (curently, ARM and MIPS are known to).

-------- diffstat follows --------
/trunk/config/libc/glibc-eglibc.in-common | 9 8 1 0 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
     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 config ARCH_arm
     8     select LIBC_GLIBC_USE_PORTS
     9 
    10 config ARCH_mips
    11     select LIBC_GLIBC_USE_PORTS
    12 
    13 comment "glibc/eglibc common options"
    14 
    15 config LIBC_GLIBC_EXTRA_CONFIG
    16     string
    17     prompt "extra config"
    18     default ""
    19     help
    20       Extra flags to pass onto ./configure when configuring.
    21 
    22       Eg.: --enable-static-nss
    23 
    24 config LIBC_GLIBC_CONFIGPARMS
    25     string
    26     prompt "Extra config params (READ HELP)"
    27     default "" if ! ARCH_sh
    28     default "no-z-defs=yes" if ARCH_sh
    29     help
    30       Some architectures need to set options in the file configparms.
    31       This is the case for sh3/4, which really need to set configparms
    32       to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
    33       
    34       Unless you are building a toolchain for sh3/4, you should leave that empty.
    35       
    36       Note: this is awkward, and doesn't work well if you need more than one
    37             line in configparms
    38 
    39 config LIBC_GLIBC_EXTRA_CFLAGS
    40     string
    41     prompt "extra target CFLAGS"
    42     default ""
    43     help
    44       Extra target CFLAGS to use when building.
    45 
    46 config LIBC_EXTRA_CC_ARGS
    47     string
    48     prompt "gcc extra flags"
    49     default ""
    50     help
    51       Extra flags to pass gcc when building.
    52 
    53       Seldom used, except for sparc64 which seems to need the flag -64
    54       to be passed onto gcc.
    55 
    56 config LIBC_GLIBC_USE_PORTS
    57     bool
    58     prompt "Use the ports addon"
    59     default n
    60     help
    61       The ports addon contains some architecture ports that are not available
    62       in the official distribution.
    63 
    64       For example, this is the case for ARM with glibc-2.4 and above.
    65 
    66       Say n only if you're sure that your architecture is in the official
    67       distribution for your chosen version.
    68 
    69 config LIBC_ADDONS_LIST
    70     string
    71     prompt "Extra addons"
    72     default ""
    73     help
    74       Extra addons to include. Space separated list.
    75 
    76       You need to specify neither linuxthreads nor nptl, as they are added
    77       automagically for you depending on the threading model you choosed
    78       earlier.
    79 
    80       Eg.: crypt        (for very old libces)
    81 
    82 if LIBC_GLIBC_2_8_or_later && ( LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" ) )
    83 comment "WARNING!!!"
    84 comment "For glibc >= 2.8, addons are only available via a CVS checkout."
    85 comment "Be sure to review the associated options, above."
    86 endif
    87 
    88 if KERNEL_linux
    89 
    90 choice
    91     bool
    92     prompt "Minimum supported kernel version"
    93     default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
    94 
    95 config LIBC_GLIBC_KERNEL_VERSION_NONE
    96     bool
    97     prompt "Let ./configure decide"
    98     help
    99       Let ./configure decide what minimum kernel version glibc/eglibc
   100       will be able to run against.
   101       
   102       This will inclde legacy compatibility code for older kernels in
   103       the C library, thus ensuring that it will run on a large number
   104       of old kernels.
   105       
   106       The minimum kernel version supported will be dependent upon the
   107       target you build for. For example:
   108         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   109         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   110         powerpc*                Requires Linux 2.4.19
   111         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   112 
   113 config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   114     bool
   115     prompt "Same as kernel headers (default)"
   116     help
   117       Normaly, you'll want glibc/eglibc to run against the same kernel
   118       version as the one used for the headers.
   119       
   120       This is the default.
   121       
   122       If enabled, crosstool-ng will use the chosen version of kernel
   123       headers for the glibc minimum kernel version supported, which is
   124       what gets passed to "--enable-kernel=" when configuring glibc.
   125       
   126       Enabling this will ensure that no legacy compatibility code for
   127       older kernels is built into your C libraries, but it will
   128       be unable to run on kernel versions older than whichever kernel
   129       headers version you've built the toolchain for.
   130       
   131       If you know for sure that your toolchain will never need to build
   132       applications that will run under a kernel version older than your
   133       chosen kernel headers version (CT_KERNEL_VERSION), you can choose
   134       "y" here.
   135 
   136 config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   137     bool
   138     prompt "Specific kernel version"
   139     help
   140       Specify the earliest Linux kernel version you want glibc to
   141       include support for.  This does not have to match the kernel
   142       headers version used for your toolchain.  This controls what is
   143       passed to the "--enable-kernel=" option to the glibc configure
   144       script.
   145 
   146       If you want to be able to statically link programs with your
   147       toolchain's C library, make sure this kernel version is lower than
   148       all kernels you wish to support to avoid "FATAL: kernel too old"
   149       errors.  The higher the version you specify, the less legacy code
   150       will be built into libc.
   151 
   152       Most people can leave this at the default value of "2.6.9".
   153 
   154 if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   155 
   156 config LIBC_GLIBC_MIN_KERNEL_VERSION
   157     string
   158     prompt "Minimum kernel version to support"
   159     default "2.6.9"
   160     help
   161       Enter here the lowest kernel version glibc/eglibc will be able to
   162       run against.
   163       
   164       The minimum kernel version supported will be dependent upon the
   165       target you build for. For example:
   166         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   167         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   168         powerpc*                Requires Linux 2.4.19
   169         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   170       
   171       Note that no sanity check is performed by crosstool-NG to ensure
   172       that the value you enter here is appropriate for your target.
   173 
   174 endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   175 
   176 endchoice
   177 
   178 config LIBC_GLIBC_MIN_KERNEL
   179     string
   180     default ""                            if LIBC_GLIBC_KERNEL_VERSION_NONE
   181     default KERNEL_VERSION                if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   182     default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   183 
   184 endif # KERNEL_linux
   185 
   186 endif # LIBC_glibc || LIBC_eglibc