1 # This file contains the common configuration options
2 # that apply to both glibc and eglibc.
4 if LIBC_glibc || LIBC_eglibc
6 # Some architectures require the ports addon. List them one by one here:
7 # This list must be carefully in sync with the architectures names
8 # we can find in config/arch/*
9 config LIBC_GLIBC_MAY_FORCE_PORTS
12 default y if ARCH_mips
13 select LIBC_GLIBC_USE_PORTS
15 # Force using the BFD linker during the toolchain build
16 config LIBC_glibc_familly
19 select BINUTILS_FORCE_LD_BFD
21 comment "glibc/eglibc common options"
23 config LIBC_GLIBC_EXTRA_CONFIG
28 Extra flags to pass onto ./configure when configuring.
30 Eg.: --enable-static-nss
32 config LIBC_GLIBC_CONFIGPARMS
34 prompt "Extra config params (READ HELP)"
35 default "" if ! ARCH_sh
36 default "no-z-defs=yes" if ARCH_sh
38 Some architectures need to set options in the file configparms.
39 This is the case for sh3/4, which really need to set configparms
40 to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
42 Unless you are building a toolchain for sh3/4, you should leave that empty.
44 Note: If you need to pass more than one value, separate them with
45 '\n'. Eg.: var1=val1\nvar2=val2
47 config LIBC_GLIBC_EXTRA_CFLAGS
49 prompt "extra target CFLAGS"
52 Extra target CFLAGS to use when building.
54 config LIBC_EXTRA_CC_ARGS
56 prompt "gcc extra flags"
59 Extra flags to pass gcc when building.
61 Seldom used, except for sparc64 which seems to need the flag -64
62 to be passed onto gcc.
64 config LIBC_ENABLE_FORTIFIED_BUILD
66 prompt "Enable fortified build (EXPERIMENTAL)"
67 depends on EXPERIMENTAL
70 If you say 'y' here, then glibc will be using fortified versions
71 of functions with format arguments (eg. vsyslog, printf...), and
72 do a sanity check on the format at runtime, to avoid some of the
73 common format string attacks.
75 This is currently not supported, and will most probably result in
76 a broken build, with an error message like:
77 ../misc/syslog.c: In function '__vsyslog_chk':
78 ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
79 call to 'syslog': function body not available
81 If you are brave enough and want to debug the issue, then say 'y'
82 here. Otherwise, be still and say 'n' (the default). ;-)
85 config LIBC_DISABLE_VERSIONING
87 prompt "Disable symbols versioning"
90 Do not include versioning information in the library objects.
92 config LIBC_OLDEST_ABI
94 prompt "Oldest supported ABI"
97 Set the oldest ABI supported by the C library.
99 Setting this option, for example, to 2.2 will provide ABI support
100 back to (e)glibc-2.2.
102 If this option is not set, (e)glibc will choose for you.
104 config LIBC_GLIBC_FORCE_UNWIND
106 prompt "Force unwind support (READ HELP!)"
109 If your toolchain fails building while building the C library
110 start files, or the complete C library, with a message like:
111 configure: error: forced unwind support is required
113 then you may try setting this to 'y'. Otherwise, leave it to 'n'.
115 The issue seems to be related to building NPTL on old versions
116 of glibc (and possibly eglibc as well) on some architectures
117 (seen on s390, s390x and x86_64).
119 config LIBC_GLIBC_USE_PORTS
121 prompt "Use the ports addon"
124 The ports addon contains some architecture ports that are not available
125 in the official distribution.
127 For example, this is the case for ARM with glibc-2.4 and above.
129 Say n only if you're sure that your architecture is in the official
130 distribution for your chosen version.
132 config LIBC_ADDONS_LIST
134 prompt "Extra addons"
137 Extra addons to include. Space separated list.
139 You need to specify neither linuxthreads nor nptl, as they are added
140 automagically for you depending on the threading model you choosed
143 Eg.: crypt (for very old libces)
145 if LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" )
146 comment "WARNING !!! "
147 comment "| For glibc >= 2.8, it can happen that the tarballs "
148 comment "| for the addons are not available for download. "
149 comment "| If that happens, bad luck... Try a previous version "
150 comment "| or try again later... :-( "
157 prompt "Minimum supported kernel version"
158 default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
160 config LIBC_GLIBC_KERNEL_VERSION_NONE
162 prompt "Let ./configure decide"
164 Let ./configure decide what minimum kernel version glibc/eglibc
165 will be able to run against.
167 This will inclde legacy compatibility code for older kernels in
168 the C library, thus ensuring that it will run on a large number
171 The minimum kernel version supported will be dependent upon the
172 target you build for. For example:
173 alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
174 sh[34]-*-linux-gnu Requires Linux 2.6.11
175 powerpc* Requires Linux 2.4.19
176 arm*-*-linux-*gnueabi Requires Linux 2.6.16
178 config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
180 prompt "Same as kernel headers (default)"
182 Normaly, you'll want glibc/eglibc to run against the same kernel
183 version as the one used for the headers.
187 If enabled, crosstool-ng will use the chosen version of kernel
188 headers for the glibc minimum kernel version supported, which is
189 what gets passed to "--enable-kernel=" when configuring glibc.
191 Enabling this will ensure that no legacy compatibility code for
192 older kernels is built into your C libraries, but it will
193 be unable to run on kernel versions older than whichever kernel
194 headers version you've built the toolchain for.
196 If you know for sure that your toolchain will never need to build
197 applications that will run under a kernel version older than your
198 chosen kernel headers version (CT_KERNEL_VERSION), you can choose
201 config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
203 prompt "Specific kernel version"
205 Specify the earliest Linux kernel version you want glibc to
206 include support for. This does not have to match the kernel
207 headers version used for your toolchain. This controls what is
208 passed to the "--enable-kernel=" option to the glibc configure
211 If you want to be able to statically link programs with your
212 toolchain's C library, make sure this kernel version is lower than
213 all kernels you wish to support to avoid "FATAL: kernel too old"
214 errors. The higher the version you specify, the less legacy code
215 will be built into libc.
217 Most people can leave this at the default value of "2.6.9".
219 if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
221 config LIBC_GLIBC_MIN_KERNEL_VERSION
223 prompt "Minimum kernel version to support"
226 Enter here the lowest kernel version glibc/eglibc will be able to
229 The minimum kernel version supported will be dependent upon the
230 target you build for. For example:
231 alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
232 sh[34]-*-linux-gnu Requires Linux 2.6.11
233 powerpc* Requires Linux 2.4.19
234 arm*-*-linux-*gnueabi Requires Linux 2.6.16
236 Note that no sanity check is performed by crosstool-NG to ensure
237 that the value you enter here is appropriate for your target.
239 endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
243 config LIBC_GLIBC_MIN_KERNEL
245 default "" if LIBC_GLIBC_KERNEL_VERSION_NONE
246 default KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
247 default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
251 endif # LIBC_glibc || LIBC_eglibc