config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Mar 05 17:50:42 2009 +0000 (2009-03-05)
changeset 1232 80c5723e06fc
parent 1211 5dc29dbd1523
child 1314 34d1b285c5db
child 1366 5e5d1e6f55d3
permissions -rw-r--r--
Re-instate the glibc/eglibc config option LIBC_GLIBC_CONFIGPARMS for use by SuperH.
Set appropriate defaults depending on target.

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