OSDN Git Service

malloc: enable assert() when malloc debugging
[uclinux-h8/uClibc.git] / extra / Configs / Config.in
1 #
2 # For a description of the syntax of this configuration file,
3 # see extra/config/Kconfig-language.txt
4 #
5
6 mainmenu "uClibc C Library Configuration"
7
8 config DESIRED_TARGET_ARCH
9         string
10         option env="ARCH"
11
12 choice
13         prompt "Target Architecture"
14         default TARGET_alpha if DESIRED_TARGET_ARCH = "alpha"
15         default TARGET_arm if DESIRED_TARGET_ARCH = "arm"
16         default TARGET_avr32 if DESIRED_TARGET_ARCH = "avr32"
17         default TARGET_bfin if DESIRED_TARGET_ARCH = "bfin"
18         default TARGET_cris if DESIRED_TARGET_ARCH = "cris"
19         default TARGET_e1 if DESIRED_TARGET_ARCH = "e1"
20         default TARGET_frv if DESIRED_TARGET_ARCH = "frv"
21         default TARGET_h8300 if DESIRED_TARGET_ARCH = "h8300"
22         default TARGET_hppa if DESIRED_TARGET_ARCH = "hppa"
23         default TARGET_i386 if DESIRED_TARGET_ARCH = "i386"
24         default TARGET_i960 if DESIRED_TARGET_ARCH = "i960"
25         default TARGET_ia64 if DESIRED_TARGET_ARCH = "ia64"
26         default TARGET_m68k if DESIRED_TARGET_ARCH = "m68k"
27         default TARGET_metag if DESIRED_TARGET_ARCH = "metag"
28         default TARGET_microblaze if DESIRED_TARGET_ARCH = "microblaze"
29         default TARGET_mips if DESIRED_TARGET_ARCH = "mips"
30         default TARGET_nios if DESIRED_TARGET_ARCH = "nios"
31         default TARGET_nios2 if DESIRED_TARGET_ARCH = "nios2"
32         default TARGET_powerpc if DESIRED_TARGET_ARCH = "powerpc"
33         default TARGET_sh if DESIRED_TARGET_ARCH = "sh"
34         default TARGET_sh64 if DESIRED_TARGET_ARCH = "sh64"
35         default TARGET_sparc if DESIRED_TARGET_ARCH = "sparc"
36         default TARGET_v850 if DESIRED_TARGET_ARCH = "v850"
37         default TARGET_vax if DESIRED_TARGET_ARCH = "vax"
38         default TARGET_x86_64 if DESIRED_TARGET_ARCH = "x86_64"
39         default TARGET_xtensa if DESIRED_TARGET_ARCH = "xtensa"
40         help
41           The architecture of your target.
42
43 config TARGET_alpha
44         bool "alpha"
45
46 config TARGET_arm
47         bool "arm"
48
49 config TARGET_avr32
50         bool "avr32"
51
52 config TARGET_bfin
53         bool "bfin"
54
55 config TARGET_c6x
56         bool "c6x"
57
58 config TARGET_cris
59         bool "cris"
60
61 config TARGET_e1
62         bool "e1 (BROKEN)"
63
64 config TARGET_frv
65         bool "frv (BROKEN)"
66
67 config TARGET_h8300
68         bool "h8300 (BROKEN)"
69
70 config TARGET_hppa
71         bool "hppa"
72
73 config TARGET_i386
74         bool "i386"
75
76 config TARGET_i960
77         bool "i960 (BROKEN)"
78
79 config TARGET_ia64
80         bool "ia64"
81
82 config TARGET_m68k
83         bool "m68k"
84
85 config TARGET_metag
86         bool "metag"
87
88 config TARGET_microblaze
89         bool "microblaze"
90
91 config TARGET_mips
92         bool "mips"
93
94 config TARGET_nios
95         bool "nios"
96
97 config TARGET_nios2
98         bool "nios2"
99
100 config TARGET_powerpc
101         bool "powerpc"
102
103 config TARGET_sh
104         bool "superh"
105
106 config TARGET_sh64
107         bool "sh64"
108
109 config TARGET_sparc
110         bool "sparc"
111
112 config TARGET_v850
113         bool "v850 (BROKEN)"
114
115 config TARGET_vax
116         bool "vax"
117
118 config TARGET_x86_64
119         bool "x86_64"
120
121 config TARGET_xtensa
122         bool "xtensa"
123
124 endchoice
125
126
127 menu "Target Architecture Features and Options"
128
129 if TARGET_alpha
130 source "extra/Configs/Config.alpha"
131 endif
132
133 if TARGET_arm
134 source "extra/Configs/Config.arm"
135 endif
136
137 if TARGET_avr32
138 source "extra/Configs/Config.avr32"
139 endif
140
141 if TARGET_bfin
142 source "extra/Configs/Config.bfin"
143 endif
144
145 if TARGET_cris
146 source "extra/Configs/Config.cris"
147 endif
148
149 if TARGET_e1
150 source "extra/Configs/Config.e1"
151 endif
152
153 if TARGET_frv
154 source "extra/Configs/Config.frv"
155 endif
156
157 if TARGET_h8300
158 source "extra/Configs/Config.h8300"
159 endif
160
161 if TARGET_hppa
162 source "extra/Configs/Config.hppa"
163 endif
164
165 if TARGET_i386
166 source "extra/Configs/Config.i386"
167 endif
168
169 if TARGET_i960
170 source "extra/Configs/Config.i960"
171 endif
172
173 if TARGET_ia64
174 source "extra/Configs/Config.ia64"
175 endif
176
177 if TARGET_m68k
178 source "extra/Configs/Config.m68k"
179 endif
180
181 if TARGET_metag
182 source "extra/Configs/Config.metag"
183 endif
184
185 if TARGET_nios
186 source "extra/Configs/Config.nios"
187 endif
188
189 if TARGET_nios2
190 source "extra/Configs/Config.nios2"
191 endif
192
193 if TARGET_microblaze
194 source "extra/Configs/Config.microblaze"
195 endif
196
197 if TARGET_mips
198 source "extra/Configs/Config.mips"
199 endif
200
201 if TARGET_powerpc
202 source "extra/Configs/Config.powerpc"
203 endif
204
205 if TARGET_sh
206 source "extra/Configs/Config.sh"
207 endif
208
209 if TARGET_sh64
210 source "extra/Configs/Config.sh64"
211 endif
212
213 if TARGET_sparc
214 source "extra/Configs/Config.sparc"
215 endif
216
217 if TARGET_v850
218 source "extra/Configs/Config.v850"
219 endif
220
221 if TARGET_vax
222 source "extra/Configs/Config.vax"
223 endif
224
225 if TARGET_x86_64
226 source "extra/Configs/Config.x86_64"
227 endif
228
229 if TARGET_xtensa
230 source "extra/Configs/Config.xtensa"
231 endif
232
233 if TARGET_c6x
234 source "extra/Configs/Config.c6x"
235 endif
236
237 config TARGET_SUBARCH
238         string
239         default "e500" if CONFIG_E500
240         default "classic" if CONFIG_CLASSIC
241         default "sh4" if CONFIG_SH4
242         default "" if CONFIG_386
243         default "i486" if CONFIG_486
244         default "i586" if CONFIG_586
245         default "i686" if CONFIG_686
246         default ""
247
248 source "extra/Configs/Config.in.arch"
249
250 endmenu
251
252 menu "General Library Settings"
253
254 config HAVE_NO_PIC
255         bool
256
257 config DOPIC
258         bool "Generate only Position Independent Code (PIC)"
259         default y
260         depends on !HAVE_NO_PIC
261         help
262           If you wish to build all of uClibc as PIC objects, then answer Y here.
263           If you are unsure, then you should answer N.
264
265 config ARCH_HAS_NO_SHARED
266         bool
267
268 config ARCH_HAS_NO_LDSO
269         bool
270         select ARCH_HAS_NO_SHARED
271
272 config ARCH_HAS_UCONTEXT
273         bool
274
275 config HAVE_SHARED
276         bool "Enable shared libraries"
277         depends on !ARCH_HAS_NO_SHARED
278         default y
279         help
280           If you wish to build uClibc with support for shared libraries then
281           answer Y here.  If you only want to build uClibc as a static library,
282           then answer N.
283
284 config FORCE_SHAREABLE_TEXT_SEGMENTS
285         bool "Only load shared libraries which can share their text segment"
286         depends on HAVE_SHARED
287         select DOPIC
288         help
289           If you answer Y here, the uClibc native shared library loader will
290           only load shared libraries, which do not need to modify any
291           non-writable segments. These libraries haven't set the DT_TEXTREL
292           tag in the dynamic section (==> objdump).
293           All your libraries must be compiled with -fPIC or -fpic, and all
294           assembler function must be written as position independent code (PIC).
295           Enabling this option will make uClibc's shared library loader a
296           little bit smaller and guarantee that no memory will be wasted by
297           badly coded shared libraries.
298
299 config LDSO_LDD_SUPPORT
300         bool "Native 'ldd' support"
301         depends on HAVE_SHARED
302         default y
303         help
304           Enable all the code needed to support traditional ldd,
305           which executes the shared library loader to resolve all dependencies
306           and then provide a list of shared libraries that are required for an
307           application to function.  Disabling this option will make uClibc's
308           shared library loader a little bit smaller.
309           Most people will answer Y.
310
311 config LDSO_CACHE_SUPPORT
312         bool "Enable library loader cache (ld.so.conf)"
313         depends on HAVE_SHARED
314         default y
315         help
316           Enable this to make use of /etc/ld.so.conf, the shared library loader
317           cache configuration file to support for non-standard library paths.
318           After updating this file, it is necessary to run 'ldconfig' to update
319           the /etc/ld.so.cache shared library loader cache file.
320
321 config LDSO_PRELOAD_ENV_SUPPORT
322         bool "Enable library loader LD_PRELOAD environment"
323         depends on HAVE_SHARED
324         default y
325         help
326           Enable this to make use of LD_PRELOAD environment variable.
327           A whitespace-separated list of additional, user-specified, ELF shared
328           libraries to be loaded before all others. This can be used to
329           selectively override functions in other shared libraries. For
330           set-user-ID/set-group-ID ELF binaries, only libraries in the standard
331           search directories that are also set-user-ID will be loaded.
332
333 config LDSO_PRELOAD_FILE_SUPPORT
334         bool "Enable library loader preload file (ld.so.preload)"
335         depends on HAVE_SHARED
336         help
337           Enable this to make use of /etc/ld.so.preload. This file contains a
338           whitespace separated list of shared libraries to be loaded before
339           the program.
340
341 config LDSO_BASE_FILENAME
342         string "Shared library loader naming prefix"
343         depends on HAVE_SHARED && (LDSO_CACHE_SUPPORT || LDSO_PRELOAD_FILE_SUPPORT)
344         default "ld.so"
345         help
346           If you wish to support both uClibc and glibc on the same system, it
347           is necessary to set this to something other than "ld.so" to avoid
348           conflicts with glibc, which also uses "ld.so".  This prevents both
349           libraries from using the same /etc/ld.so.* files.  If you wish to
350           support both uClibc and glibc on the same system then you should set
351           this to "ld-uClibc.so".
352
353           Most people will leave this set to the default of "ld.so".
354
355           WARNING: Changing the default prefix could cause problems with
356                    binutils' ld !
357
358 config LDSO_STANDALONE_SUPPORT
359         bool "Dynamic linker stand-alone mode support"
360         depends on HAVE_SHARED
361         help
362           The dynamic linker can be run either indirectly through running some
363           dynamically linked program or library (in which case no command line
364           options to the dynamic linker can be passed and, in the ELF case, the
365           dynamic linker which is stored in the .interp section of the program
366           is executed) or directly by running:
367
368           /lib/ld-uClibc.so.*  [OPTIONS] [PROGRAM [ARGUMENTS]]
369
370           Stand-alone execution is a prerequisite for adding prelink
371           capabilities to uClibc dynamic linker, as well useful for testing an
372           updated version of the dynamic linker without breaking the system.
373
374 config LDSO_PRELINK_SUPPORT
375         bool "Dynamic linker prelink support"
376         depends on HAVE_SHARED
377         select LDSO_STANDALONE_SUPPORT
378         help
379           The dynamic linker can be used in stand-alone mode by the prelink tool
380           for prelinking ELF shared libraries and binaries to speed up startup
381           time. It also is able to load and handle prelinked libraries and
382           binaries at runtime.
383
384 config UCLIBC_STATIC_LDCONFIG
385         bool "Link ldconfig statically"
386         depends on HAVE_SHARED
387         default y
388         help
389           Enable this option to statically link the ldconfig binary.
390
391           Making ldconfig static can be beneficial if you have a library
392           problem and need to use ldconfig to recover.  Sometimes it is
393           preferable to instead keep the size of the system down, in which
394           case you should disable this option.
395
396 config LDSO_RUNPATH
397         bool "Enable ELF RUNPATH tag support"
398         depends on HAVE_SHARED
399         default y if LDSO_CACHE_SUPPORT
400         help
401           ELF's may have dynamic RPATH/RUNPATH tags.  These tags list paths
402           which extend the library search paths.  They are really only useful
403           if a package installs libraries in non standard locations and
404           ld.so.conf support is disabled.
405
406           Usage of RUNPATH tags is not too common, so disabling this feature
407           should be safe for most people.
408
409 config LDSO_SAFE_RUNPATH
410         bool "Allow only RUNPATH beginning with /"
411         depends on LDSO_RUNPATH
412         default y
413         help
414           Allow only absolute path in RPATH/RUNPATH.
415
416 config LDSO_SEARCH_INTERP_PATH
417         bool "Add ldso path to lib search path"
418         depends on HAVE_SHARED
419         default y
420         help
421           The ldso is told where it is being executed from and can use that
422           path to find related core libraries.  This is useful by default,
423           but can be annoying in a mixed development environment.
424
425           i.e. if the ldso is run from /foo/boo/ldso.so, it will start its
426           library search with /foo/boo/
427
428           If unsure, simply say Y here.
429
430 config LDSO_LD_LIBRARY_PATH
431         bool "Add LD_LIBRARY_PATH to lib search path"
432         depends on HAVE_SHARED
433         default y
434         help
435           On hardened system it could be useful to disable the use of
436           LD_LIBRARY_PATH environment variable (a colon-separated list of
437           directories in which to search for ELF libraries at execution-time).
438
439           If unsure, simply say Y here.
440
441 config LDSO_NO_CLEANUP
442         bool "Disable automatic unloading of dynamically loaded shared objects"
443         depends on HAVE_SHARED
444         help
445           If you need complete allocation traces when debugging memory leaks
446           using Valgrind in a process that dynamically loads shared objects,
447           then answer Y here. Unlike glibc, uClibc unloads all dynamically
448           loaded shared objects when a process exits, which prevents Valgrind
449           from correctly resolving the symbols from the unloaded shared objects.
450           Unless you know you need this, you should answer N.
451
452 config UCLIBC_CTOR_DTOR
453         bool "Support global constructors and destructors"
454         default y
455         help
456           If you wish to build uClibc with support for global constructor
457           (ctor) and global destructor (dtor) support, then answer Y here.
458           When ctor/dtor support is enabled, binaries linked with uClibc must
459           also be linked with crtbegin.o and crtend.o which are provided by gcc
460           (the "*startfile:" and "*endfile:" settings in your gcc specs file
461           may need to be adjusted to include these files).  This support will
462           also add a small amount of additional size to each binary compiled vs
463           uClibc.  If you will be using uClibc with C++, or if you need the gcc
464           __attribute__((constructor)) and __attribute__((destructor)) to work,
465           then you definitely want to answer Y here.  If you don't need ctors
466           or dtors and want your binaries to be as small as possible, then
467           answer N.
468
469 config LDSO_GNU_HASH_SUPPORT
470         bool "Enable GNU hash style support"
471         depends on HAVE_SHARED
472         help
473           Newest binutils support a new hash style named GNU-hash. The dynamic
474           linker will use the new GNU-hash section (.gnu.hash) for symbol lookup
475           if present into the ELF binaries, otherwise it will use the old SysV
476           hash style (.hash). This ensures that it is completely backward
477           compatible.
478           Further, being the hash table implementation self-contained into each
479           executable and shared libraries, objects with mixed hash style can
480           peacefully coexist in the same process.
481
482           If you want to use this new feature, answer Y
483
484 choice
485         prompt "Thread support"
486         #default UCLIBC_HAS_THREADS_NATIVE if (TARGET_alpha || TARGET_arm || TARGET_i386 || TARGET_mips || TARGET_powerpc || TARGET_sh || TARGET_sh64)
487         default HAS_NO_THREADS
488         help
489           If you want to compile uClibc with pthread support, then answer Y.
490           This will increase the size of uClibc by adding a bunch of locking
491           to critical data structures, and adding extra code to ensure that
492           functions are properly reentrant.
493
494 config HAS_NO_THREADS
495         bool "none"
496         help
497           Disable thread support.
498
499 config LINUXTHREADS_OLD
500         bool "older (stable) version of linuxthreads"
501         # linuxthreads and linuxthreads.old need nanosleep()
502         select UCLIBC_HAS_REALTIME
503         help
504           There are two versions of linuxthreads.  The older (stable) version
505           has been in uClibc for quite a long time but hasn't seen too many
506           updates other than bugfixes.
507
508
509 config LINUXTHREADS_NEW
510         bool "slightly newer version of linuxthreads"
511         depends on ARCH_HAS_DEPRECATED_SYSCALLS
512         help
513           The new version has not been tested much, and lacks ports for arches
514           which glibc does not support (like bfin/frv/etc...), but is based on
515           the latest code from glibc, so it may be the only choice for the
516           newer ports (like alpha/amd64/64bit arches and hppa).
517
518 config UCLIBC_HAS_THREADS_NATIVE
519         bool "Native POSIX Threading (NPTL)"
520         select UCLIBC_HAS_TLS
521         select UCLIBC_HAS_STDIO_FUTEXES
522         select UCLIBC_HAS_REALTIME
523         # i386 has no lowlevellock support (yet) as opposed to i486 onward
524         depends on !CONFIG_386
525         help
526           If you want to compile uClibc with NPTL support, then answer Y.
527
528           IMPORTANT NOTE!  NPTL requires a Linux 2.6 kernel, binutils
529           at least version 2.16 and GCC with at least version 4.1.0. NPTL
530           will not work with older versions of any above sources. If you
531           ignore any of these guidelines, you do so at your own risk. Do
532           not ask for help on any of the development mailing lists.
533
534           !!!! WARNING !!!! BIG FAT WARNING !!!! REALLY BIG FAT WARNING !!!!
535
536           This is experimental code and at times it may not even build and
537           even if it does it might decide to do random damage. This code is
538           potentially hazardous to your health and sanity. It will remain
539           that way until further notice at which point this notice will
540           disappear. Thank you for your support and for not smoking.
541
542 endchoice
543
544 config UCLIBC_HAS_THREADS
545         def_bool y if !HAS_NO_THREADS
546
547 config UCLIBC_HAS_TLS
548         bool "Thread-Local Storage"
549         depends on UCLIBC_HAS_THREADS_NATIVE
550         help
551           If you want to enable TLS support then answer Y.
552           This is fast an efficient way to store per-thread local data
553           which is not on stack. It needs __thread support enabled in
554           gcc.
555
556 config PTHREADS_DEBUG_SUPPORT
557         bool "Build pthreads debugging support"
558         depends on UCLIBC_HAS_THREADS
559         help
560           Say Y here if you wish to be able to debug applications that use
561           uClibc's pthreads library.  By enabling this option, a library
562           named libthread_db will be built.  This library will be dlopen()'d
563           by gdb and will allow gdb to debug the threads in your application.
564
565           IMPORTANT NOTE!  Because gdb must dlopen() the libthread_db library,
566           you must compile gdb with uClibc in order for pthread debugging to
567           work properly.
568
569           If you are doing development and want to debug applications using
570           uClibc's pthread library, answer Y.  Otherwise, answer N.
571
572
573 config UCLIBC_HAS_SYSLOG
574         bool "Syslog support"
575         default y
576         depends on UCLIBC_HAS_NETWORK_SUPPORT
577         select UCLIBC_HAS_SOCKET
578         help
579           Support sending messages to the system logger.
580           This requires socket-support.
581
582 config UCLIBC_HAS_LFS
583         bool "Large File Support"
584         default y
585         help
586           If you wish to build uClibc with support for accessing large files
587           (i.e. files greater then 2 GiB) then answer Y.  Do not enable this
588           if you are using an older Linux kernel (2.0.x) that lacks large file
589           support.  Enabling this option will increase the size of uClibc.
590
591 choice
592         prompt "Malloc Implementation"
593         default MALLOC if ! ARCH_USE_MMU
594         default MALLOC_STANDARD if ARCH_USE_MMU
595
596 config MALLOC
597         bool "malloc"
598         help
599           "malloc" use mmap for all allocations and so works very well on
600           MMU-less systems that do not support the brk() system call.   It is
601           pretty smart about reusing already allocated memory, and minimizing
602           memory wastage.
603           This is the default for uClinux MMU-less systems.
604
605 config MALLOC_SIMPLE
606         bool "malloc-simple"
607         help
608           "malloc-simple" is trivially simple and slow as molasses.  It
609           was written from scratch for uClibc, and is the simplest possible
610           (and therefore smallest) malloc implementation.
611
612           This uses only the mmap() system call to allocate and free memory,
613           and does not use the brk() system call at all, making it a fine
614           choice for MMU-less systems with very limited memory.  It's 100%
615           standards compliant, thread safe, very small, and releases freed
616           memory back to the OS immediately rather than keeping it in the
617           process's heap for reallocation.  It is also VERY SLOW.
618
619 config MALLOC_STANDARD
620         bool "malloc-standard"
621         depends on ARCH_USE_MMU
622         help
623           "malloc-standard" is derived from the public domain dlmalloc
624           implementation by Doug Lea.  It is quite fast, and is pretty smart
625           about reusing already allocated memory, and minimizing memory
626           wastage.  This uses brk() for small allocations, while using mmap()
627           for larger allocations.  This is the default malloc implementation
628           for uClibc.
629
630           If unsure, answer "malloc-standard".
631
632 endchoice
633
634 config MALLOC_GLIBC_COMPAT
635         bool "Malloc returns live pointer for malloc(0)"
636         help
637           The behavior of malloc(0) is listed as implementation-defined by
638           SuSv3.  Glibc returns a valid pointer to something, while uClibc
639           normally returns NULL.  I personally feel glibc's behavior is
640           not particularly safe, and allows buggy applications to hide very
641           serious problems.
642
643           When this option is enabled, uClibc will act just like glibc, and
644           return a live pointer when someone calls malloc(0).  This pointer
645           provides a malloc'ed area with a size of 1 byte.  This feature is
646           mostly useful when dealing with applications using autoconf's broken
647           AC_FUNC_MALLOC macro (which redefines malloc as rpl_malloc if it
648           does not detect glibc style returning-a-valid-pointer-for-malloc(0)
649           behavior).  Most people can safely answer N.
650
651 config UCLIBC_HAS_OBSTACK
652         bool "Obstack Support (gnu extension)"
653         help
654           When this option is enabled, uClibc will provide support for obstacks.
655           An obstack is a structure in which memory can be dynamically allocated
656           as a 'stack of objects'.  Many programs need this GNU extention and
657           you should say Y if you are using any.  Otherwise, say N to save some
658           space.
659
660 config UCLIBC_DYNAMIC_ATEXIT
661         bool "Dynamic atexit() Support"
662         default y
663         help
664           When this option is enabled, uClibc will support an infinite number,
665           of atexit() and on_exit() functions, limited only by your available
666           memory.  This can be important when uClibc is used with C++, since
667           global destructors are implemented via atexit(), and it is quite
668           possible to exceed the default number when this option is disabled.
669           Enabling this option adds a few bytes, and more significantly makes
670           atexit and on_exit depend on malloc, which can be bad when compiling
671           static executables.
672
673           Unless you use uClibc with C++, you should probably answer N.
674
675 config COMPAT_ATEXIT
676         bool "Old (visible) atexit Support"
677         help
678           Enable this option if you want to update from 0.9.28 to git/0.9.29,
679           else you will be missing atexit() until you rebuild all apps.
680
681 config UCLIBC_SUSV2_LEGACY
682         bool "Enable SuSv2 LEGACY functions"
683         help
684           Enable this option if you want to have SuSv2 LEGACY functions
685           Currently applies to:
686
687           valloc
688
689           WARNING! ABI incompatibility.
690
691 config UCLIBC_SUSV3_LEGACY
692         bool "Enable SuSv3 LEGACY functions"
693         #vfork,
694         # h_errno
695         # gethostbyaddr
696         # gethostbyname
697         help
698           Enable this option if you want to have SuSv3 LEGACY functions
699           in the library, else they are replaced by SuSv3 proposed macros.
700           Currently applies to:
701
702           bcmp, bcopy, bzero, index, rindex, ftime,
703           bsd_signal, (ecvt), (fcvt), gcvt, (getcontext),
704           (getwd), (makecontext),
705           mktemp, (pthread_attr_getstackaddr), (pthread_attr_setstackaddr),
706           scalb, (setcontext), (swapcontext), ualarm, usleep,
707           wcswcs.
708
709           WARNING! ABI incompatibility.
710
711 config UCLIBC_HAS_CONTEXT_FUNCS
712         bool "Use obsolescent context control functions"
713         depends on UCLIBC_SUSV3_LEGACY && ARCH_HAS_UCONTEXT
714         help
715           Add into library the SuSv3 obsolescent functions used for context
716           control. The setcontext family allows the implementation in C of
717           advanced control flow patterns such as iterators, fibers, and
718           coroutines. They may be viewed as an advanced version of
719           setjmp/longjmp; whereas the latter allows only a single non-local jump
720           up the stack, setcontext allows the creation of multiple cooperative
721           threads of control, each with its own stack.
722           These functions are: setcontext, getcontext, makecontext, swapcontext.
723
724 config UCLIBC_SUSV3_LEGACY_MACROS
725         bool "Enable SuSv3 LEGACY macros"
726         help
727           Enable this option if you want to have SuSv3 LEGACY macros.
728           Currently applies to bcopy/bzero/bcmp/index/rindex et al.
729           WARNING! ABI incompatibility.
730
731 config UCLIBC_SUSV4_LEGACY
732         bool "Enable SuSv4 LEGACY or obsolescent functions"
733         help
734           Enable this option if you want to have SuSv4 LEGACY functions
735           and macros in the library.
736           Currently applies to:
737
738           - XSI functions:
739             _longjmp, _setjmp, _tolower, _toupper, ftw, getitimer,
740             gettimeofday, isascii, pthread_getconcurrency,
741             pthread_setconcurrency, setitimer, setpgrp, sighold,
742             sigignore, sigpause, sigrelse, sigset, siginterrupt,
743             tempnam, toascii, ulimit.
744
745           - Base functions:
746             asctime, asctime_r, ctime, ctime_r, gets, rand_r,
747             tmpnam, utime.
748
749           WARNING! ABI incompatibility.
750
751 config UCLIBC_STRICT_HEADERS
752         bool "Hide structures and constants for unsupported features"
753         help
754           Hide structures and constants in headers that should not be used,
755           because the respective feature is disabled.
756
757           WARNING! enabling this option requires to patch many faulty apps,
758           since they make (wrongly) use of these structures/constants,
759           although the feature was disabled.
760
761 config UCLIBC_HAS_STUBS
762         bool "Provide stubs for unavailable functionality"
763         help
764           With this option uClibc provides non-functional stubs for
765           functions which are impossible to implement on the target
766           architecture. Otherwise, such functions are simply omitted.
767
768 config UCLIBC_HAS_SHADOW
769         bool "Shadow Password Support"
770         default y
771         help
772           Answer N if you do not need shadow password support.
773           Most people will answer Y.
774
775 config UCLIBC_HAS_PROGRAM_INVOCATION_NAME
776         bool "Support for program_invocation_name"
777         help
778           Support for the GNU-specific program_invocation_name and
779           program_invocation_short_name strings.  Some GNU packages
780           (like tar and coreutils) utilize these for extra useful
781           output, but in general are not required.
782
783           At startup, these external strings are automatically set
784           up based on the value of ARGV[0].
785
786           If unsure, just answer N.
787
788 config UCLIBC_HAS___PROGNAME
789         bool "Support for __progname"
790         default y
791         help
792           Some packages (like openssh) like to peek into internal libc
793           symbols to make their output a bit more user friendly.
794
795           At startup, __progname is automatically set up based on the
796           value of ARGV[0].
797
798           If unsure, just answer N.
799
800 config UCLIBC_HAS_PTY
801         bool "Support for pseudo-terminals"
802         default y
803         help
804           This enables support for pseudo-terminals (see man 4 pts
805           and man 7 pty).
806
807           If unsure, just answer Y.
808
809 config ASSUME_DEVPTS
810         bool "Assume that /dev/pts is a devpts or devfs file system"
811         default y
812         depends on UCLIBC_HAS_PTY
813         help
814           Enable this if /dev/pts is on a devpts or devfs filesystem.  Both
815           these filesystems automatically manage permissions on the /dev/pts
816           devices.  You may need to mount your devpts or devfs filesystem on
817           /dev/pts for this to work.
818
819           Most people should answer Y.
820
821 config UNIX98PTY_ONLY
822         bool "Support only Unix 98 PTYs"
823         default y
824         depends on UCLIBC_HAS_PTY
825         help
826           If you want to support only Unix 98 PTYs enable this.  Some older
827           applications may need this disabled and will thus use legacy BSD
828           style PTY handling which is more complex and also bigger than
829           Unix 98 PTY handling.
830
831           For most current programs, you can generally answer Y.
832
833 if UNIX98PTY_ONLY
834 config UCLIBC_HAS_GETPT
835         bool "Support getpt() (glibc-compat)"
836         depends on UCLIBC_HAS_PTY
837         help
838           Some packages may need getpt().
839           All of those are non-standard and can be considered
840           GNU/libc compatibility.
841           Either use posix_openpt() or just open /dev/ptmx yourself.
842
843           If unsure, just say N.
844 endif
845
846 if !UNIX98PTY_ONLY
847 # Have to use __libc_ptyname{1,2}[] and related bloat
848 config UCLIBC_HAS_GETPT
849         def_bool y
850 endif
851
852 config UCLIBC_HAS_LIBUTIL
853         bool "Provide libutil library and functions"
854         depends on UCLIBC_HAS_PTY
855         help
856           Provide a libutil library.
857           This non-standard conforming library provides the following
858           utility functions:
859
860           forkpty(): combines openpty(), fork(2), and login_tty() to
861                        create a new process operating in a pseudo-terminal.
862           login(): write utmp and wtmp entries
863           login_tty(): prepares for a login on the tty fd by creating a
864                        new session, making fd the controlling terminal for
865                        the calling process, setting fd to be the standard
866                        input, output, and error streams of the current
867                        process, and closing fd.
868           logout(): write utmp and wtmp entries
869           logwtmp(): constructs a utmp structure and calls updwtmp() to
870                        append the structure to the utmp file.
871           openpty(): finds an available pseudo-terminal and returns
872                        file descriptors for the master and slave
873
874           This library adds about 3k-4k to your system.
875
876 config UCLIBC_HAS_TM_EXTENSIONS
877         bool "Support 'struct tm' timezone extension fields"
878         default y
879         help
880           Enabling this option adds fields to 'struct tm' in time.h for
881           tracking the number of seconds east of UTC, and an abbreviation for
882           the current timezone.  These fields are not specified by the SuSv3
883           standard, but they are commonly used in both GNU and BSD application
884           code.
885
886           To strictly follow the SuSv3 standard, leave this disabled.
887           Most people will probably want to answer Y.
888
889 config UCLIBC_HAS_TZ_CACHING
890         bool "Enable caching of the last valid timezone 'TZ' string"
891         default y
892         help
893           Answer Y to enable caching of the last valid 'TZ' string describing
894           the timezone setting.  This allows a quick string compare to avoid
895           repeated parsing of unchanged 'TZ' strings when tzset() is called.
896
897           Most people will answer Y.
898
899 config UCLIBC_HAS_TZ_FILE
900         bool "Enable '/etc/TZ' file support to set a default timezone (uClibc-specific)"
901         default y
902         help
903           Answer Y to enable the setting of a default timezone for uClibc.
904
905           Ordinarily, uClibc gets the timezone information exclusively from the
906           'TZ' environment variable.  In particular, there is no support for
907           the zoneinfo directory tree or the /etc/timezone file used by glibc.
908
909           With this option enabled, uClibc will use the value stored in the
910           file '/etc/TZ' (default path) to obtain timezone information if the
911           'TZ' environment variable is missing or has an invalid value.  The
912           file consists of a single line (newline required) of text describing
913           the timezone in the format specified for the TZ environment variable.
914
915           Doing 'echo CST6CDT > /etc/TZ' is enough to create a valid file.
916           See
917           http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
918           for details on valid settings of 'TZ'.
919
920           Most people will answer Y.
921
922 config UCLIBC_HAS_TZ_FILE_READ_MANY
923         bool "Repeatedly read the '/etc/TZ' file"
924         depends on UCLIBC_HAS_TZ_FILE
925         default y
926         help
927           Answer Y to enable repeated reading of the '/etc/TZ' file even after
928           a valid value has been read.  This incurs the overhead of an
929           open/read/close for each tzset() call (explicit or implied).  However,
930           setting this will allow applications to update their timezone
931           information if the contents of the file change.
932
933           Most people will answer Y.
934
935 config UCLIBC_TZ_FILE_PATH
936         string "Path to the 'TZ' file for setting the global timezone"
937         depends on UCLIBC_HAS_TZ_FILE
938         default "/etc/TZ"
939         help
940           This is the path to the 'TZ' file.
941
942           Most people will use the default of '/etc/TZ'.
943
944 config UCLIBC_FALLBACK_TO_ETC_LOCALTIME
945         bool "Use /etc/localtime as a fallback"
946         depends on UCLIBC_HAS_TZ_FILE
947         default y
948         help
949           Answer Y to try to use /etc/localtime file.
950           On glibc systems this file (if it is in TZif2 format)
951           contains timezone string at the end.
952
953           Most people will answer Y.
954
955 endmenu
956
957 menu "Advanced Library Settings"
958
959 config UCLIBC_PWD_BUFFER_SIZE
960         int "Buffer size for getpwnam() and friends"
961         default 256
962         range 12 1024
963         help
964           This sets the value of the buffer size for getpwnam() and friends.
965           By default, this is 256. (For reference, glibc uses 1024).
966           The value can be found using sysconf() with the _SC_GETPW_R_SIZE_MAX
967           parameter.
968
969 config UCLIBC_GRP_BUFFER_SIZE
970         int "Buffer size for getgrnam() and friends"
971         default 256
972         range 12 1024
973         help
974           This sets the value of the buffer size for getgrnam() and friends.
975           By default, this is 256. (For reference, glibc uses 1024).
976           The value can be found using sysconf() with the _SC_GETGR_R_SIZE_MAX
977           parameter.
978
979 comment "Support various families of functions"
980
981 config UCLIBC_LINUX_MODULE_26
982         bool "Linux kernel module functions (2.6)"
983         default y
984         help
985           delete_module, init_module
986           are used in linux for loadable kernel modules.
987
988           Say N if you do not use kernel modules.
989
990 config UCLIBC_LINUX_MODULE_24
991         bool "Linux kernel module functions (<2.6)"
992         depends on !TARGET_bfin && !TARGET_c6x
993         help
994           create_module, query_module
995           are used in linux (prior to 2.6) for loadable kernel modules.
996
997           Say N if you do not use kernel modules, or you only support
998           Linux 2.6+.
999
1000 config UCLIBC_LINUX_SPECIFIC
1001         bool "Linux specific functions"
1002         default y
1003         help
1004           accept4(), bdflush(),
1005           capget(), capset(), eventfd(), fstatfs(),
1006           inotify_*(), ioperm(), iopl(),
1007           madvise(), modify_ldt(), pipe2(), personality(),
1008           prctl()/arch_prctl(), pivot_root(), modify_ldt(),
1009           ppoll(), readahead(), reboot(), remap_file_pages(),
1010           sched_getaffinity(), sched_setaffinity(), sendfile(),
1011           setfsgid(), setfsuid(), setresgid(), setresuid(),
1012           splice(), vmsplice(), tee(), signalfd(), swapoff(), swapon(),
1013           sync_file_range(), _sysctl(), sysinfo(), timerfd_*(), vhangup(),
1014           umount(), umount2()
1015
1016 config UCLIBC_HAS_GNU_ERROR
1017         bool "Support GNU extensions for error-reporting"
1018         default y
1019         help
1020           Support for the GNU-specific error(), error_at_line(),
1021           void (* error_print_progname)(), error_message_count
1022           functions and variables.  Some GNU packages
1023           utilize these for extra useful output, but in general
1024           are not required.
1025
1026           If unsure, just answer N.
1027
1028 config UCLIBC_BSD_SPECIFIC
1029         bool "BSD specific functions"
1030         default y
1031         help
1032           mincore(), getdomainname(), setdomainname()
1033
1034           If unsure, say N.
1035
1036 config UCLIBC_HAS_BSD_ERR
1037         bool "BSD err functions"
1038         default y
1039         help
1040           These functions are non-standard BSD extensions.
1041           err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()
1042
1043           If unsure, say N.
1044
1045 config UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
1046         bool "BSD obsolete signal functions"
1047         help
1048           These functions are provided as a compatibility interface for
1049           programs that make use of the historical System V signal API.
1050           This API is obsolete:
1051           new applications should use the POSIX signal API (sigaction(2),
1052           sigprocmask(2), etc.).
1053           Affected functions:
1054
1055           sigset(), sighold(), sigrelse(), sigignore()
1056
1057           If unsure, say N.
1058
1059 config UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL
1060         bool "SYSV obsolete signal functions"
1061         help
1062           Use of sysv_signal() should be avoided; use sigaction(2) instead.
1063
1064           If unsure, say N.
1065
1066 config UCLIBC_NTP_LEGACY
1067         bool "ntp_*() aliases"
1068         help
1069           Provide legacy aliases for ntp functions:
1070           ntp_adjtime(), ntp_gettime()
1071
1072           It is safe to say N here.
1073
1074 config UCLIBC_SV4_DEPRECATED
1075         bool "Enable SVr4 deprecated functions"
1076         help
1077           These functions are DEPRECATED in System V release 4.
1078           Say N unless you desparately need one of the functions below:
1079
1080           ustat() [use statfs(2) in your code instead]
1081
1082 config UCLIBC_HAS_REALTIME
1083         bool "Realtime-related family of SUSv functions"
1084         default y
1085         help
1086           These functions are part of the Timers option and need not
1087           be available on all implementations.
1088           Includes AIO, message-queue, scheduler, semaphore functions:
1089
1090           aio.h
1091           mqueue.h
1092           sched.h
1093           semaphore.h
1094
1095           aio_cancel()
1096           aio_error()
1097           aio_fsync()
1098           aio_read()
1099           lio_listio()
1100           aio_return()
1101           aio_suspend()
1102           aio_write()
1103           clock_getres(), clock_gettime(), clock_settime()
1104           fdatasync()
1105           mlockall(), munlockall()
1106           mlock(), munlock()
1107           mq_close()
1108           mq_getattr()
1109           mq_notify()
1110           mq_open()
1111           mq_receive()
1112           mq_send()
1113           mq_setattr()
1114           mq_unlink()
1115           nanosleep()
1116           sched_getparam()
1117           sched_get_priority_max(), sched_get_priority_min()
1118           sched_getscheduler()
1119           sched_rr_get_interval()
1120           sched_setparam()
1121           sched_setscheduler()
1122           sem_close()
1123           sem_destroy()
1124           sem_getvalue()
1125           sem_init()
1126           sem_open()
1127           sem_post()
1128           sem_trywait(), sem_wait()
1129           sem_unlink()
1130           sigqueue()
1131           sigtimedwait(), sigwaitinfo()
1132           timer_create()
1133           timer_delete()
1134           timer_getoverrun(), timer_gettime(), timer_settime()
1135
1136 config UCLIBC_HAS_ADVANCED_REALTIME
1137         bool "Advanced realtime-related family of SUSv functions"
1138         default y
1139         depends on UCLIBC_HAS_REALTIME
1140         help
1141           These functions are part of the Timers option and need not
1142           be available on all implementations.
1143
1144           clock_getcpuclockid()
1145           clock_nanosleep()
1146           mq_timedreceive()
1147           mq_timedsend()
1148           posix_fadvise()
1149           posix_fallocate()
1150           posix_madvise()
1151           posix_memalign()
1152           posix_mem_offset()
1153           posix_spawnattr_destroy(), posix_spawnattr_init()
1154           posix_spawnattr_getflags(), posix_spawnattr_setflags()
1155           posix_spawnattr_getpgroup(), posix_spawnattr_setpgroup()
1156           posix_spawnattr_getschedparam(), posix_spawnattr_setschedparam()
1157           posix_spawnattr_getschedpolicy(), posix_spawnattr_setschedpolicy()
1158           posix_spawnattr_getsigdefault(), posix_spawnattr_setsigdefault()
1159           posix_spawnattr_getsigmask(), posix_spawnattr_setsigmask()
1160           posix_spawn_file_actions_addclose()
1161           posix_spawn_file_actions_adddup2()
1162           posix_spawn_file_actions_addopen()
1163           posix_spawn_file_actions_destroy()
1164           posix_spawn_file_actions_init()
1165           posix_spawn()
1166           posix_spawnp()
1167           posix_typed_mem_get_info()
1168           pthread_mutex_timedlock()
1169           sem_timedwait()
1170
1171 #config UCLIBC_HAS_TERMIOS
1172 #       bool "termios functions"
1173 #       default y
1174 #       help
1175 #         Get and set terminal attributes, line control, get and set baud
1176 #         rate.
1177 #         termios(), tcgetattr(), tcsetattr(), tcsendbreak(), tcdrain(),
1178 #         tcflush(), tcflow(), cfmakeraw(), cfgetospeed(), cfgetispeed(),
1179 #         cfsetispeed(), cfsetospeed(), cfsetspeed()
1180 #
1181 #         If unsure, say Y.
1182
1183 config UCLIBC_HAS_EPOLL
1184         bool "epoll"
1185         default y
1186         help
1187           epoll_create(), epoll_ctl(), epoll_wait() functions.
1188
1189 config UCLIBC_HAS_XATTR
1190         bool "Extended Attributes"
1191         default y
1192         help
1193           Extended Attributes support.
1194
1195           setxattr()
1196           lsetxattr()
1197           fsetxattr()
1198           getxattr()
1199           lgetxattr()
1200           fgetxattr()
1201           listxattr()
1202           llistxattr()
1203           flistxattr()
1204           removexattr()
1205           lremovexattr()
1206           fremovexattr()
1207
1208           Say N unless you need support for extended attributes and the
1209           filesystems do actually support them.
1210
1211 config UCLIBC_HAS_PROFILING
1212         bool "Profiling support"
1213         default y
1214         help
1215           gcc's -finstrument-functions needs these.
1216
1217           Most people can safely answer N.
1218
1219 config UCLIBC_HAS_CRYPT_IMPL
1220         bool "libcrypt support"
1221         default y
1222         help
1223           libcrypt contains crypt(), setkey() and encrypt()
1224
1225 config UCLIBC_HAS_SHA256_CRYPT_IMPL
1226         bool "libcrypt SHA256 support"
1227         depends on UCLIBC_HAS_CRYPT_IMPL
1228         help
1229           This adds support for SHA256 password hashing via the crypt() function.
1230           Say N here if you do not need SHA256 crypt support.
1231
1232 config UCLIBC_HAS_SHA512_CRYPT_IMPL
1233         bool "libcrypt SHA512 support"
1234         depends on UCLIBC_HAS_CRYPT_IMPL
1235         help
1236           This adds support for SHA512 password hashing via the crypt() function.
1237           Say N here if you do not need SHA512 crypt support.
1238
1239 config UCLIBC_HAS_CRYPT_STUB
1240         bool "libcrypt stubs"
1241         default y
1242         depends on !UCLIBC_HAS_CRYPT_IMPL
1243         help
1244           Standards mandate that crypt(3) provides a stub if it is unavailable.
1245           If you enable this option then stubs for
1246             crypt(), setkey() and encrypt()
1247           will be provided in a small libcrypt.
1248
1249 config UCLIBC_HAS_CRYPT
1250         def_bool y
1251         depends on UCLIBC_HAS_CRYPT_IMPL || UCLIBC_HAS_CRYPT_STUB
1252 endmenu
1253
1254 menuconfig UCLIBC_HAS_NETWORK_SUPPORT
1255         bool "Networking Support"
1256         default y
1257         help
1258           Say N here if you do not need network support.
1259
1260 if UCLIBC_HAS_NETWORK_SUPPORT
1261 config UCLIBC_HAS_SOCKET
1262         bool "Socket support"
1263         default y
1264         help
1265           If you want to include support for sockets then answer Y.
1266
1267 config UCLIBC_HAS_IPV4
1268         bool "IP version 4 support"
1269         default y
1270         select UCLIBC_HAS_SOCKET
1271         help
1272           If you want to include support for the Internet Protocol
1273           (IP version 4) then answer Y.
1274
1275           Most people will say Y.
1276
1277 config UCLIBC_HAS_IPV6
1278         bool "IP version 6 support"
1279         select UCLIBC_HAS_SOCKET
1280         help
1281           If you want to include support for the next version of the Internet
1282           Protocol (IP version 6) then answer Y.
1283
1284           Most people should answer N.
1285
1286 config UCLIBC_HAS_RPC
1287         bool "Remote Procedure Call (RPC) support"
1288         # RPC+socket-ipvX doesn't currently work.
1289         depends on UCLIBC_HAS_IPV4 || UCLIBC_HAS_IPV6
1290         help
1291           If you want to include RPC support, enable this.  RPC is rarely used
1292           for anything except for the NFS filesystem.  Unless you plan to use
1293           NFS, you can probably leave this set to N and save some space.
1294
1295           If you need to use NFS then you should answer Y.
1296
1297 config UCLIBC_HAS_FULL_RPC
1298         bool "Full RPC support"
1299         depends on UCLIBC_HAS_RPC
1300         default y if !HAVE_SHARED
1301         help
1302           Normally we enable just enough RPC support for things like rshd and
1303           nfs mounts to work.  If you find you need the rest of the RPC stuff,
1304           then enable this option.  Most people can safely answer N.
1305
1306 config UCLIBC_HAS_REENTRANT_RPC
1307         bool "Reentrant RPC support"
1308         depends on UCLIBC_HAS_RPC
1309         default y if !HAVE_SHARED
1310         help
1311           Most packages utilize the normal (non-reentrant) RPC functions, but
1312           some (like exportfs from nfs-utils) need these reentrant versions.
1313
1314           Most people can safely answer N.
1315
1316 config UCLIBC_USE_NETLINK
1317         bool "Use netlink to query interfaces"
1318         depends on UCLIBC_HAS_SOCKET
1319         help
1320           In newer versions of Linux (2.4.17+), support was added for querying
1321           network device information via netlink rather than the old style
1322           ioctl's.  Most of the time, the older ioctl style is sufficient (and
1323           it is smaller than netlink), but if you find that not all of your
1324           devices are being returned by the if_nameindex() function, you will
1325           have to use the netlink implementation.
1326
1327           Most people can safely answer N.
1328
1329 config UCLIBC_SUPPORT_AI_ADDRCONFIG
1330         bool "Support the AI_ADDRCONFIG flag"
1331         depends on UCLIBC_USE_NETLINK
1332         help
1333           The implementation of AI_ADDRCONFIG is aligned with the glibc
1334           implementation using netlink to query interfaces to find both
1335           ipv4 and ipv6 support. This is only needed if an application uses
1336           the AI_ADDRCONFIG flag.
1337
1338           Most people can safely answer N.
1339
1340 config UCLIBC_HAS_BSD_RES_CLOSE
1341         bool "Support res_close() (bsd-compat)"
1342         help
1343           Answer Y if you desperately want to support BSD compatibility in
1344           the network code.
1345
1346           Most people will say N.
1347
1348 config UCLIBC_HAS_COMPAT_RES_STATE
1349         bool "Use compatible but bloated _res"
1350         default y
1351         help
1352           Answer Y if you build network utilities and they muck with resolver
1353           internals a lot (_res global structure). uclibc does not use most
1354           of _res.XXX fields, and with this option OFF they won't even exist.
1355           Which will make e.g. dig build fail.
1356           Answering N saves around 400 bytes in bss.
1357
1358 config UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
1359         bool "Use extra compatible but extra bloated _res"
1360         help
1361           Answer Y if selecting UCLIBC_HAS_COMPAT_RES_STATE is not enough.
1362           As far as I can say, this should never be needed.
1363
1364 config UCLIBC_HAS_RESOLVER_SUPPORT
1365         bool "DNS resolver functions"
1366         select UCLIBC_HAS_COMPAT_RES_STATE
1367         depends on UCLIBC_HAS_IPV4 || UCLIBC_HAS_IPV6
1368         help
1369           Provide implementations for DNS resolver functions.
1370           In particular, the following functions will be added to the
1371           library:
1372
1373           ns_skiprr, ns_initparse, ns_parserr, ns_msg_getflag,
1374           res_mkquery, res_init, res_ninit, res_close, res_nclose
1375           res_query, res_search, res_querydomain,
1376           dn_expand, dn_comp,
1377           ns_name_uncompress, ns_name_ntop, ns_name_pton, ns_name_unpack,
1378           ns_name_pack, ns_name_compress, ns_name_skip, dn_skipname,
1379           ns_get16, ns_get32, ns_put16, ns_put32
1380
1381 config UCLIBC_HAS_LIBRESOLV_STUB
1382         bool "Provide libresolv stub"
1383         help
1384           Provide a dummy resolv library.
1385
1386 config UCLIBC_HAS_LIBNSL_STUB
1387         bool "Provide libnsl stub"
1388         help
1389           Provide a dummy nsl library.
1390
1391 endif
1392
1393
1394 menu "String and Stdio Support"
1395
1396 config UCLIBC_HAS_STRING_GENERIC_OPT
1397         bool "Use faster (but larger) generic string functions"
1398         default y
1399         help
1400           Answer Y to use the (tweaked) glibc generic string functions.
1401
1402           In general, they are faster (but 3-5K larger) than the base
1403           uClibc string functions which are optimized solely for size.
1404
1405           Many people will answer Y.
1406
1407 config UCLIBC_HAS_STRING_ARCH_OPT
1408         bool "Use arch-specific assembly string functions (where available)"
1409         default y
1410         help
1411           Answer Y to use any archtecture-specific assembly language string
1412           functions available for this target plaform.
1413
1414           Note that assembly implementations are not available for all string
1415           functions, so some generic (written in C) string functions may
1416           still be used.
1417
1418           These are small and fast, the only reason _not_ to say Y here is
1419           for debugging purposes.
1420
1421 config UCLIBC_HAS_CTYPE_TABLES
1422         bool "Use Table Versions Of 'ctype.h' Functions."
1423         default y
1424         help
1425           Answer Y to use table versions of the 'ctype.h' functions.
1426           While the non-table versions are often smaller when building
1427           statically linked apps, they work only in stub locale mode.
1428
1429           Most people will answer Y.
1430
1431 config UCLIBC_HAS_CTYPE_SIGNED
1432         bool "Support Signed Characters In 'ctype.h' Functions."
1433         depends on UCLIBC_HAS_CTYPE_TABLES
1434         default y
1435         help
1436           Answer Y to enable support for passing signed char values to
1437           the 'ctype.h' functions.  ANSI/ISO C99 and SUSv3 specify that
1438           these functions are only defined for unsigned char values and
1439           EOF.  However, glibc allows negative signed char values as well
1440           in order to support 'broken old programs'.
1441
1442           Most people will answer Y.
1443
1444 choice
1445         prompt "ctype argument checking"
1446         depends on UCLIBC_HAS_CTYPE_TABLES
1447         default UCLIBC_HAS_CTYPE_UNSAFE
1448         help
1449           Please select the invalid arg behavior you want for the 'ctype'
1450           functions.
1451
1452           The 'ctype' functions are now implemented using table lookups, with
1453           the arg being the index.  This can result in incorrect memory accesses
1454           or even segfaults for args outside of the allowed range.
1455
1456           NOTE: This only affects the 'ctype' _functions_.  It does not affect
1457           the macro implementations.
1458
1459 config UCLIBC_HAS_CTYPE_UNSAFE
1460         bool "Do not check -- unsafe"
1461
1462 config UCLIBC_HAS_CTYPE_CHECKED
1463         bool "Detect and handle appropriately"
1464
1465 config UCLIBC_HAS_CTYPE_ENFORCED
1466         bool "Issue a diagnostic and abort()"
1467
1468 endchoice
1469
1470
1471 config UCLIBC_HAS_WCHAR
1472         bool "Wide Character Support"
1473         help
1474           Answer Y to enable wide character support.  This will make uClibc
1475           much larger.  It is also currently required for locale support.
1476
1477           Most people will answer N.
1478
1479 config UCLIBC_HAS_LOCALE
1480         bool "Locale Support"
1481         select UCLIBC_HAS_WCHAR
1482         select UCLIBC_HAS_CTYPE_TABLES
1483         help
1484           uClibc now has full ANSI/ISO C99 locale support (except for
1485           wcsftime() and collating items in regex).  Be aware that enabling
1486           this option will make uClibc much larger.
1487
1488           Enabling UCLIBC_HAS_LOCALE with the default set of supported locales
1489           (169 UTF-8 locales, and 144 locales for other codesets) will enlarge
1490           uClibc by around 300k.  You can reduce this size by building your own
1491           custom set of locate data (see extra/locale/LOCALES for details).
1492
1493           uClibc's locale support is still under development.  For example,
1494           codesets using shift states are not currently supported.  Support is
1495           planned in the next iteration of locale support.
1496
1497           Answer Y to enable locale support.  Most people will answer N.
1498
1499 choice
1500
1501 prompt "Locale data"
1502         depends on UCLIBC_HAS_LOCALE
1503         default UCLIBC_BUILD_ALL_LOCALE
1504
1505 config UCLIBC_BUILD_ALL_LOCALE
1506         bool "All locales"
1507         depends on UCLIBC_HAS_LOCALE
1508         help
1509           This builds all the locales that are available on your
1510           host-box.
1511
1512 config UCLIBC_BUILD_MINIMAL_LOCALE
1513         bool "Only selected locales"
1514         depends on UCLIBC_HAS_LOCALE
1515         help
1516           If you do not need all locales that are available on your
1517           host-box, then set this to 'Y'.
1518
1519 config UCLIBC_PREGENERATED_LOCALE_DATA
1520         bool "Use Pre-generated Locale Data"
1521         depends on UCLIBC_HAS_LOCALE && !TARGET_metag
1522         help
1523           Use pre-built locale data.
1524
1525           Note that these pregenerated locales are sensitive to your
1526           target architecture (endianess, bitcount).
1527
1528           Saying N here is highly recommended.
1529
1530 endchoice
1531
1532 config UCLIBC_BUILD_MINIMAL_LOCALES
1533         string "locales to use"
1534         depends on UCLIBC_BUILD_MINIMAL_LOCALE
1535         default "en_US"
1536         help
1537           Space separated list of locales to use.
1538
1539           E.g.:
1540               en_US en_GB de_AT
1541           default:
1542               en_US
1543
1544 config UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA
1545         bool "Automagically Download the Pre-generated Locale Data (if necessary)"
1546         depends on UCLIBC_PREGENERATED_LOCALE_DATA
1547         help
1548           If you would like the build process to use 'wget' to automatically
1549           download the pregenerated locale data, enable this option.  Otherwise
1550           you will need to obtain the locale data yourself from:
1551                 http://www.uclibc.org/downloads/uClibc-locale-*.tgz
1552           and place the uClibc-locale-*.tgz tarball in the extra/locale/
1553           directory.
1554
1555           Note that the use of pregenerated locale data is discouraged.
1556
1557 config UCLIBC_HAS_XLOCALE
1558         bool "Extended Locale Support (experimental/incomplete)"
1559         depends on UCLIBC_HAS_LOCALE
1560         help
1561           Answer Y to enable extended locale support similar to that provided
1562           by glibc.  This is primarily intended to support libstd++
1563           functionality.
1564           However, it also allows thread-specific locale selection via
1565           uselocale().
1566
1567           Most people will answer N.
1568
1569 config UCLIBC_HAS_HEXADECIMAL_FLOATS
1570         bool "Support hexadecimal float notation"
1571         depends on UCLIBC_HAS_CTYPE_TABLES
1572         depends on UCLIBC_HAS_FLOATS
1573         help
1574           Answer Y to enable support for hexadecimal float notation in the
1575           (wchar and) char string to floating point conversion functions, as
1576            well as support for the %a and %A conversion specifiers in the
1577            *printf() and *scanf() functions.
1578
1579           Most people will answer N.
1580
1581 config UCLIBC_HAS_GLIBC_DIGIT_GROUPING
1582         bool "Support glibc's \"'\" flag for allowing locale-specific digit grouping"
1583         depends on UCLIBC_HAS_LOCALE
1584         depends on UCLIBC_HAS_FLOATS
1585         help
1586           Answer Y to enable support for glibc's \"'\" flag for allowing
1587           locale-specific digit grouping in base 10 integer conversions and
1588           appropriate floating point conversions in the *printf() and *scanf()
1589           functions.
1590
1591           Most people will answer N.
1592
1593 config UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING
1594         bool "Do not require digit grouping when the \"'\" flag is specified"
1595         depends on UCLIBC_HAS_GLIBC_DIGIT_GROUPING
1596         default y
1597         help
1598           Answer Y to make digit grouping optional when the \"'\" flag is
1599           specified.
1600           This is the standard glibc behavior.  If the initial string of digits
1601           exceeds the maximum group number, the input will be treated as a
1602           normal non-grouped number.
1603
1604           Most people will answer N.
1605
1606 config UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
1607         bool "Support glibc's register_printf_function() (glibc-compat)"
1608         depends on !USE_OLD_VFPRINTF
1609         help
1610           Answer Y to support glibc's register_printf_function() to allow an
1611           application to add its own printf conversion specifiers.
1612           parse_printf_format() is also enabled.
1613
1614           NOTE: Limits the number or registered specifiers to 10.
1615           NOTE: Requires new conversion specifiers to be ASCII
1616                 characters (0-0x7f).  This is to avoid problems with processing
1617                 format strings in locales with different multibyte conversions.
1618
1619           Most people will answer N.
1620
1621 config USE_OLD_VFPRINTF
1622         bool "Use the old vfprintf implementation"
1623         depends on !UCLIBC_HAS_WCHAR
1624         help
1625           Set to true to use the old vfprintf instead of the new.  This is
1626           roughly C89 compliant with some extensions, and is much smaller.
1627           However, it does not support wide chars, positional args, or glibc
1628           custom printf specifiers.
1629
1630           Most people will answer N.
1631
1632 config UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS
1633         int "Maximum number of positional args.  Either 0 or >= 9."
1634         depends on !USE_OLD_VFPRINTF
1635         default 9
1636         help
1637           Set the maximum number of positional args supported by the
1638           printf/scanf functions.  The Single Unix Specification Version 3
1639           requires a minimum value of 9.  Setting this to a value lower than
1640           9 will disable positional arg support and cause the NL_ARGMAX macro
1641           in limits.h to be #undef'd.
1642
1643           WARNING!  The workspace to support positional args is currently
1644                     allocated on the stack.  You probably don't want to set
1645                     this to too high a value.
1646
1647           Most people will answer 9.
1648
1649 choice
1650         prompt "Stdio buffer size"
1651         default UCLIBC_HAS_STDIO_BUFSIZ_4096
1652         help
1653           Please select a value for BUFSIZ.  This will be used by the
1654           stdio subsystem as the default buffer size for a file, and
1655           affects fopen(), setvbuf(), etc.
1656
1657           NOTE: Setting this to 'none' will disable buffering completely.
1658           However, BUFSIZ will still be defined in stdio.h as 256 because
1659           many applications use this value.
1660
1661 config UCLIBC_HAS_STDIO_BUFSIZ_NONE
1662         bool "none (WARNING - BUFSIZ will be 256 in stdio.h)"
1663         depends on !UCLIBC_HAS_WCHAR
1664
1665 config UCLIBC_HAS_STDIO_BUFSIZ_256
1666         bool "256 (minimum ANSI/ISO C99 value)"
1667
1668 config UCLIBC_HAS_STDIO_BUFSIZ_512
1669         bool "512"
1670
1671 config UCLIBC_HAS_STDIO_BUFSIZ_1024
1672         bool "1024"
1673
1674 config UCLIBC_HAS_STDIO_BUFSIZ_2048
1675         bool "2048"
1676
1677 config UCLIBC_HAS_STDIO_BUFSIZ_4096
1678         bool "4096"
1679
1680 config UCLIBC_HAS_STDIO_BUFSIZ_8192
1681         bool "8192"
1682
1683 # If you add more choices, you will need to update uClibc_stdio.h.
1684
1685 endchoice
1686
1687 choice
1688         prompt "Stdio builtin buffer size (uClibc-specific)"
1689         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1690         default UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
1691         help
1692           When a FILE is created with fopen(), an attempt is made to allocate
1693           a BUFSIZ buffer for it.  If the allocation fails, fopen() will still
1694           succeed but the FILE will be unbuffered.
1695
1696           This option adds a small amount of space to each FILE to act as an
1697           emergency buffer in the event of a buffer allocation failure.
1698
1699           Most people will answer None.
1700
1701 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
1702         bool "None"
1703
1704 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4
1705         bool "4"
1706
1707 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8
1708         bool "8"
1709
1710 # If you add more choices, you will need to update uClibc_stdio.h.
1711
1712 endchoice
1713
1714 config UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT
1715         bool "Attempt to shutdown stdio subsystem when abort() is called."
1716         help
1717           ANSI/ISO C99 requires abort() to be asyn-signal-safe.  So there was
1718           a behavioral change made in SUSv3.  Previously, abort() was required
1719           to have the affect of fclose() on all open streams.  The wording has
1720           been changed to "may" from "shall".
1721
1722           Most people will answer N.
1723
1724 config UCLIBC_HAS_STDIO_GETC_MACRO
1725         bool "Provide a macro version of getc()"
1726         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1727         default y
1728         help
1729           Provide a macro version of getc().
1730
1731           Most people will answer Y.
1732
1733 config UCLIBC_HAS_STDIO_PUTC_MACRO
1734         bool "Provide a macro version of putc()"
1735         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1736         default y
1737         help
1738           Provide a macro version of putc().
1739
1740           Most people will answer Y.
1741
1742 config UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION
1743         bool "Support auto-r/w transition"
1744         default y
1745         help
1746           Answer Y to enable the stdio subsystem to automaticly transition
1747           between reading and writing.  This relaxes the ANSI/ISO C99
1748           requirement:
1749
1750           When a file is opened with update mode ('+' as the second or third
1751           character in the list of mode argument values), both input and output
1752           may be performed on the associated stream. However, output shall not
1753           be directly followed by input without an intervening call to the
1754           fflush function or to a file positioning function (fseek, fsetpos,
1755           or rewind), and input shall not be directly followed by output without
1756           an intervening call to a file positioning function, unless the input
1757           operation encounters end­of­file.
1758
1759           Most people will answer Y.
1760
1761 config UCLIBC_HAS_FOPEN_LARGEFILE_MODE
1762         bool "Support an fopen() 'F' flag for large file mode (uClibc-specific)"
1763         depends on UCLIBC_HAS_LFS
1764         help
1765           Answer Y to enable a uClibc-specific extension to allow passing an
1766           additional 'F' flag in the mode string for fopen() to specify that
1767           the file should be open()ed with the O_LARGEFILE flag set.
1768
1769           Most people will answer N.
1770
1771 config UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
1772         bool "Support an fopen() 'x' flag for exclusive mode (glibc-compat)"
1773         help
1774           Answer Y to support a glibc extension to allow passing
1775           additional 'x' flag in the mode string for fopen() to specify that
1776           the file should be open()ed with the O_EXCL flag set.
1777
1778           Most people will answer N.
1779
1780 config UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
1781         bool "Support an fopen() 'e' flag for close-on-exec mode (glibc-compat)"
1782         help
1783           Answer Y to support a glibc extension to allow passing
1784           additional 'e' flag in the mode string for fopen() to specify that
1785           the file should be open()ed with the O_CLOEXEC flag set.
1786
1787           Most people will answer N.
1788
1789 config UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
1790         bool "Support fmemopen(), open_memstream(), and fopencookie() (glibc-compat)"
1791         help
1792           Answer Y to support the glibc 'custom stream' extension functions
1793           fmemopen(), open_memstream(), and fopencookie().
1794
1795           NOTE: There are some minor differences regarding seeking behavior.
1796
1797           Most people will answer N.
1798
1799 config UCLIBC_HAS_PRINTF_M_SPEC
1800         bool "Support the '%m' specifier in printf format strings (glibc-compat)"
1801         help
1802           Answer Y to support a glibc extension to interpret '%m' in printf
1803           format strings as an instruction to output the error message string
1804           (as generated by strerror) corresponding to the current value of
1805           'errno'.
1806
1807           Most people will answer N.
1808
1809 config UCLIBC_HAS_ERRNO_MESSAGES
1810         bool "Include the errno message text in the library"
1811         default y
1812         help
1813           Answer Y if you want to include the errno message text in the
1814           library.  This adds about 3K to the library, but enables strerror()
1815           to generate text other than 'Unknown error <number>'.
1816
1817           Most people will answer Y.
1818
1819 config UCLIBC_HAS_SYS_ERRLIST
1820         bool "Support sys_errlist[] (obsolete-compat)"
1821         depends on UCLIBC_HAS_ERRNO_MESSAGES
1822         help
1823           Answer Y if you want to support the obsolete sys_errlist[].
1824           This adds about 0.5k to the library, except for the mips
1825           arch where it adds over 4K.
1826
1827           WARNING!  In the future, support for sys_errlist[] may be unavailable
1828                     in at least some configurations.  In fact, it may be removed
1829                     altogether.
1830
1831           Most people will answer N.
1832
1833           Application writers: use the strerror(3) function.
1834
1835 config UCLIBC_HAS_SIGNUM_MESSAGES
1836         bool "Include the signum message text in the library"
1837         default y
1838         help
1839           Answer Y if you want to include the signum message text in the
1840           library.  This adds about 0.5K to the library, but enables strsignal()
1841           to generate text other than 'Unknown signal <number>'.
1842
1843           Most people will answer Y.
1844
1845 config UCLIBC_HAS_SYS_SIGLIST
1846         bool "Support sys_siglist[] (bsd-compat)"
1847         depends on UCLIBC_HAS_SIGNUM_MESSAGES
1848         help
1849           Answer Y if you want to support sys_siglist[].
1850
1851           WARNING!  In the future, support for sys_siglist[] may be unavailable
1852                     in at least some configurations.  In fact, it may be removed
1853                     altogether.
1854
1855           Most people will answer N.
1856
1857 config UCLIBC_HAS_GETTEXT_AWARENESS
1858         bool "Include gettext awareness"
1859         depends on UCLIBC_HAS_LOCALE && UCLIBC_MJN3_ONLY
1860         help
1861           NOTE!!!  Not yet integrated with strerror and strsignal.  NOTE!!!
1862
1863           Answer Y if you want to include weak stub gettext support and
1864           make the *strerror*() and strsignal() functions gettext-aware.
1865
1866           Currently, to get functional gettext functionality you will need
1867           to use gnu gettext.
1868
1869           Most people will answer N.
1870
1871 config UCLIBC_HAS_GNU_GETOPT
1872         bool "Support gnu getopt"
1873         default y
1874         help
1875           Answer Y if you want to include full gnu getopt() instead of a
1876           (much smaller) SUSv3 compatible getopt().
1877
1878           Most people will answer Y.
1879
1880 config UCLIBC_HAS_STDIO_FUTEXES
1881         bool "Use futexes for multithreaded I/O locking"
1882         depends on UCLIBC_HAS_THREADS_NATIVE
1883         help
1884           If you want to compile uClibc to use futexes for low-level
1885           I/O locking, answer Y.  Otherwise, answer N.
1886
1887 config UCLIBC_HAS_GETOPT_LONG
1888         bool "Support getopt_long/getopt_long_only"
1889         depends on !UCLIBC_HAS_GNU_GETOPT
1890         default y
1891         help
1892           Answer Y if you want to include getopt_long[_only() used by many
1893           apps, even busybox.
1894
1895           Most people will answer Y.
1896
1897 config UCLIBC_HAS_GNU_GETSUBOPT
1898         bool "Support glibc getsubopt"
1899         default y
1900         help
1901           Answer Y if you want to include glibc getsubopt() instead of a
1902           smaller SUSv3 compatible getsubopt().
1903
1904           Most people will answer Y.
1905 endmenu
1906
1907
1908 menu "Big and Tall"
1909
1910 config UCLIBC_HAS_REGEX
1911         bool "Regular Expression Support"
1912         default y
1913         help
1914           POSIX regular expression code is really big -- 53k all by itself.
1915           If you don't use regular expressions, turn this off and save space.
1916           Of course, if you only statically link, leave this on, since it will
1917           only be included in your apps if you use regular expressions.
1918
1919 config UCLIBC_HAS_REGEX_OLD
1920         bool "Use the older (stable) regular expression code"
1921         depends on UCLIBC_HAS_REGEX
1922         default y
1923         help
1924           There are two versions of regex.  The older (stable) version has
1925           been in uClibc for quite a long time but hasn't seen too many
1926           updates.  It also has some known issues when dealing with uncommon
1927           corner cases and multibyte/unicode strings.  However, it is quite
1928           a bit smaller than the newer version.
1929
1930           If the older version has worked for you and you don't need unicode
1931           support, then stick with the old version (and say Y here).
1932           Otherwise, you should use the new version (and say N here).
1933
1934 config UCLIBC_HAS_FNMATCH
1935         bool "fnmatch Support"
1936         default y
1937         help
1938           POSIX fnmatch.
1939
1940 config UCLIBC_HAS_FNMATCH_OLD
1941         bool "Use the older (stable) fnmatch code"
1942         depends on UCLIBC_HAS_FNMATCH
1943         default y
1944         help
1945           There are two versions of fnmatch.  The older (stable) version has
1946           been in uClibc for quite a long time but hasn't seen too many
1947           updates.  It also has some known issues when dealing with uncommon
1948           corner cases and multibyte/unicode strings.  However, it is quite
1949           a bit smaller than the newer version.
1950
1951           If the older version has worked for you and you don't need unicode
1952           support, then stick with the old version (and say Y here).
1953           Otherwise, you should use the new version (and say N here).
1954
1955 config UCLIBC_HAS_WORDEXP
1956         bool "Support the wordexp() interface"
1957         depends on UCLIBC_HAS_GLOB
1958         help
1959           The SuSv3 wordexp() interface performs word expansions per the  Shell
1960           and Utilities volume of IEEE Std 1003.1-2001, Section 2.6.  It is
1961           intended for use by applications that want to implement all of the
1962           standard Bourne shell expansions on input data.
1963
1964           This interface is rarely used, and very large.  Unless you have a
1965           pressing need for wordexp(), you should probably answer N.
1966
1967 config UCLIBC_HAS_NFTW
1968         bool "Support the nftw() interface"
1969         help
1970           The SuSv3 nftw() interface is used to recursively descend
1971           directory paths while repeatedly calling a function.
1972
1973           This interface is rarely used, and adds around 4.5k.  Unless you have
1974           a pressing need for nftw(), you should probably answer N.
1975
1976 config UCLIBC_HAS_FTW
1977         bool "Support the ftw() interface (SUSv4-obsolete)"
1978         depends on UCLIBC_SUSV4_LEGACY
1979         help
1980           The SuSv3 ftw() interface is used to recursively descend
1981           directory paths while repeatedly calling a function.
1982
1983           This interface is rarely used, and adds around 4.5k.  Unless you have
1984           a pressing need for ftw(), you should probably answer N.
1985
1986 config UCLIBC_HAS_FTS
1987         bool "Support the fts() interface (bsd-compat)"
1988         help
1989           The fts functions are provided for traversing UNIX file hierarchies.
1990
1991           This interface is currently used by the elfutils and adds
1992           around 7.5k.
1993           You should port your application to use the POSIX nftw()
1994           interface.
1995
1996           Unless you need to build/use elfutils, you should prolly answer N.
1997
1998 config UCLIBC_HAS_GLOB
1999         bool "Support the glob() interface"
2000         depends on UCLIBC_HAS_FNMATCH
2001         default y
2002         help
2003
2004           The glob interface is somewhat large (weighing in at about 2,5k).  It
2005           is used fairly often, but is an option since people wanting to go for
2006           absolute minimum size may wish to omit it.
2007
2008           Most people will answer Y.
2009
2010 config UCLIBC_HAS_GNU_GLOB
2011         bool "Support gnu glob() interface"
2012         depends on UCLIBC_HAS_GLOB
2013         help
2014           The gnu glob interface is somewhat larger (weighing in at about 4,2k)
2015           than it's SuSv3 counterpart (and is out of date). It is an old copy
2016           from glibc and does not support all the GNU specific options.
2017
2018           Answer Y if you want to include full gnu glob() instead of the smaller
2019           SUSv3 compatible glob().
2020
2021           Most people will answer N.
2022
2023 config UCLIBC_HAS_UTMPX
2024        bool "utmpx based support for tracking login/logouts to/from the system"
2025        help
2026          Answer y to enable support for accessing user accounting database.
2027          It can be used to track all login/logout to the system.
2028
2029          If unsure, just answer N.
2030
2031 endmenu
2032
2033
2034
2035
2036 menu "Library Installation Options"
2037
2038 config RUNTIME_PREFIX
2039         string "uClibc runtime library directory"
2040         default "/usr/$(TARGET_ARCH)-linux-uclibc/"
2041         help
2042           RUNTIME_PREFIX is the directory into which the uClibc runtime
2043           libraries will be installed.   The result will look something
2044           like the following:
2045               $(RUNTIME_PREFIX)/
2046                   lib/            <contains all runtime libraries>
2047                   usr/bin/ldd     <the ldd utility program>
2048                   sbin/ldconfig   <the ldconfig utility program>
2049           This value is used by the 'make install' Makefile target.  Since this
2050           directory is compiled into the shared library loader, you will need to
2051           recompile uClibc if you change this value...
2052
2053           For a typical target system this should be set to "/", such that
2054           'make install' will install /lib/libuClibc-<VERSION>.so
2055
2056 config DEVEL_PREFIX
2057         string "uClibc development environment directory"
2058         default "/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
2059         help
2060           DEVEL_PREFIX is the directory into which the uClibc development
2061           environment will be installed.   The result will look something
2062           like the following:
2063               $(DEVEL_PREFIX)/
2064                   lib/            <contains static libs>
2065                   include/        <Where all the header files go>
2066           This value is used by the 'make install' Makefile target when
2067           installing a uClibc development environment.
2068
2069           For a typical target system this should be set to "/usr", such that
2070           'make install' will install /usr/include/<header files>.
2071
2072 config MULTILIB_DIR
2073         string "library path component"
2074         default "lib"
2075         help
2076           Path component where libraries reside.
2077
2078           For a typical target system this should be set to "lib", such that
2079           'make install' will install libraries to "/lib" and "/usr/lib"
2080           respectively
2081             DEVEL_PREFIX/MULTILIB_DIR
2082             RUNTIME_PREFIX/MULTILIB_DIR
2083
2084           Other settings may include "lib32" or "lib64".
2085
2086 config HARDWIRED_ABSPATH
2087         bool "Hardwire absolute paths into linker scripts"
2088         default y
2089         help
2090           This prepends absolute paths to the libraries mentioned in linker
2091           scripts such as libc.so.
2092
2093           This is a build time optimization.  It has no impact on dynamic
2094           linking at runtime, which doesn't use linker scripts.
2095
2096           You must disable this to use uClibc with old non-sysroot toolchains,
2097           such as the prebuilt binary cross compilers at:
2098              http://uclibc.org/downloads/binaries
2099
2100           The amount of time saved by this optimization is actually too small to
2101           measure. The linker just had to search the library path to find the
2102           linker script, so the dentries are cache hot if it has to search the
2103           same path again.  But it's what glibc does, so we do it too.
2104
2105 endmenu
2106
2107
2108 menu "Security options"
2109
2110 config UCLIBC_BUILD_PIE
2111         bool "Build utilities as ET_DYN/PIE executables"
2112         depends on HAVE_SHARED
2113         depends on TARGET_arm || TARGET_frv || TARGET_i386 || TARGET_mips || TARGET_powerpc
2114         select FORCE_SHAREABLE_TEXT_SEGMENTS
2115         help
2116           If you answer Y here, ldd and iconv are built as ET_DYN/PIE
2117           executables.
2118
2119           It requires gcc-3.4 and binutils-2.15 (for arm 2.16) or later.
2120           More about ET_DYN/PIE binaries on <http://pax.grsecurity.net/> .
2121
2122           WARNING: This option also enables FORCE_SHAREABLE_TEXT_SEGMENTS, so
2123                    all libraries have to be built with -fPIC or -fpic, and all
2124                    assembler functions must be written as position independent
2125                    code (PIC).
2126
2127 config UCLIBC_HAS_ARC4RANDOM
2128         bool "Include the arc4random() function"
2129         help
2130           Answer Y to support the OpenBSD-like arc4random() function. This
2131           function picks a random number between 0 and N, and will always return
2132           something even if the random driver is dead. If urandom fails then
2133           gettimeofday(2) will be used as the random seed. This function is
2134           designed to be more dependable than invoking /dev/urandom directly.
2135           OpenSSL and OpenNTPD currently support this function.
2136
2137           Most people will answer N.
2138
2139 config ARC4RANDOM_USES_NODEV
2140         bool "Do not use /dev/urandom with arc4random()"
2141         depends on UCLIBC_HAS_ARC4RANDOM
2142         help
2143           Answer Y to use gettimeofday(2) and getpid(2) exclusively for
2144           arc4random(). This is not a bad idea for a diskless system, but
2145           it uses a lot of syscalls to stir each array element.
2146
2147           Most people will answer N.
2148
2149 config HAVE_NO_SSP
2150         bool
2151
2152 config UCLIBC_HAS_SSP
2153         bool "Support for GCC stack smashing protector"
2154         depends on !HAVE_NO_SSP
2155         help
2156           Add code to support GCC's -fstack-protector[-all] option to uClibc.
2157           This requires GCC 4.1 or newer.  GCC does not have to provide libssp,
2158           the needed functions are added to ldso/libc instead.
2159
2160           GCC's stack protector is a reimplementation of IBM's propolice.
2161           See http://www.trl.ibm.com/projects/security/ssp/ and
2162           http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
2163           for details.
2164
2165           Note that NOEXECSTACK on a kernel with address space randomization
2166           is generally sufficient to prevent most buffer overflow exploits
2167           without increasing code size.  This option essentially adds debugging
2168           code to catch them.
2169
2170           Most people will answer N.
2171
2172 config UCLIBC_HAS_SSP_COMPAT
2173         bool "Support for gcc-3.x propolice smashing stack protector"
2174         depends on UCLIBC_HAS_SSP
2175         help
2176           Add gcc-3.x propolice smashing stack protector to the library.
2177
2178           This requires a patched version of GCC, supporting the
2179           -fstack-protector[-all] options, with the __guard and
2180           __stack_smash_handler functions removed from libgcc.
2181           These functions are added to ldso/libc instead.
2182
2183           More information at:
2184           <http://www.research.ibm.com/trl/projects/security/ssp/>
2185
2186           Most people will answer N.
2187
2188 config SSP_QUICK_CANARY
2189         bool "Use simple guard values without accessing /dev/urandom"
2190         depends on UCLIBC_HAS_SSP
2191         help
2192           Use gettimeofday(2) to define the __guard without accessing
2193           /dev/urandom.
2194           WARNING: This makes smashing stack protector vulnerable to timing
2195                 attacks.
2196           Most people will answer N.
2197
2198 choice
2199         prompt "Propolice protection blocking signal"
2200         depends on UCLIBC_HAS_SSP
2201         depends on DODEBUG
2202         default PROPOLICE_BLOCK_SEGV
2203         help
2204           "abort" use SIGABRT to block offending programs.
2205           This is the default implementation.
2206
2207           "segfault" use SIGSEGV to block offending programs.
2208           Use this for debugging.
2209
2210           If unsure, answer "abort".
2211
2212 config PROPOLICE_BLOCK_ABRT
2213         bool "abort"
2214
2215 config PROPOLICE_BLOCK_SEGV
2216         bool "segfault"
2217
2218 endchoice
2219
2220 config UCLIBC_BUILD_SSP
2221         bool "Build uClibc with -fstack-protector"
2222         depends on UCLIBC_HAS_SSP
2223         help
2224           Build all uClibc libraries and executables with -fstack-protector,
2225           adding extra stack overflow checking to most uClibc functions.
2226
2227 config UCLIBC_BUILD_RELRO
2228         bool "Build uClibc with linker option -z RELRO"
2229         depends on HAVE_SHARED
2230         default y
2231         help
2232           Build all libraries and executables with "ld -z relro".
2233
2234           This tells the linker to mark chunks of an executable or shared
2235           library read-only after applying dynamic relocations.  (This comes
2236           up when a global const variable is initialized to the address of a
2237           function or the value of another global variable.)
2238
2239           This is a fairly obscure option the ld man page doesn't even bother
2240           to document properly.  It's a security paranoia issue that's more
2241           likely to consume memory (by allocating an extra page) rather than
2242           save it.
2243
2244           This is explained in more depth at
2245           http://www.airs.com/blog/archives/189
2246
2247           Nobody is likely to care whether you say Y or N here.
2248
2249 config UCLIBC_BUILD_NOW
2250         bool "Build uClibc with linker option -z NOW"
2251         depends on HAVE_SHARED
2252         help
2253           Build all libraries and executables with "ld -z now".
2254
2255           This tells the linker to resolve all symbols when the library is
2256           first loaded, rather than when each function is first called.  This
2257           increases start-up latency by a few microseconds and may do
2258           unnecessary work (resolving symbols that are never used), but the
2259           realtime people like it for making microbenchmark timings slightly
2260           more predictable and in some cases it can be slightly faster due to
2261           CPU cache behavior (not having to fault the linker back in to do
2262           lazy symbol resolution).
2263
2264           Most people can't tell the difference between selecting Y or N here.
2265
2266 config UCLIBC_BUILD_NOEXECSTACK
2267         bool "Build uClibc with noexecstack marking"
2268         default y
2269         help
2270           Mark all assembler files as noexecstack, which will mark uClibc
2271           as not requiring an executable stack.  (This doesn't prevent other
2272           files you link against from claiming to need an executable stack, it
2273           just won't cause uClibc to request it unnecessarily.)
2274
2275           This is a security thing to make buffer overflows harder to exploit.
2276           By itself, it's kind of useless, as Linus Torvalds explained in 1998:
2277           http://old.lwn.net/1998/0806/a/linus-noexec.html
2278
2279           It only actually provides any security when combined with address
2280           space randomization, explained here: http://lwn.net/Articles/121845/
2281
2282           Address space randomization is on by default in current linux
2283           kernels (although it can be disabled using the option
2284           CONFIG_COMPAT_BRK).
2285
2286           You should probably say Y.
2287
2288 endmenu
2289
2290 menu "Development/debugging options"
2291
2292 config CROSS_COMPILER_PREFIX
2293         string "Cross-compiling toolchain prefix"
2294         default ""
2295         help
2296           The prefix used to execute your cross-compiling toolchain.  For
2297           example, if you run 'arm-linux-uclibc-gcc' to compile something,
2298           then enter 'arm-linux-uclibc-' here.
2299
2300 config UCLIBC_EXTRA_CFLAGS
2301         string "Extra CFLAGS"
2302         default ""
2303         help
2304           Add any additional CFLAGS to be used to build uClibc.
2305
2306 config DODEBUG
2307         bool "Enable debugging symbols"
2308         select EXTRA_WARNINGS
2309         help
2310           Say Y here if you wish to compile uClibc with debugging symbols.
2311           This will allow you to use a debugger to examine uClibc internals
2312           while applications are running.  This increases the size of the
2313           library considerably and should only be used when doing development.
2314           If you are doing development and want to debug uClibc, answer Y.
2315
2316           Otherwise, answer N.
2317
2318 config DODEBUG_PT
2319         bool "Build pthread with debugging output"
2320         depends on UCLIBC_HAS_THREADS && LINUXTHREADS_OLD
2321         help
2322           Enable debug output in libpthread.  This is only useful when doing
2323           development in libpthread itself.
2324
2325           Otherwise, answer N.
2326
2327 config DOSTRIP
2328         bool "Strip libraries and executables"
2329         default y
2330         depends on !DODEBUG
2331         help
2332           Say Y here if you do wish to strip all uClibc libraries and
2333           executables.  No stripping increases the size of the binaries
2334           considerably, but makes it possible to debug uClibc libraries.
2335           Most people will answer Y.
2336
2337 config DOASSERTS
2338         bool "Build with run-time assertion testing"
2339         help
2340           Say Y here to include runtime assertion tests.
2341           This enables runtime assertion testing in some code, which can
2342           increase the size of the library and incur runtime overhead.
2343           If you say N, then this testing will be disabled.
2344
2345 config SUPPORT_LD_DEBUG
2346         bool "Build the shared library loader with debugging support"
2347         depends on HAVE_SHARED
2348         help
2349           Answer Y here to enable all the extra code needed to debug the uClibc
2350           native shared library loader.  The level of debugging noise that is
2351           generated depends on the LD_DEBUG environment variable...  Just set
2352           LD_DEBUG to something like: 'LD_DEBUG=token1,token2,..  prog' to
2353           debug your application.  Diagnostic messages will then be printed to
2354           the stderr.
2355
2356           For now these debugging tokens are available:
2357             detail        provide more information for some options
2358             move          display copy processing
2359             symbols       display symbol table processing
2360             reloc         display relocation processing; detail shows the
2361                           relocation patch
2362             nofixups      never fixes up jump relocations
2363             bindings      displays the resolve processing (function calls);
2364                           detail shows the relocation patch
2365             all           Enable everything!
2366
2367           The additional environment variable:
2368             LD_DEBUG_OUTPUT=file
2369           redirects the diagnostics to an output file created using
2370           the specified name and the process id as a suffix.
2371
2372           An excellent start is simply:
2373             $ LD_DEBUG=binding,move,symbols,reloc,detail ./appname
2374           or to log everything to a file named 'logfile', try this
2375             $ LD_DEBUG=all LD_DEBUG_OUTPUT=logfile ./appname
2376
2377           If you are doing development and want to debug uClibc's shared library
2378           loader, answer Y.  Mere mortals answer N.
2379
2380 config SUPPORT_LD_DEBUG_EARLY
2381         bool "Build the shared library loader with early debugging support"
2382         depends on HAVE_SHARED
2383         help
2384           Answer Y here to if you find the uClibc shared library loader is
2385           crashing or otherwise not working very early on.  This is typical
2386           only when starting a new port when you haven't figured out how to
2387           properly get the values for argc, argv, environ, etc.  This method
2388           allows a degree of visibility into the very early shared library
2389           loader initialization process.  If you are doing development and want
2390           to debug the uClibc shared library loader early initialization,
2391           answer Y.  Mere mortals answer N.
2392
2393 config UCLIBC_MALLOC_DEBUGGING
2394         bool "Build malloc with debugging support"
2395         depends on MALLOC || MALLOC_STANDARD
2396         select DOASSERTS
2397         help
2398           Answer Y here to compile extra debugging support code into malloc.
2399           Malloc debugging output may then be enabled at runtime using the
2400           MALLOC_DEBUG environment variable.
2401
2402           The value of MALLOC_DEBUG should be an integer, which is interpreted
2403           as a bitmask with the following bits:
2404                   1   -  do extra consistency checking
2405                   2   -  output messages for malloc/free calls and OS
2406                          allocation calls
2407                   4   -  output messages for the `MMB' layer
2408                   8   -  output messages for internal malloc heap manipulation
2409                          calls
2410
2411           Because this increases the size of malloc appreciably (due to strings
2412           etc), you should say N unless you need to debug a malloc problem.
2413
2414 config UCLIBC_HAS_BACKTRACE
2415         bool "Add support for application self-debugging"
2416         depends on HAVE_SHARED
2417         help
2418           Answer Y here to compile support for application self-debugging, by adding
2419           a new shared object "libubacktrace.so" that provides the following new
2420           functions:
2421           backtrace, backtrace_symbols, backtrace_symbols_fd
2422
2423           The backtrace functionality is currently supported on SH platform, and it
2424           based on dwarf2 informations to properly work, so any application that
2425           want to use backtrace needs to be built with -fexceptions flag.
2426
2427           The symbol names may be unavailable without the use of special linker
2428           options. For systems using the GNU linker, it is necessary to use the
2429           -rdynamic linker option too. Note that names of "static" functions are not
2430           exposed, and won't be available in the backtrace.
2431
2432 config WARNINGS
2433         string "Compiler Warnings"
2434         default "-Wall"
2435         help
2436           Set this to the set of compiler warnings you wish to see while compiling.
2437
2438 config EXTRA_WARNINGS
2439         bool "Enable extra annoying warnings"
2440         help
2441           If you wish to build with extra warnings enabled, say Y here.
2442
2443 config DOMULTI
2444         bool "Compile all sources at once into an object"
2445         help
2446           Set this to compile all sources at once into an object (IMA).
2447           This mode of compilation uses alot of memory but may produce
2448           smaller binaries.
2449
2450           Note that you need a very recent GCC for this to work, like
2451           gcc >= 4.3 plus eventually some patches.
2452
2453           If unsure, keep the default of N.
2454
2455 config UCLIBC_MJN3_ONLY
2456         bool "Manuel's hidden warnings"
2457         help
2458           Answer Y here to see all Manuel's personal notes, warnings, and todos.
2459
2460           Most people will answer N.
2461
2462 endmenu