1 # This file contains the common configuration options
2 # that apply to both glibc and eglibc.
4 if LIBC_glibc || LIBC_eglibc
6 # Force using the BFD linker during the toolchain build
7 config LIBC_glibc_familly
10 select BINUTILS_FORCE_LD_BFD
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/*
17 select LIBC_GLIBC_USE_PORTS
20 select LIBC_GLIBC_USE_PORTS
22 # End of arch-specific ports auto-select
24 comment "glibc/eglibc common options"
26 config LIBC_GLIBC_EXTRA_CONFIG
31 Extra flags to pass onto ./configure when configuring.
33 Eg.: --enable-static-nss
35 config LIBC_GLIBC_CONFIGPARMS
37 prompt "Extra config params (READ HELP)"
38 default "" if ! ARCH_sh
39 default "no-z-defs=yes" if ARCH_sh
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.
45 Unless you are building a toolchain for sh3/4, you should leave that empty.
47 Note: If you need to pass more than one value, separate them with
48 '\n'. Eg.: var1=val1\nvar2=val2
50 config LIBC_GLIBC_EXTRA_CFLAGS
52 prompt "extra target CFLAGS"
55 Extra target CFLAGS to use when building.
57 config LIBC_EXTRA_CC_ARGS
59 prompt "gcc extra flags"
62 Extra flags to pass gcc when building.
64 Seldom used, except for sparc64 which seems to need the flag -64
65 to be passed onto gcc.
67 config LIBC_ENABLE_FORTIFIED_BUILD
69 prompt "Enable fortified build (EXPERIMENTAL)"
70 depends on EXPERIMENTAL
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.
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
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). ;-)
88 config LIBC_DISABLE_VERSIONING
90 prompt "Disable symbols versioning"
93 Do not include versioning information in the library objects.
95 config LIBC_OLDEST_ABI
97 prompt "Oldest supported ABI"
100 Set the oldest ABI supported by the C library.
102 Setting this option, for example, to 2.2 will provide ABI support
103 back to (e)glibc-2.2.
105 If this option is not set, (e)glibc will choose for you.
107 config LIBC_GLIBC_FORCE_UNWIND
109 prompt "Force unwind support (READ 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
116 then you may try setting this to 'y'. Otherwise, leave it to 'n'.
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).
122 config LIBC_GLIBC_USE_PORTS
124 prompt "Use the ports addon"
127 The ports addon contains some architecture ports that are not available
128 in the official distribution.
130 For example, this is the case for ARM with glibc-2.4 and above.
132 Say n only if you're sure that your architecture is in the official
133 distribution for your chosen version.
135 config LIBC_ADDONS_LIST
137 prompt "Extra addons"
140 Extra addons to include. Space separated list.
142 You need to specify neither linuxthreads nor nptl, as they are added
143 automagically for you depending on the threading model you choosed
146 Eg.: crypt (for very old libces)
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... :-( "
160 prompt "Minimum supported kernel version"
161 default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
163 config LIBC_GLIBC_KERNEL_VERSION_NONE
165 prompt "Let ./configure decide"
167 Let ./configure decide what minimum kernel version glibc/eglibc
168 will be able to run against.
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
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
181 config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
183 prompt "Same as kernel headers (default)"
185 Normaly, you'll want glibc/eglibc to run against the same kernel
186 version as the one used for the headers.
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.
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.
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
204 config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
206 prompt "Specific kernel version"
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
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.
220 Most people can leave this at the default value of "2.6.9".
222 if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
224 config LIBC_GLIBC_MIN_KERNEL_VERSION
226 prompt "Minimum kernel version to support"
229 Enter here the lowest kernel version glibc/eglibc will be able to
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
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.
242 endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
246 config LIBC_GLIBC_MIN_KERNEL
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
254 endif # LIBC_glibc || LIBC_eglibc