config/libc/glibc-eglibc.in-common
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Wed Jun 25 23:33:01 2014 +0200 (2014-06-25)
changeset 3325 069f43a215cc
parent 2693 c2b14d2fa5f3
permissions -rw-r--r--
all: fix wildcard to work with make-4.x

In make-3.8x, the $(wildacrd) function would sort the entries,
while in make-4.x, it would just return the entries in any
unpredictable order [*]

Use the $(sort) function to get reproducible behaviour.

[*] Well, most probably the roder the entries appear when read
from readdir()

Reported-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
     1 # This file contains the common configuration options
     2 # that apply to both glibc and eglibc.
     3 
     4 # Some architectures require the ports addon. List them one by one here:
     5 # This list must be carefully in sync with the architectures names
     6 # we can find in config/arch/*
     7 
     8 config LIBC_GLIBC_PORTS_EXTERNAL
     9     bool
    10     default n
    11 
    12 config LIBC_GLIBC_MAY_FORCE_PORTS
    13     bool
    14     default y if ARCH_arm
    15     default y if ARCH_mips
    16     select LIBC_GLIBC_USE_PORTS
    17 
    18 # Force using the BFD linker during the toolchain build
    19 config LIBC_glibc_familly
    20     bool
    21     default y
    22     select BINUTILS_FORCE_LD_BFD
    23 
    24 config LIBC_GLIBC_EXTRA_CONFIG_ARRAY
    25     string
    26     prompt "extra config"
    27     default ""
    28     help
    29       Extra flags to pass onto ./configure when configuring.
    30 
    31       You can enter multiple arguments here, and arguments can contain spaces
    32       if they are properly quoted (or escaped, but prefer quotes). Eg.:
    33           --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
    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     help
    72       If you say 'y' here, then glibc will be using fortified versions
    73       of functions with format arguments (eg. vsyslog, printf...), and
    74       do a sanity check on the format at runtime, to avoid some of the
    75       common format string attacks.
    76       
    77       This is currently not supported, and will most probably result in
    78       a broken build, with an error message like:
    79         ../misc/syslog.c: In function '__vsyslog_chk':
    80         ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
    81         call to 'syslog': function body not available
    82       
    83       If you are brave enough and want to debug the issue, then say 'y'
    84       here. Otherwise, be still and say 'n' (the default). ;-)
    85 
    86 
    87 config LIBC_DISABLE_VERSIONING
    88     bool
    89     prompt "Disable symbols versioning"
    90     help
    91       Do not include versioning information in the library objects.
    92 
    93 config LIBC_OLDEST_ABI
    94     string
    95     prompt "Oldest supported ABI"
    96     default ""
    97     help
    98       Set the oldest ABI supported by the C library.
    99       
   100       Setting this option, for example, to 2.2 will provide ABI support
   101       back to (e)glibc-2.2.
   102 
   103       If this option is not set, (e)glibc will choose for you.
   104 
   105 config LIBC_GLIBC_FORCE_UNWIND
   106     bool
   107     prompt "Force unwind support (READ HELP!)"
   108     default y
   109     help
   110       If your toolchain fails building while building the C library
   111       start files, or the complete C library, with a message like:
   112         configure: error: forced unwind support is required
   113       
   114       then you may try changing this option. Otherwise, leave it to
   115       the default 'y'.
   116       
   117       The issue seems to be related to building NPTL on old versions
   118       of glibc (and possibly eglibc as well) on some architectures
   119       (seen on s390, s390x and x86_64).
   120 
   121 config LIBC_GLIBC_USE_PORTS
   122     bool
   123     prompt "Use the ports addon"
   124     help
   125       The ports addon contains some architecture ports that are not available
   126       in the official distribution.
   127 
   128       For example, this is the case for ARM with glibc-2.4 and above.
   129 
   130       Say n only if you're sure that your architecture is in the official
   131       distribution for your chosen version.
   132 
   133 config LIBC_ADDONS_LIST
   134     string
   135     prompt "Extra addons"
   136     default ""
   137     help
   138       Extra addons to include. Space separated list.
   139 
   140       You need to specify neither linuxthreads nor nptl, as they are added
   141       automagically for you depending on the threading model you chose
   142       earlier.
   143 
   144       Eg.: crypt        (for very old libces)
   145 
   146 if LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" )
   147 comment "WARNING !!!                                            "
   148 comment "|  For glibc >= 2.8, it can happen that the tarballs    "
   149 comment "|  for the addons are not available for download.       "
   150 comment "|  If that happens, bad luck... Try a previous version  "
   151 comment "|  or try again later... :-(                            "
   152 endif
   153 
   154 config LIBC_LOCALES
   155     bool
   156     prompt "Build and install locales"
   157     help
   158       Whether to build and install the libc locale files for the target,
   159       which is required in order to support internationalization.
   160 
   161 if LIBC_glibc && LIBC_LOCALES
   162 comment "WARNING!                                                     "
   163 comment "|  The built locales will be usable if and only if the build  "
   164 comment "|  machine and the target:                                    "
   165 comment "|   - have the same endianness,                               "
   166 comment "|   - and have the same alignment requirements for uint32_t.  "
   167 comment "|  You will have to check by yourself (for now).              "
   168 endif # LIBC_glibc && LIBC_LOCALES
   169 
   170 if KERNEL_linux
   171 
   172 choice LIBC_GLIBC_SUPPORTED_KERNEL
   173     bool
   174     prompt "Minimum supported kernel version"
   175     default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   176 
   177 config LIBC_GLIBC_KERNEL_VERSION_NONE
   178     bool
   179     prompt "Let ./configure decide"
   180     help
   181       Let ./configure decide what minimum kernel version glibc/eglibc
   182       will be able to run against.
   183       
   184       This will include legacy compatibility code for older kernels in
   185       the C library, thus ensuring that it will run on a large number
   186       of old kernels.
   187       
   188       The minimum kernel version supported will be dependent upon the
   189       target you build for. For example:
   190         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   191         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   192         powerpc*                Requires Linux 2.4.19
   193         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   194 
   195 config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   196     bool
   197     prompt "Same as kernel headers (default)"
   198     help
   199       Normally, you'll want glibc/eglibc to run against the same kernel
   200       version as the one used for the headers.
   201       
   202       This is the default.
   203       
   204       If enabled, crosstool-ng will use the chosen version of kernel
   205       headers for the glibc minimum kernel version supported, which is
   206       what gets passed to "--enable-kernel=" when configuring glibc.
   207       
   208       Enabling this will ensure that no legacy compatibility code for
   209       older kernels is built into your C libraries, but it will
   210       be unable to run on kernel versions older than whichever kernel
   211       headers version you've built the toolchain for.
   212       
   213       If you know for sure that your toolchain will never need to build
   214       applications that will run under a kernel version older than your
   215       chosen kernel headers version (CT_KERNEL_VERSION), you can choose
   216       "y" here.
   217 
   218 config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   219     bool
   220     prompt "Specific kernel version"
   221     help
   222       Specify the earliest Linux kernel version you want glibc to
   223       include support for.  This does not have to match the kernel
   224       headers version used for your toolchain.  This controls what is
   225       passed to the "--enable-kernel=" option to the glibc configure
   226       script.
   227 
   228       If you want to be able to statically link programs with your
   229       toolchain's C library, make sure this kernel version is lower than
   230       all kernels you wish to support to avoid "FATAL: kernel too old"
   231       errors.  The higher the version you specify, the less legacy code
   232       will be built into libc.
   233 
   234       Most people can leave this at the default value of "2.6.9".
   235 
   236 if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   237 
   238 config LIBC_GLIBC_MIN_KERNEL_VERSION
   239     string
   240     prompt "Minimum kernel version to support"
   241     default "2.6.9"
   242     help
   243       Enter here the lowest kernel version glibc/eglibc will be able to
   244       run against.
   245       
   246       The minimum kernel version supported will be dependent upon the
   247       target you build for. For example:
   248         alpha*-*-linux-gnu      Requires Linux 2.6.9 for NPTL
   249         sh[34]-*-linux-gnu      Requires Linux 2.6.11
   250         powerpc*                Requires Linux 2.4.19
   251         arm*-*-linux-*gnueabi   Requires Linux 2.6.16
   252       
   253       Note that no sanity check is performed by crosstool-NG to ensure
   254       that the value you enter here is appropriate for your target.
   255 
   256 endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   257 
   258 endchoice
   259 
   260 config LIBC_GLIBC_MIN_KERNEL
   261     string
   262     default ""                            if LIBC_GLIBC_KERNEL_VERSION_NONE
   263     default KERNEL_VERSION                if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
   264     default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
   265 
   266 endif # KERNEL_linux