OSDN Git Service

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