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