config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Apr 05 01:04:31 2011 +0200 (2011-04-05)
changeset 2377 32c08de1d54f
parent 2312 8b9938edd3d8
child 2444 896cb0d36c1a
permissions -rw-r--r--
libc/glibc-common: force use of the BFD linker

gold can not build glibc/eglibc, force use of the BFD
linker during the toolchain build.

Reported-by: Bill Pringlemeir <bpringle@sympatico.ca>
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 # Force using the BFD linker during the toolchain build
     7 config LIBC_glibc_familly
     8     bool
     9     default y
    10     select BINUTILS_FORCE_LD_BFD
    11 
    12 # Some architectures require the ports addon. List them one by one here:
    13 # This list must be carefully in sync with the architectures names
    14 # we can find in config/arch/*
    15 
    16 config ARCH_arm
    17     select LIBC_GLIBC_USE_PORTS
    18 
    19 config ARCH_mips
    20     select LIBC_GLIBC_USE_PORTS
    21 
    22 # End of arch-specific ports auto-select
    23 
    24 comment "glibc/eglibc common options"
    25 
    26 config LIBC_GLIBC_EXTRA_CONFIG
    27     string
    28     prompt "extra config"
    29     default ""
    30     help
    31       Extra flags to pass onto ./configure when configuring.
    32 
    33       Eg.: --enable-static-nss
    34 
    35 config LIBC_GLIBC_CONFIGPARMS
    36     string
    37     prompt "Extra config params (READ HELP)"
    38     default "" if ! ARCH_sh
    39     default "no-z-defs=yes" if ARCH_sh
    40     help
    41       Some architectures need to set options in the file configparms.
    42       This is the case for sh3/4, which really need to set configparms
    43       to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
    44       
    45       Unless you are building a toolchain for sh3/4, you should leave that empty.
    46       
    47       Note: If you need to pass more than one value, separate them with
    48             '\n'. Eg.:  var1=val1\nvar2=val2
    49 
    50 config LIBC_GLIBC_EXTRA_CFLAGS
    51     string
    52     prompt "extra target CFLAGS"
    53     default ""
    54     help
    55       Extra target CFLAGS to use when building.
    56 
    57 config LIBC_EXTRA_CC_ARGS
    58     string
    59     prompt "gcc extra flags"
    60     default ""
    61     help
    62       Extra flags to pass gcc when building.
    63 
    64       Seldom used, except for sparc64 which seems to need the flag -64
    65       to be passed onto gcc.
    66 
    67 config LIBC_ENABLE_FORTIFIED_BUILD
    68     bool
    69     prompt "Enable fortified build (EXPERIMENTAL)"
    70     depends on EXPERIMENTAL
    71     default n
    72     help
    73       If you say 'y' here, then glibc will be using fortified versions
    74       of functions with format arguments (eg. vsyslog, printf...), and
    75       do a sanity check on the format at runtime, to avoid some of the
    76       common format string attacks.
    77       
    78       This is currently not supported, and will most probably result in
    79       a broken build, with an error message like:
    80         ../misc/syslog.c: In function '__vsyslog_chk':
    81         ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
    82         call to 'syslog': function body not available
    83       
    84       If you are brave enough and want to debug the issue, then say 'y'
    85       here. Otherwise, be still and say 'n' (the default). ;-)
    86 
    87 
    88 config LIBC_DISABLE_VERSIONING
    89     bool
    90     prompt "Disable symbols versioning"
    91     default n
    92     help
    93       Do not include versioning information in the library objects.
    94 
    95 config LIBC_OLDEST_ABI
    96     string
    97     prompt "Oldest supported ABI"
    98     default ""
    99     help
   100       Set the oldest ABI supported by the C library.
   101       
   102       Setting this option, for example, to 2.2 will provide ABI support
   103       back to (e)glibc-2.2.
   104 
   105       If this option is not set, (e)glibc will choose for you.
   106 
   107 config LIBC_GLIBC_FORCE_UNWIND
   108     bool
   109     prompt "Force unwind support (READ HELP!)"
   110     default n
   111     help
   112       If your toolchain fails building while building the C library
   113       start files, or the complete C library, with a message like:
   114         configure: error: forced unwind support is required
   115       
   116       then you may try setting this to 'y'. Otherwise, leave it to 'n'.
   117       
   118       The issue seems to be related to building NPTL on old versions
   119       of glibc (and possibly eglibc as well) on some architectures
   120       (seen on s390, s390x and x86_64).
   121 
   122 config LIBC_GLIBC_USE_PORTS
   123     bool
   124     prompt "Use the ports addon"
   125     default n
   126     help
   127       The ports addon contains some architecture ports that are not available
   128       in the official distribution.
   129 
   130       For example, this is the case for ARM with glibc-2.4 and above.
   131 
   132       Say n only if you're sure that your architecture is in the official
   133       distribution for your chosen version.
   134 
   135 config LIBC_ADDONS_LIST
   136     string
   137     prompt "Extra addons"
   138     default ""
   139     help
   140       Extra addons to include. Space separated list.
   141 
   142       You need to specify neither linuxthreads nor nptl, as they are added
   143       automagically for you depending on the threading model you choosed
   144       earlier.
   145 
   146       Eg.: crypt        (for very old libces)
   147 
   148 if LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" )
   149 comment "WARNING !!!                                            "
   150 comment "|  For glibc >= 2.8, it can happen that the tarballs    "
   151 comment "|  for the addons are not available for download.       "
   152 comment "|  If that happens, bad luck... Try a previous version  "
   153 comment "|  or try again later... :-(                            "
   154 endif
   155 
   156 if KERNEL_linux
   157 
   158 choice
   159     bool
   160     prompt "Minimum supported kernel version"
   161     default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   162 
   163 config LIBC_GLIBC_KERNEL_VERSION_NONE
   164     bool
   165     prompt "Let ./configure decide"
   166     help
   167       Let ./configure decide what minimum kernel version glibc/eglibc
   168       will be able to run against.
   169       
   170       This will inclde legacy compatibility code for older kernels in
   171       the C library, thus ensuring that it will run on a large number
   172       of old kernels.
   173       
   174       The minimum kernel version supported will be dependent upon the
   175       target you build for. For example:
   176         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   177         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   178         powerpc*                Requires Linux 2.4.19
   179         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   180 
   181 config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   182     bool
   183     prompt "Same as kernel headers (default)"
   184     help
   185       Normaly, you'll want glibc/eglibc to run against the same kernel
   186       version as the one used for the headers.
   187       
   188       This is the default.
   189       
   190       If enabled, crosstool-ng will use the chosen version of kernel
   191       headers for the glibc minimum kernel version supported, which is
   192       what gets passed to "--enable-kernel=" when configuring glibc.
   193       
   194       Enabling this will ensure that no legacy compatibility code for
   195       older kernels is built into your C libraries, but it will
   196       be unable to run on kernel versions older than whichever kernel
   197       headers version you've built the toolchain for.
   198       
   199       If you know for sure that your toolchain will never need to build
   200       applications that will run under a kernel version older than your
   201       chosen kernel headers version (CT_KERNEL_VERSION), you can choose
   202       "y" here.
   203 
   204 config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   205     bool
   206     prompt "Specific kernel version"
   207     help
   208       Specify the earliest Linux kernel version you want glibc to
   209       include support for.  This does not have to match the kernel
   210       headers version used for your toolchain.  This controls what is
   211       passed to the "--enable-kernel=" option to the glibc configure
   212       script.
   213 
   214       If you want to be able to statically link programs with your
   215       toolchain's C library, make sure this kernel version is lower than
   216       all kernels you wish to support to avoid "FATAL: kernel too old"
   217       errors.  The higher the version you specify, the less legacy code
   218       will be built into libc.
   219 
   220       Most people can leave this at the default value of "2.6.9".
   221 
   222 if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   223 
   224 config LIBC_GLIBC_MIN_KERNEL_VERSION
   225     string
   226     prompt "Minimum kernel version to support"
   227     default "2.6.9"
   228     help
   229       Enter here the lowest kernel version glibc/eglibc will be able to
   230       run against.
   231       
   232       The minimum kernel version supported will be dependent upon the
   233       target you build for. For example:
   234         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   235         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   236         powerpc*                Requires Linux 2.4.19
   237         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   238       
   239       Note that no sanity check is performed by crosstool-NG to ensure
   240       that the value you enter here is appropriate for your target.
   241 
   242 endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   243 
   244 endchoice
   245 
   246 config LIBC_GLIBC_MIN_KERNEL
   247     string
   248     default ""                            if LIBC_GLIBC_KERNEL_VERSION_NONE
   249     default KERNEL_VERSION                if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   250     default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   251 
   252 endif # KERNEL_linux
   253 
   254 endif # LIBC_glibc || LIBC_eglibc