OSDN Git Service

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