remove libresolv stub
[uclibc-ng.git] / extra / Configs / Config.in
blobb1ca3fac84fff460c76c90bf9a131506885819af
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_metag
504         help
505           If you want to compile uClibc with Linuxthreads support, then answer Y.
507 config UCLIBC_HAS_THREADS_NATIVE
508         bool "Native POSIX Threading (NPTL)"
509         select UCLIBC_HAS_TLS
510         select UCLIBC_HAS_STDIO_FUTEXES
511         select UCLIBC_HAS_REALTIME
512         # i386 has no lowlevellock support (yet) as opposed to i486 onward
513         depends on !CONFIG_386 && \
514                    !TARGET_alpha && \
515                    !TARGET_avr32 && \
516                    !TARGET_bfin && \
517                    !TARGET_c6x && \
518                    !TARGET_cris && \
519                    !TARGET_frv && \
520                    !TARGET_h8300 && \
521                    !TARGET_hppa && \
522                    !TARGET_ia64 && \
523                    !TARGET_m68k && \
524                    !TARGET_nds32 && \
525                    !TARGET_or1k && \
526                    ARCH_USE_MMU
527         help
528           If you want to compile uClibc with NPTL support, then answer Y.
530 endchoice
532 config UCLIBC_HAS_THREADS
533         def_bool y if !HAS_NO_THREADS
535 config UCLIBC_HAS_TLS
536         bool "Thread-Local Storage"
537         depends on UCLIBC_HAS_THREADS_NATIVE
538         help
539           If you want to enable TLS support then answer Y.
540           This is fast an efficient way to store per-thread local data
541           which is not on stack. It needs __thread support enabled in
542           gcc.
544 config PTHREADS_DEBUG_SUPPORT
545         bool "Build pthreads debugging support"
546         depends on UCLIBC_HAS_THREADS
547         help
548           Say Y here if you wish to be able to debug applications that use
549           uClibc's pthreads library.  By enabling this option, a library
550           named libthread_db will be built.  This library will be dlopen()'d
551           by gdb and will allow gdb to debug the threads in your application.
553           IMPORTANT NOTE!  Because gdb must dlopen() the libthread_db library,
554           you must compile gdb with uClibc in order for pthread debugging to
555           work properly.
557           If you are doing development and want to debug applications using
558           uClibc's pthread library, answer Y.  Otherwise, answer N.
561 config UCLIBC_HAS_SYSLOG
562         bool "Syslog support"
563         default y
564         depends on UCLIBC_HAS_NETWORK_SUPPORT
565         select UCLIBC_HAS_SOCKET
566         help
567           Support sending messages to the system logger.
568           This requires socket-support.
570 choice
571         prompt "Malloc Implementation"
572         default MALLOC if ! ARCH_USE_MMU
573         default MALLOC_STANDARD if ARCH_USE_MMU
575 config MALLOC
576         bool "malloc"
577         help
578           "malloc" use mmap for all allocations and so works very well on
579           MMU-less systems that do not support the brk() system call.   It is
580           pretty smart about reusing already allocated memory, and minimizing
581           memory wastage.
582           This is the default for uClinux MMU-less systems.
584 config MALLOC_SIMPLE
585         bool "malloc-simple"
586         help
587           "malloc-simple" is trivially simple and slow as molasses.  It
588           was written from scratch for uClibc, and is the simplest possible
589           (and therefore smallest) malloc implementation.
591           This uses only the mmap() system call to allocate and free memory,
592           and does not use the brk() system call at all, making it a fine
593           choice for MMU-less systems with very limited memory.  It's 100%
594           standards compliant, thread safe, very small, and releases freed
595           memory back to the OS immediately rather than keeping it in the
596           process's heap for reallocation.  It is also VERY SLOW.
598 config MALLOC_STANDARD
599         bool "malloc-standard"
600         depends on ARCH_USE_MMU
601         help
602           "malloc-standard" is derived from the public domain dlmalloc
603           implementation by Doug Lea.  It is quite fast, and is pretty smart
604           about reusing already allocated memory, and minimizing memory
605           wastage.  This uses brk() for small allocations, while using mmap()
606           for larger allocations.  This is the default malloc implementation
607           for uClibc.
609           If unsure, answer "malloc-standard".
611 endchoice
613 config MALLOC_GLIBC_COMPAT
614         bool "Malloc returns live pointer for malloc(0)"
615         help
616           The behavior of malloc(0) is listed as implementation-defined by
617           SuSv3.  Glibc returns a valid pointer to something, while uClibc
618           normally returns NULL.  I personally feel glibc's behavior is
619           not particularly safe, and allows buggy applications to hide very
620           serious problems.
622           When this option is enabled, uClibc will act just like glibc, and
623           return a live pointer when someone calls malloc(0).  This pointer
624           provides a malloc'ed area with a size of 1 byte.  This feature is
625           mostly useful when dealing with applications using autoconf's broken
626           AC_FUNC_MALLOC macro (which redefines malloc as rpl_malloc if it
627           does not detect glibc style returning-a-valid-pointer-for-malloc(0)
628           behavior).  Most people can safely answer N.
630 config UCLIBC_HAS_OBSTACK
631         bool "Obstack Support (gnu extension)"
632         help
633           When this option is enabled, uClibc will provide support for obstacks.
634           An obstack is a structure in which memory can be dynamically allocated
635           as a 'stack of objects'.  Many programs need this GNU extention and
636           you should say Y if you are using any.  Otherwise, say N to save some
637           space.
639 config UCLIBC_DYNAMIC_ATEXIT
640         bool "Dynamic atexit() Support"
641         default y
642         help
643           When this option is enabled, uClibc will support an infinite number,
644           of atexit() and on_exit() functions, limited only by your available
645           memory.  This can be important when uClibc is used with C++, since
646           global destructors are implemented via atexit(), and it is quite
647           possible to exceed the default number when this option is disabled.
648           Enabling this option adds a few bytes, and more significantly makes
649           atexit and on_exit depend on malloc, which can be bad when compiling
650           static executables.
652           Unless you use uClibc with C++, you should probably answer N.
654 config COMPAT_ATEXIT
655         bool "Old (visible) atexit Support"
656         help
657           Enable this option if you want to update from 0.9.28 to git/0.9.29,
658           else you will be missing atexit() until you rebuild all apps.
660 config UCLIBC_HAS_UTMPX
661         bool "utmpx based support for tracking login/logouts to/from the system"
662         help
663           Answer y to enable support for accessing user accounting database.
664           It can be used to track all login/logout to the system.
666 config UCLIBC_HAS_UTMP
667         bool "utmp support (XPG2 compat, SVr4 compat)"
668         depends on UCLIBC_HAS_UTMPX
669         help
670           Answer y to enable legacy SVID support for accessing
671           user accounting database:
672                    getutent(), getutid(), getutline(), pututline(),
673                    setutent(), endutent(), utmpname() in utmp.h
674           It can be used to track all login/logout to the system.
676           If unsure, answer N and use corresponding POSIX functions
677           from utmpx.h
679 config UCLIBC_SUSV2_LEGACY
680         bool "Enable SuSv2 LEGACY functions"
681         help
682           Enable this option if you want to have SuSv2 LEGACY functions
683           Currently applies to:
685           valloc
687           WARNING! ABI incompatibility.
689 config UCLIBC_SUSV3_LEGACY
690         bool "Enable SuSv3 LEGACY functions"
691         #vfork,
692         # h_errno
693         # gethostbyaddr
694         # gethostbyname
695         help
696           Enable this option if you want to have SuSv3 LEGACY functions
697           in the library, else they are replaced by SuSv3 proposed macros.
698           Currently applies to:
700           bcmp, bcopy, bzero, index, rindex, ftime,
701           bsd_signal, (ecvt), (fcvt), gcvt, (getcontext),
702           (getwd), (makecontext),
703           mktemp, (pthread_attr_getstackaddr), (pthread_attr_setstackaddr),
704           scalb, (setcontext), (swapcontext), ualarm, usleep,
705           wcswcs.
707           WARNING! ABI incompatibility.
709 config UCLIBC_HAS_CONTEXT_FUNCS
710         bool "Use obsolescent context control functions"
711         depends on UCLIBC_SUSV3_LEGACY && ARCH_HAS_UCONTEXT
712         help
713           Add into library the SuSv3 obsolescent functions used for context
714           control. The setcontext family allows the implementation in C of
715           advanced control flow patterns such as iterators, fibers, and
716           coroutines. They may be viewed as an advanced version of
717           setjmp/longjmp; whereas the latter allows only a single non-local jump
718           up the stack, setcontext allows the creation of multiple cooperative
719           threads of control, each with its own stack.
720           These functions are: setcontext, getcontext, makecontext, swapcontext.
722 config UCLIBC_SUSV3_LEGACY_MACROS
723         bool "Enable SuSv3 LEGACY macros"
724         help
725           Enable this option if you want to have SuSv3 LEGACY macros.
726           Currently applies to bcopy/bzero/bcmp/index/rindex et al.
727           WARNING! ABI incompatibility.
729 config UCLIBC_SUSV4_LEGACY
730         bool "Enable SuSv4 LEGACY or obsolescent functions"
731         help
732           Enable this option if you want to have SuSv4 LEGACY functions
733           and macros in the library.
734           Currently applies to:
736           - XSI functions:
737             _longjmp, _setjmp, _tolower, _toupper, ftw, getitimer,
738             gettimeofday, isascii, pthread_getconcurrency,
739             pthread_setconcurrency, setitimer, setpgrp, sighold,
740             sigignore, sigpause, sigrelse, sigset, siginterrupt,
741             tempnam, toascii, ulimit.
743           - Base functions:
744             asctime, asctime_r, ctime, ctime_r, gets, rand_r,
745             tmpnam, utime.
747           WARNING! ABI incompatibility.
749 config UCLIBC_STRICT_HEADERS
750         bool "Hide structures and constants for unsupported features"
751         help
752           Hide structures and constants in headers that should not be used,
753           because the respective feature is disabled.
755           WARNING! enabling this option requires to patch many faulty apps,
756           since they make (wrongly) use of these structures/constants,
757           although the feature was disabled.
759 config UCLIBC_HAS_STUBS
760         bool "Provide stubs for unavailable functionality"
761         help
762           With this option uClibc provides non-functional stubs for
763           functions which are impossible to implement on the target
764           architecture. Otherwise, such functions are simply omitted.
766 config UCLIBC_HAS_SHADOW
767         bool "Shadow Password Support"
768         default y
769         help
770           Answer N if you do not need shadow password support.
771           Most people will answer Y.
773 config UCLIBC_HAS_PROGRAM_INVOCATION_NAME
774         bool "Support for program_invocation_name"
775         help
776           Support for the GNU-specific program_invocation_name and
777           program_invocation_short_name strings.  Some GNU packages
778           (like tar and coreutils) utilize these for extra useful
779           output, but in general are not required.
781           At startup, these external strings are automatically set
782           up based on the value of ARGV[0].
784           If unsure, just answer N.
786 config UCLIBC_HAS___PROGNAME
787         bool "Support for __progname"
788         default y
789         help
790           Some packages (like openssh) like to peek into internal libc
791           symbols to make their output a bit more user friendly.
793           At startup, __progname is automatically set up based on the
794           value of ARGV[0].
796           If unsure, just answer N.
798 config UCLIBC_HAS_PTY
799         bool "Support for pseudo-terminals"
800         default y
801         help
802           This enables support for pseudo-terminals (see man 4 pts
803           and man 7 pty).
805           If unsure, just answer Y.
807 config ASSUME_DEVPTS
808         bool "Assume that /dev/pts is a devpts or devfs file system"
809         default y
810         depends on UCLIBC_HAS_PTY
811         help
812           Enable this if /dev/pts is on a devpts or devfs filesystem.  Both
813           these filesystems automatically manage permissions on the /dev/pts
814           devices.  You may need to mount your devpts or devfs filesystem on
815           /dev/pts for this to work.
817           Most people should answer Y.
819 config UNIX98PTY_ONLY
820         bool "Support only Unix 98 PTYs"
821         default y
822         depends on UCLIBC_HAS_PTY
823         help
824           If you want to support only Unix 98 PTYs enable this.  Some older
825           applications may need this disabled and will thus use legacy BSD
826           style PTY handling which is more complex and also bigger than
827           Unix 98 PTY handling.
829           For most current programs, you can generally answer Y.
831 if UNIX98PTY_ONLY
832 config UCLIBC_HAS_GETPT
833         bool "Support getpt() (glibc-compat)"
834         depends on UCLIBC_HAS_PTY
835         help
836           Some packages may need getpt().
837           All of those are non-standard and can be considered
838           GNU/libc compatibility.
839           Either use posix_openpt() or just open /dev/ptmx yourself.
841           If unsure, just say N.
842 endif
844 if !UNIX98PTY_ONLY
845 # Have to use __libc_ptyname{1,2}[] and related bloat
846 config UCLIBC_HAS_GETPT
847         def_bool y
848 endif
850 config UCLIBC_HAS_LIBUTIL
851         bool "Provide libutil library and functions"
852         depends on UCLIBC_HAS_PTY
853         help
854           Provide a libutil library.
855           This non-standard conforming library provides the following
856           utility functions:
858           forkpty(): combines openpty(), fork(2), and login_tty() to
859                        create a new process operating in a pseudo-terminal.
860           login(): write utmp and wtmp entries
861           login_tty(): prepares for a login on the tty fd by creating a
862                        new session, making fd the controlling terminal for
863                        the calling process, setting fd to be the standard
864                        input, output, and error streams of the current
865                        process, and closing fd.
866           logout(): write utmp and wtmp entries
867           logwtmp(): constructs a utmp structure and calls updwtmp() to
868                        append the structure to the utmp file.
869           openpty(): finds an available pseudo-terminal and returns
870                        file descriptors for the master and slave
872           This library adds about 3k-4k to your system.
874 config UCLIBC_HAS_TM_EXTENSIONS
875         bool "Support 'struct tm' timezone extension fields"
876         default y
877         help
878           Enabling this option adds fields to 'struct tm' in time.h for
879           tracking the number of seconds east of UTC, and an abbreviation for
880           the current timezone.  These fields are not specified by the SuSv3
881           standard, but they are commonly used in both GNU and BSD application
882           code.
884           To strictly follow the SuSv3 standard, leave this disabled.
885           Most people will probably want to answer Y.
887 config UCLIBC_HAS_TZ_CACHING
888         bool "Enable caching of the last valid timezone 'TZ' string"
889         default y
890         help
891           Answer Y to enable caching of the last valid 'TZ' string describing
892           the timezone setting.  This allows a quick string compare to avoid
893           repeated parsing of unchanged 'TZ' strings when tzset() is called.
895           Most people will answer Y.
897 config UCLIBC_HAS_TZ_FILE
898         bool "Enable '/etc/TZ' file support to set a default timezone (uClibc-specific)"
899         default y
900         help
901           Answer Y to enable the setting of a default timezone for uClibc.
903           Ordinarily, uClibc gets the timezone information exclusively from the
904           'TZ' environment variable.  In particular, there is no support for
905           the zoneinfo directory tree or the /etc/timezone file used by glibc.
907           With this option enabled, uClibc will use the value stored in the
908           file '/etc/TZ' (default path) to obtain timezone information if the
909           'TZ' environment variable is missing or has an invalid value.  The
910           file consists of a single line (newline required) of text describing
911           the timezone in the format specified for the TZ environment variable.
913           Doing 'echo CST6CDT > /etc/TZ' is enough to create a valid file.
914           See
915           http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
916           for details on valid settings of 'TZ'.
918           Most people will answer Y.
920 config UCLIBC_HAS_TZ_FILE_READ_MANY
921         bool "Repeatedly read the '/etc/TZ' file"
922         depends on UCLIBC_HAS_TZ_FILE
923         default y
924         help
925           Answer Y to enable repeated reading of the '/etc/TZ' file even after
926           a valid value has been read.  This incurs the overhead of an
927           open/read/close for each tzset() call (explicit or implied).  However,
928           setting this will allow applications to update their timezone
929           information if the contents of the file change.
931           Most people will answer Y.
933 config UCLIBC_TZ_FILE_PATH
934         string "Path to the 'TZ' file for setting the global timezone"
935         depends on UCLIBC_HAS_TZ_FILE
936         default "/etc/TZ"
937         help
938           This is the path to the 'TZ' file.
940           Most people will use the default of '/etc/TZ'.
942 config UCLIBC_FALLBACK_TO_ETC_LOCALTIME
943         bool "Use /etc/localtime as a fallback"
944         depends on UCLIBC_HAS_TZ_FILE
945         default y
946         help
947           Answer Y to try to use /etc/localtime file.
948           On glibc systems this file (if it is in TZif2 format)
949           contains timezone string at the end.
951           Most people will answer Y.
953 endmenu
955 menu "Advanced Library Settings"
957 config UCLIBC_PWD_BUFFER_SIZE
958         int "Buffer size for getpwnam() and friends"
959         default 256
960         range 12 1024
961         help
962           This sets the value of the buffer size for getpwnam() and friends.
963           By default, this is 256. (For reference, glibc uses 1024).
964           The value can be found using sysconf() with the _SC_GETPW_R_SIZE_MAX
965           parameter.
967 config UCLIBC_GRP_BUFFER_SIZE
968         int "Buffer size for getgrnam() and friends"
969         default 256
970         range 12 1024
971         help
972           This sets the value of the buffer size for getgrnam() and friends.
973           By default, this is 256. (For reference, glibc uses 1024).
974           The value can be found using sysconf() with the _SC_GETGR_R_SIZE_MAX
975           parameter.
977 comment "Support various families of functions"
979 config UCLIBC_LINUX_MODULE_26
980         bool "Linux kernel module functions (2.6)"
981         default y
982         help
983           delete_module, init_module
984           are used in linux for loadable kernel modules.
986           Say N if you do not use kernel modules.
988 config UCLIBC_LINUX_SPECIFIC
989         bool "Linux specific functions"
990         default y
991         help
992           accept4(), bdflush(),
993           capget(), capset(), eventfd(), fallocate(),
994           fstatfs(), getrandom(), inotify_*(), ioperm(), iopl(),
995           madvise(), modify_ldt(), pipe2(), personality(),
996           prctl()/arch_prctl(), pivot_root(), modify_ldt(),
997           ppoll(), readahead(), reboot(), remap_file_pages(),
998           sched_getaffinity(), sched_setaffinity(), sendfile(),
999           setfsgid(), setfsuid(), setresgid(), setresuid(),
1000           splice(), vmsplice(), tee(), signalfd(), statfs(),
1001           swapoff(), swapon(), sync_file_range(), syncfs(),
1002           _sysctl(), sysinfo(), timerfd_*(), vhangup(), umount(),
1003           umount2()
1005 config UCLIBC_HAS_GNU_ERROR
1006         bool "Support GNU extensions for error-reporting"
1007         default y
1008         help
1009           Support for the GNU-specific error(), error_at_line(),
1010           void (* error_print_progname)(), error_message_count
1011           functions and variables.  Some GNU packages
1012           utilize these for extra useful output, but in general
1013           are not required.
1015           If unsure, just answer N.
1017 config UCLIBC_BSD_SPECIFIC
1018         bool "BSD specific functions"
1019         default y
1020         help
1021           mincore(), getdomainname(), setdomainname()
1023           If unsure, say N.
1025 config UCLIBC_HAS_BSD_ERR
1026         bool "BSD err functions"
1027         default y
1028         help
1029           These functions are non-standard BSD extensions.
1030           err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()
1032           If unsure, say N.
1034 config UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
1035         bool "BSD obsolete signal functions"
1036         help
1037           These functions are provided as a compatibility interface for
1038           programs that make use of the historical System V signal API.
1039           This API is obsolete:
1040           new applications should use the POSIX signal API (sigaction(2),
1041           sigprocmask(2), etc.).
1042           Affected functions:
1044           sigset(), sighold(), sigrelse(), sigignore()
1046           If unsure, say N.
1048 config UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL
1049         bool "SYSV obsolete signal functions"
1050         help
1051           Use of sysv_signal() should be avoided; use sigaction(2) instead.
1053           If unsure, say N.
1055 config UCLIBC_NTP_LEGACY
1056         bool "ntp_*() aliases"
1057         help
1058           Provide legacy aliases for ntp functions:
1059           ntp_adjtime(), ntp_gettime()
1061           It is safe to say N here.
1063 config UCLIBC_SV4_DEPRECATED
1064         bool "Enable SVr4 deprecated functions"
1065         help
1066           These functions are DEPRECATED in System V release 4.
1067           Say N unless you desparately need one of the functions below:
1069           ustat() [use statfs(2) in your code instead]
1071 config UCLIBC_HAS_REALTIME
1072         bool "Realtime-related family of SUSv functions"
1073         default y
1074         help
1075           These functions are part of the Timers option and need not
1076           be available on all implementations.
1077           Includes AIO, message-queue, scheduler, semaphore functions:
1079           aio.h
1080           mqueue.h
1081           sched.h
1082           semaphore.h
1084           aio_cancel()
1085           aio_error()
1086           aio_fsync()
1087           aio_read()
1088           lio_listio()
1089           aio_return()
1090           aio_suspend()
1091           aio_write()
1092           clock_getres(), clock_gettime(), clock_settime()
1093           fdatasync()
1094           mlockall(), munlockall()
1095           mlock(), munlock()
1096           mq_close()
1097           mq_getattr()
1098           mq_notify()
1099           mq_open()
1100           mq_receive()
1101           mq_send()
1102           mq_setattr()
1103           mq_unlink()
1104           nanosleep()
1105           sched_getparam()
1106           sched_get_priority_max(), sched_get_priority_min()
1107           sched_getscheduler()
1108           sched_rr_get_interval()
1109           sched_setparam()
1110           sched_setscheduler()
1111           sem_close()
1112           sem_destroy()
1113           sem_getvalue()
1114           sem_init()
1115           sem_open()
1116           sem_post()
1117           sem_trywait(), sem_wait()
1118           sem_unlink()
1119           sigqueue()
1120           sigtimedwait(), sigwaitinfo()
1121           timer_create()
1122           timer_delete()
1123           timer_getoverrun(), timer_gettime(), timer_settime()
1125 config UCLIBC_HAS_ADVANCED_REALTIME
1126         bool "Advanced realtime-related family of SUSv functions"
1127         default y
1128         depends on UCLIBC_HAS_REALTIME
1129         help
1130           These functions are part of the Timers option and need not
1131           be available on all implementations.
1133           clock_getcpuclockid()
1134           clock_nanosleep()
1135           mq_timedreceive()
1136           mq_timedsend()
1137           posix_fadvise()
1138           posix_fallocate()
1139           posix_madvise()
1140           posix_memalign()
1141           posix_mem_offset()
1142           posix_spawnattr_destroy(), posix_spawnattr_init()
1143           posix_spawnattr_getflags(), posix_spawnattr_setflags()
1144           posix_spawnattr_getpgroup(), posix_spawnattr_setpgroup()
1145           posix_spawnattr_getschedparam(), posix_spawnattr_setschedparam()
1146           posix_spawnattr_getschedpolicy(), posix_spawnattr_setschedpolicy()
1147           posix_spawnattr_getsigdefault(), posix_spawnattr_setsigdefault()
1148           posix_spawnattr_getsigmask(), posix_spawnattr_setsigmask()
1149           posix_spawn_file_actions_addclose()
1150           posix_spawn_file_actions_adddup2()
1151           posix_spawn_file_actions_addopen()
1152           posix_spawn_file_actions_destroy()
1153           posix_spawn_file_actions_init()
1154           posix_spawn()
1155           posix_spawnp()
1156           posix_typed_mem_get_info()
1157           pthread_mutex_timedlock()
1158           sem_timedwait()
1160 #config UCLIBC_HAS_TERMIOS
1161 #       bool "termios functions"
1162 #       default y
1163 #       help
1164 #         Get and set terminal attributes, line control, get and set baud
1165 #         rate.
1166 #         termios(), tcgetattr(), tcsetattr(), tcsendbreak(), tcdrain(),
1167 #         tcflush(), tcflow(), cfmakeraw(), cfgetospeed(), cfgetispeed(),
1168 #         cfsetispeed(), cfsetospeed(), cfsetspeed()
1170 #         If unsure, say Y.
1172 config UCLIBC_HAS_EPOLL
1173         bool "epoll"
1174         default y
1175         help
1176           epoll_create(), epoll_ctl(), epoll_wait() functions.
1178 config UCLIBC_HAS_XATTR
1179         bool "Extended Attributes"
1180         default y
1181         help
1182           Extended Attributes support.
1184           setxattr()
1185           lsetxattr()
1186           fsetxattr()
1187           getxattr()
1188           lgetxattr()
1189           fgetxattr()
1190           listxattr()
1191           llistxattr()
1192           flistxattr()
1193           removexattr()
1194           lremovexattr()
1195           fremovexattr()
1197           Say N unless you need support for extended attributes and the
1198           filesystems do actually support them.
1200 config UCLIBC_HAS_PROFILING
1201         bool "Profiling support"
1202         default y
1203         help
1204           gcc's -finstrument-functions needs these.
1206           Most people can safely answer N.
1208 config UCLIBC_HAS_CRYPT_IMPL
1209         bool "libcrypt support"
1210         default y
1211         help
1212           libcrypt contains crypt(), setkey() and encrypt()
1214 config UCLIBC_HAS_SHA256_CRYPT_IMPL
1215         bool "libcrypt SHA256 support"
1216         depends on UCLIBC_HAS_CRYPT_IMPL
1217         help
1218           This adds support for SHA256 password hashing via the crypt() function.
1219           Say N here if you do not need SHA256 crypt support.
1221 config UCLIBC_HAS_SHA512_CRYPT_IMPL
1222         bool "libcrypt SHA512 support"
1223         depends on UCLIBC_HAS_CRYPT_IMPL
1224         help
1225           This adds support for SHA512 password hashing via the crypt() function.
1226           Say N here if you do not need SHA512 crypt support.
1228 config UCLIBC_HAS_CRYPT_STUB
1229         bool "libcrypt stubs"
1230         default y
1231         depends on !UCLIBC_HAS_CRYPT_IMPL
1232         help
1233           Standards mandate that crypt(3) provides a stub if it is unavailable.
1234           If you enable this option then stubs for
1235             crypt(), setkey() and encrypt()
1236           will be provided in a small libcrypt.
1238 config UCLIBC_HAS_CRYPT
1239         def_bool y
1240         depends on UCLIBC_HAS_CRYPT_IMPL || UCLIBC_HAS_CRYPT_STUB
1241 endmenu
1243 menuconfig UCLIBC_HAS_NETWORK_SUPPORT
1244         bool "Networking Support"
1245         default y
1246         help
1247           Say N here if you do not need network support.
1249 if UCLIBC_HAS_NETWORK_SUPPORT
1250 config UCLIBC_HAS_SOCKET
1251         bool "Socket support"
1252         default y
1253         help
1254           If you want to include support for sockets then answer Y.
1256 config UCLIBC_HAS_IPV4
1257         bool "IP version 4 support"
1258         default y
1259         select UCLIBC_HAS_SOCKET
1260         help
1261           If you want to include support for the Internet Protocol
1262           (IP version 4) then answer Y.
1264           Most people will say Y.
1266 config UCLIBC_HAS_IPV6
1267         bool "IP version 6 support"
1268         select UCLIBC_HAS_SOCKET
1269         help
1270           If you want to include support for the next version of the Internet
1271           Protocol (IP version 6) then answer Y.
1273           Most people should answer N.
1275 config UCLIBC_HAS_RPC
1276         bool "Remote Procedure Call (RPC) support"
1277         # RPC+socket-ipvX doesn't currently work.
1278         depends on UCLIBC_HAS_IPV4 || UCLIBC_HAS_IPV6
1279         help
1280           If you want to include RPC support, enable this.  RPC is rarely used
1281           for anything except for the NFS filesystem.  Unless you plan to use
1282           NFS, you can probably leave this set to N and save some space.
1284           If you need to use NFS then you should answer Y.
1286 config UCLIBC_HAS_FULL_RPC
1287         bool "Full RPC support"
1288         depends on UCLIBC_HAS_RPC
1289         default y if !HAVE_SHARED
1290         help
1291           Normally we enable just enough RPC support for things like rshd and
1292           nfs mounts to work.  If you find you need the rest of the RPC stuff,
1293           then enable this option.  Most people can safely answer N.
1295 config UCLIBC_HAS_REENTRANT_RPC
1296         bool "Reentrant RPC support"
1297         depends on UCLIBC_HAS_RPC
1298         default y if !HAVE_SHARED
1299         help
1300           Most packages utilize the normal (non-reentrant) RPC functions, but
1301           some (like exportfs from nfs-utils) need these reentrant versions.
1303           Most people can safely answer N.
1305 config UCLIBC_USE_NETLINK
1306         bool "Use netlink to query interfaces"
1307         depends on UCLIBC_HAS_SOCKET
1308         help
1309           In newer versions of Linux (2.4.17+), support was added for querying
1310           network device information via netlink rather than the old style
1311           ioctl's.  Most of the time, the older ioctl style is sufficient (and
1312           it is smaller than netlink), but if you find that not all of your
1313           devices are being returned by the if_nameindex() function, you will
1314           have to use the netlink implementation.
1316           Most people can safely answer N.
1318 config UCLIBC_SUPPORT_AI_ADDRCONFIG
1319         bool "Support the AI_ADDRCONFIG flag"
1320         depends on UCLIBC_USE_NETLINK
1321         help
1322           The implementation of AI_ADDRCONFIG is aligned with the glibc
1323           implementation using netlink to query interfaces to find both
1324           ipv4 and ipv6 support. This is only needed if an application uses
1325           the AI_ADDRCONFIG flag.
1327           Most people can safely answer N.
1329 config UCLIBC_HAS_BSD_RES_CLOSE
1330         bool "Support res_close() (bsd-compat)"
1331         help
1332           Answer Y if you desperately want to support BSD compatibility in
1333           the network code.
1335           Most people will say N.
1337 config UCLIBC_HAS_COMPAT_RES_STATE
1338         bool "Use compatible but bloated _res"
1339         default y
1340         help
1341           Answer Y if you build network utilities and they muck with resolver
1342           internals a lot (_res global structure). uclibc does not use most
1343           of _res.XXX fields, and with this option OFF they won't even exist.
1344           Which will make e.g. dig build fail.
1345           Answering N saves around 400 bytes in bss.
1347 config UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
1348         bool "Use extra compatible but extra bloated _res"
1349         help
1350           Answer Y if selecting UCLIBC_HAS_COMPAT_RES_STATE is not enough.
1351           As far as I can say, this should never be needed.
1353 config UCLIBC_HAS_RESOLVER_SUPPORT
1354         bool "DNS resolver functions"
1355         select UCLIBC_HAS_COMPAT_RES_STATE
1356         depends on UCLIBC_HAS_IPV4 || UCLIBC_HAS_IPV6
1357         help
1358           Provide implementations for DNS resolver functions.
1359           In particular, the following functions will be added to the
1360           library:
1362           ns_skiprr, ns_initparse, ns_parserr, ns_msg_getflag,
1363           res_mkquery, res_init, res_ninit, res_close, res_nclose
1364           res_query, res_search, res_querydomain,
1365           dn_expand, dn_comp,
1366           ns_name_uncompress, ns_name_ntop, ns_name_pton, ns_name_unpack,
1367           ns_name_pack, ns_name_compress, ns_name_skip, dn_skipname,
1368           ns_get16, ns_get32, ns_put16, ns_put32
1370 endif
1373 menu "String and Stdio Support"
1375 config UCLIBC_HAS_STRING_GENERIC_OPT
1376         bool "Use faster (but larger) generic string functions"
1377         default y
1378         help
1379           Answer Y to use the (tweaked) glibc generic string functions.
1381           In general, they are faster (but 3-5K larger) than the base
1382           uClibc string functions which are optimized solely for size.
1384           Many people will answer Y.
1386 config UCLIBC_HAS_STRING_ARCH_OPT
1387         bool "Use arch-specific assembly string functions (where available)"
1388         default y
1389         help
1390           Answer Y to use any archtecture-specific assembly language string
1391           functions available for this target plaform.
1393           Note that assembly implementations are not available for all string
1394           functions, so some generic (written in C) string functions may
1395           still be used.
1397           These are small and fast, the only reason _not_ to say Y here is
1398           for debugging purposes.
1400 config UCLIBC_HAS_STDIO_FUTEXES
1401         bool "Use futexes for multithreaded I/O locking"
1402         depends on UCLIBC_HAS_THREADS_NATIVE
1403         help
1404           If you want to compile uClibc to use futexes for low-level
1405           I/O locking, answer Y.  Otherwise, answer N.
1407 config UCLIBC_HAS_CTYPE_TABLES
1408         bool "Use Table Versions Of 'ctype.h' Functions."
1409         default y
1410         help
1411           Answer Y to use table versions of the 'ctype.h' functions.
1412           While the non-table versions are often smaller when building
1413           statically linked apps, they work only in stub locale mode.
1415           Most people will answer Y.
1417 config UCLIBC_HAS_CTYPE_SIGNED
1418         bool "Support Signed Characters In 'ctype.h' Functions."
1419         depends on UCLIBC_HAS_CTYPE_TABLES
1420         default y
1421         help
1422           Answer Y to enable support for passing signed char values to
1423           the 'ctype.h' functions.  ANSI/ISO C99 and SUSv3 specify that
1424           these functions are only defined for unsigned char values and
1425           EOF.  However, glibc allows negative signed char values as well
1426           in order to support 'broken old programs'.
1428           Most people will answer Y.
1430 choice
1431         prompt "ctype argument checking"
1432         depends on UCLIBC_HAS_CTYPE_TABLES
1433         default UCLIBC_HAS_CTYPE_UNSAFE
1434         help
1435           Please select the invalid arg behavior you want for the 'ctype'
1436           functions.
1438           The 'ctype' functions are now implemented using table lookups, with
1439           the arg being the index.  This can result in incorrect memory accesses
1440           or even segfaults for args outside of the allowed range.
1442           NOTE: This only affects the 'ctype' _functions_.  It does not affect
1443           the macro implementations.
1445 config UCLIBC_HAS_CTYPE_UNSAFE
1446         bool "Do not check -- unsafe"
1448 config UCLIBC_HAS_CTYPE_CHECKED
1449         bool "Detect and handle appropriately"
1451 config UCLIBC_HAS_CTYPE_ENFORCED
1452         bool "Issue a diagnostic and abort()"
1454 endchoice
1457 config UCLIBC_HAS_WCHAR
1458         bool "Wide Character Support"
1459         help
1460           Answer Y to enable wide character support.  This will make uClibc
1461           much larger.  It is also currently required for locale support.
1463           Most people will answer N.
1465 config UCLIBC_HAS_LOCALE
1466         bool "Locale Support"
1467         select UCLIBC_HAS_WCHAR
1468         select UCLIBC_HAS_CTYPE_TABLES
1469         help
1470           uClibc now has full ANSI/ISO C99 locale support (except for
1471           wcsftime() and collating items in regex).  Be aware that enabling
1472           this option will make uClibc much larger.
1474           Enabling UCLIBC_HAS_LOCALE with the default set of supported locales
1475           (169 UTF-8 locales, and 144 locales for other codesets) will enlarge
1476           uClibc by around 300k.  You can reduce this size by building your own
1477           custom set of locate data (see extra/locale/LOCALES for details).
1479           uClibc's locale support is still under development.  For example,
1480           codesets using shift states are not currently supported.  Support is
1481           planned in the next iteration of locale support.
1483           Answer Y to enable locale support.  Most people will answer N.
1485 choice
1487 prompt "Locale data"
1488         depends on UCLIBC_HAS_LOCALE
1489         default UCLIBC_BUILD_MINIMAL_LOCALE
1491 config UCLIBC_BUILD_MINIMAL_LOCALE
1492         bool "Only selected locales"
1493         depends on UCLIBC_HAS_LOCALE
1494         help
1495           If you do not need all locales that are available on your
1496           host-box, then set this to 'Y'.
1498 config UCLIBC_BUILD_ALL_LOCALE
1499         bool "All locales"
1500         depends on UCLIBC_HAS_LOCALE
1501         help
1502           This builds all the locales that are available on your
1503           host-box.
1505 endchoice
1507 config UCLIBC_BUILD_MINIMAL_LOCALES
1508         string "locales to use"
1509         depends on UCLIBC_BUILD_MINIMAL_LOCALE
1510         default "en_US"
1511         help
1512           Space separated list of locales to use.
1514           E.g.:
1515               en_US en_GB de_AT
1516           default:
1517               en_US
1519 config UCLIBC_HAS_XLOCALE
1520         bool "Extended Locale Support (experimental/incomplete)"
1521         depends on UCLIBC_HAS_LOCALE
1522         help
1523           Answer Y to enable extended locale support similar to that provided
1524           by glibc.  This is primarily intended to support libstd++
1525           functionality.
1526           However, it also allows thread-specific locale selection via
1527           uselocale().
1529           Most people will answer N.
1531 config UCLIBC_HAS_HEXADECIMAL_FLOATS
1532         bool "Support hexadecimal float notation"
1533         depends on UCLIBC_HAS_CTYPE_TABLES
1534         depends on UCLIBC_HAS_FLOATS
1535         help
1536           Answer Y to enable support for hexadecimal float notation in the
1537           (wchar and) char string to floating point conversion functions, as
1538            well as support for the %a and %A conversion specifiers in the
1539            *printf() and *scanf() functions.
1541           Most people will answer N.
1543 config UCLIBC_HAS_GLIBC_DIGIT_GROUPING
1544         bool "Support glibc's \"'\" flag for allowing locale-specific digit grouping"
1545         depends on UCLIBC_HAS_LOCALE
1546         depends on UCLIBC_HAS_FLOATS
1547         help
1548           Answer Y to enable support for glibc's \"'\" flag for allowing
1549           locale-specific digit grouping in base 10 integer conversions and
1550           appropriate floating point conversions in the *printf() and *scanf()
1551           functions.
1553           Most people will answer N.
1555 config UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING
1556         bool "Do not require digit grouping when the \"'\" flag is specified"
1557         depends on UCLIBC_HAS_GLIBC_DIGIT_GROUPING
1558         default y
1559         help
1560           Answer Y to make digit grouping optional when the \"'\" flag is
1561           specified.
1562           This is the standard glibc behavior.  If the initial string of digits
1563           exceeds the maximum group number, the input will be treated as a
1564           normal non-grouped number.
1566           Most people will answer N.
1568 config UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
1569         bool "Support glibc's register_printf_function() (glibc-compat)"
1570         depends on !USE_OLD_VFPRINTF
1571         help
1572           Answer Y to support glibc's register_printf_function() to allow an
1573           application to add its own printf conversion specifiers.
1574           parse_printf_format() is also enabled.
1576           NOTE: Limits the number or registered specifiers to 10.
1577           NOTE: Requires new conversion specifiers to be ASCII
1578                 characters (0-0x7f).  This is to avoid problems with processing
1579                 format strings in locales with different multibyte conversions.
1581           Most people will answer N.
1583 config USE_OLD_VFPRINTF
1584         bool "Use the old vfprintf implementation"
1585         depends on !UCLIBC_HAS_WCHAR
1586         help
1587           Set to true to use the old vfprintf instead of the new.  This is
1588           roughly C89 compliant with some extensions, and is much smaller.
1589           However, it does not support wide chars, positional args, or glibc
1590           custom printf specifiers.
1592           Most people will answer N.
1594 config UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS
1595         int "Maximum number of positional args.  Either 0 or >= 9."
1596         depends on !USE_OLD_VFPRINTF
1597         default 9
1598         help
1599           Set the maximum number of positional args supported by the
1600           printf/scanf functions.  The Single Unix Specification Version 3
1601           requires a minimum value of 9.  Setting this to a value lower than
1602           9 will disable positional arg support and cause the NL_ARGMAX macro
1603           in limits.h to be #undef'd.
1605           WARNING!  The workspace to support positional args is currently
1606                     allocated on the stack.  You probably don't want to set
1607                     this to too high a value.
1609           Most people will answer 9.
1611 choice
1612         prompt "Stdio buffer size"
1613         default UCLIBC_HAS_STDIO_BUFSIZ_4096
1614         help
1615           Please select a value for BUFSIZ.  This will be used by the
1616           stdio subsystem as the default buffer size for a file, and
1617           affects fopen(), setvbuf(), etc.
1619           NOTE: Setting this to 'none' will disable buffering completely.
1620           However, BUFSIZ will still be defined in stdio.h as 256 because
1621           many applications use this value.
1623 config UCLIBC_HAS_STDIO_BUFSIZ_NONE
1624         bool "none (WARNING - BUFSIZ will be 256 in stdio.h)"
1625         depends on !UCLIBC_HAS_WCHAR
1627 config UCLIBC_HAS_STDIO_BUFSIZ_256
1628         bool "256 (minimum ANSI/ISO C99 value)"
1630 config UCLIBC_HAS_STDIO_BUFSIZ_512
1631         bool "512"
1633 config UCLIBC_HAS_STDIO_BUFSIZ_1024
1634         bool "1024"
1636 config UCLIBC_HAS_STDIO_BUFSIZ_2048
1637         bool "2048"
1639 config UCLIBC_HAS_STDIO_BUFSIZ_4096
1640         bool "4096"
1642 config UCLIBC_HAS_STDIO_BUFSIZ_8192
1643         bool "8192"
1645 # If you add more choices, you will need to update uClibc_stdio.h.
1647 endchoice
1649 choice
1650         prompt "Stdio builtin buffer size (uClibc-specific)"
1651         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1652         default UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
1653         help
1654           When a FILE is created with fopen(), an attempt is made to allocate
1655           a BUFSIZ buffer for it.  If the allocation fails, fopen() will still
1656           succeed but the FILE will be unbuffered.
1658           This option adds a small amount of space to each FILE to act as an
1659           emergency buffer in the event of a buffer allocation failure.
1661           Most people will answer None.
1663 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
1664         bool "None"
1666 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4
1667         bool "4"
1669 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8
1670         bool "8"
1672 # If you add more choices, you will need to update uClibc_stdio.h.
1674 endchoice
1676 config UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT
1677         bool "Attempt to shutdown stdio subsystem when abort() is called."
1678         help
1679           ANSI/ISO C99 requires abort() to be asyn-signal-safe.  So there was
1680           a behavioral change made in SUSv3.  Previously, abort() was required
1681           to have the affect of fclose() on all open streams.  The wording has
1682           been changed to "may" from "shall".
1684           Most people will answer N.
1686 config UCLIBC_HAS_STDIO_GETC_MACRO
1687         bool "Provide a macro version of getc()"
1688         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1689         default y
1690         help
1691           Provide a macro version of getc().
1693           Most people will answer Y.
1695 config UCLIBC_HAS_STDIO_PUTC_MACRO
1696         bool "Provide a macro version of putc()"
1697         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1698         default y
1699         help
1700           Provide a macro version of putc().
1702           Most people will answer Y.
1704 config UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION
1705         bool "Support auto-r/w transition"
1706         default y
1707         help
1708           Answer Y to enable the stdio subsystem to automaticly transition
1709           between reading and writing.  This relaxes the ANSI/ISO C99
1710           requirement:
1712           When a file is opened with update mode ('+' as the second or third
1713           character in the list of mode argument values), both input and output
1714           may be performed on the associated stream. However, output shall not
1715           be directly followed by input without an intervening call to the
1716           fflush function or to a file positioning function (fseek, fsetpos,
1717           or rewind), and input shall not be directly followed by output without
1718           an intervening call to a file positioning function, unless the input
1719           operation encounters end­of­file.
1721           Most people will answer Y.
1723 config UCLIBC_HAS_FOPEN_LARGEFILE_MODE
1724         bool "Support an fopen() 'F' flag for large file mode (uClibc-specific)"
1725         help
1726           Answer Y to enable a uClibc-specific extension to allow passing an
1727           additional 'F' flag in the mode string for fopen() to specify that
1728           the file should be open()ed with the O_LARGEFILE flag set.
1730           Most people will answer N.
1732 config UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
1733         bool "Support an fopen() 'x' flag for exclusive mode (glibc-compat)"
1734         help
1735           Answer Y to support a glibc extension to allow passing
1736           additional 'x' flag in the mode string for fopen() to specify that
1737           the file should be open()ed with the O_EXCL flag set.
1739           Most people will answer N.
1741 config UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
1742         bool "Support an fopen() 'e' flag for close-on-exec mode (glibc-compat)"
1743         help
1744           Answer Y to support a glibc extension to allow passing
1745           additional 'e' flag in the mode string for fopen() to specify that
1746           the file should be open()ed with the O_CLOEXEC flag set.
1748           Most people will answer N.
1750 config UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
1751         bool "Support fmemopen(), open_memstream(), and fopencookie() (glibc-compat)"
1752         help
1753           Answer Y to support the glibc 'custom stream' extension functions
1754           fmemopen(), open_memstream(), and fopencookie().
1756           NOTE: There are some minor differences regarding seeking behavior.
1758           Most people will answer N.
1760 config UCLIBC_HAS_PRINTF_M_SPEC
1761         bool "Support the '%m' specifier in printf format strings (glibc-compat)"
1762         help
1763           Answer Y to support a glibc extension to interpret '%m' in printf
1764           format strings as an instruction to output the error message string
1765           (as generated by strerror) corresponding to the current value of
1766           'errno'.
1768           Most people will answer N.
1770 config UCLIBC_HAS_ERRNO_MESSAGES
1771         bool "Include the errno message text in the library"
1772         default y
1773         help
1774           Answer Y if you want to include the errno message text in the
1775           library.  This adds about 3K to the library, but enables strerror()
1776           to generate text other than 'Unknown error <number>'.
1778           Most people will answer Y.
1780 config UCLIBC_HAS_SYS_ERRLIST
1781         bool "Support sys_errlist[] (obsolete-compat)"
1782         depends on UCLIBC_HAS_ERRNO_MESSAGES
1783         help
1784           Answer Y if you want to support the obsolete sys_errlist[].
1785           This adds about 0.5k to the library, except for the mips
1786           arch where it adds over 4K.
1788           WARNING!  In the future, support for sys_errlist[] may be unavailable
1789                     in at least some configurations.  In fact, it may be removed
1790                     altogether.
1792           Most people will answer N.
1794           Application writers: use the strerror(3) function.
1796 config UCLIBC_HAS_SIGNUM_MESSAGES
1797         bool "Include the signum message text in the library"
1798         default y
1799         help
1800           Answer Y if you want to include the signum message text in the
1801           library.  This adds about 0.5K to the library, but enables strsignal()
1802           to generate text other than 'Unknown signal <number>'.
1804           Most people will answer Y.
1806 config UCLIBC_HAS_SYS_SIGLIST
1807         bool "Support sys_siglist[] (bsd-compat)"
1808         depends on UCLIBC_HAS_SIGNUM_MESSAGES
1809         help
1810           Answer Y if you want to support sys_siglist[].
1812           WARNING!  In the future, support for sys_siglist[] may be unavailable
1813                     in at least some configurations.  In fact, it may be removed
1814                     altogether.
1816           Most people will answer N.
1818 config UCLIBC_HAS_GNU_GETOPT
1819         bool "Support gnu getopt"
1820         default y
1821         help
1822           Answer Y if you want to include full gnu getopt() instead of a
1823           (much smaller) SUSv3 compatible getopt().
1824           Note that getopt_long, getopt_long_only as well as getsubopt
1825           are implemented on top of this choice.
1827           Most people will answer Y.
1829 config UCLIBC_HAS_GETOPT_LONG
1830         bool "Support getopt_long/getopt_long_only (glibc-compat)"
1831         default y
1832         help
1833           Answer Y if you want to include getopt_long[_only()] used by many
1834           apps.
1836           Most people will answer Y.
1838 config UCLIBC_HAS_GNU_GETSUBOPT
1839         bool "Support getsubopt"
1840         default y
1841         help
1842           Answer Y if you want to include getsubopt().
1844           Most people will answer Y.
1846 config UCLIBC_HAS_ARGP
1847         bool "Support argp (as standalone shared object)"
1848         select UCLIBC_HAS_GETOPT_LONG
1849         select UCLIBC_HAS_GNU_GETOPT
1850         default n
1851         help
1852           Argp is an interface for parsing unix-style argument vectors. Unlike
1853           the common getopt interface, it provides many advanced features in
1854           addition to parsing options, such as automatic output in response to
1855           `--help' and `--version' options.
1856           A library can export an argp option parser, which programs can easily
1857           use in conjunction with their own option parser.
1858           Argp support is needed by elfutils libdw.
1860           Most people can safely answer N.
1862 endmenu
1865 menu "Big and Tall"
1867 config UCLIBC_HAS_REGEX
1868         bool "Regular Expression Support"
1869         default y
1870         help
1871           POSIX regular expression code is really big -- 53k all by itself.
1872           If you don't use regular expressions, turn this off and save space.
1873           Of course, if you only statically link, leave this on, since it will
1874           only be included in your apps if you use regular expressions.
1876 config UCLIBC_HAS_REGEX_OLD
1877         bool "Use the older (stable) regular expression code"
1878         depends on UCLIBC_HAS_REGEX
1879         default y
1880         help
1881           There are two versions of regex.  The older (stable) version has
1882           been in uClibc for quite a long time but hasn't seen too many
1883           updates.  It also has some known issues when dealing with uncommon
1884           corner cases and multibyte/unicode strings.  However, it is quite
1885           a bit smaller than the newer version.
1887           If the older version has worked for you and you don't need unicode
1888           support, then stick with the old version (and say Y here).
1889           Otherwise, you should use the new version (and say N here).
1891 config UCLIBC_HAS_FNMATCH
1892         bool "fnmatch Support"
1893         default y
1894         help
1895           POSIX fnmatch.
1897 config UCLIBC_HAS_FNMATCH_OLD
1898         bool "Use the older (stable) fnmatch code"
1899         depends on UCLIBC_HAS_FNMATCH
1900         default y
1901         help
1902           There are two versions of fnmatch.  The older (stable) version has
1903           been in uClibc for quite a long time but hasn't seen too many
1904           updates.  It also has some known issues when dealing with uncommon
1905           corner cases and multibyte/unicode strings.  However, it is quite
1906           a bit smaller than the newer version.
1908           If the older version has worked for you and you don't need unicode
1909           support, then stick with the old version (and say Y here).
1910           Otherwise, you should use the new version (and say N here).
1912 config UCLIBC_HAS_WORDEXP
1913         bool "Support the wordexp() interface"
1914         depends on UCLIBC_HAS_GLOB
1915         help
1916           The SuSv3 wordexp() interface performs word expansions per the  Shell
1917           and Utilities volume of IEEE Std 1003.1-2001, Section 2.6.  It is
1918           intended for use by applications that want to implement all of the
1919           standard Bourne shell expansions on input data.
1921           This interface is rarely used, and very large.  Unless you have a
1922           pressing need for wordexp(), you should probably answer N.
1924 config UCLIBC_HAS_NFTW
1925         bool "Support the nftw() interface"
1926         help
1927           The SuSv3 nftw() interface is used to recursively descend
1928           directory paths while repeatedly calling a function.
1930           This interface is rarely used, and adds around 4.5k.  Unless you have
1931           a pressing need for nftw(), you should probably answer N.
1933 config UCLIBC_HAS_FTW
1934         bool "Support the ftw() interface (SUSv4-obsolete)"
1935         depends on UCLIBC_SUSV4_LEGACY
1936         help
1937           The SuSv3 ftw() interface is used to recursively descend
1938           directory paths while repeatedly calling a function.
1940           This interface is rarely used, and adds around 4.5k.  Unless you have
1941           a pressing need for ftw(), you should probably answer N.
1943 config UCLIBC_HAS_FTS
1944         bool "Support the fts() interface (bsd-compat)"
1945         help
1946           The fts functions are provided for traversing UNIX file hierarchies.
1948           This interface is currently used by the elfutils and adds
1949           around 7.5k.
1950           You should port your application to use the POSIX nftw()
1951           interface.
1953           Unless you need to build/use elfutils, you should prolly answer N.
1955 config UCLIBC_HAS_GLOB
1956         bool "Support the glob() interface"
1957         depends on UCLIBC_HAS_FNMATCH
1958         default y
1959         help
1961           The glob interface is somewhat large (weighing in at about 2,5k).  It
1962           is used fairly often, but is an option since people wanting to go for
1963           absolute minimum size may wish to omit it.
1965           Most people will answer Y.
1967 config UCLIBC_HAS_GNU_GLOB
1968         bool "Support gnu glob() interface"
1969         depends on UCLIBC_HAS_GLOB
1970         help
1971           The gnu glob interface is somewhat larger (weighing in at about 4,2k)
1972           than it's SuSv3 counterpart (and is out of date). It is an old copy
1973           from glibc and does not support all the GNU specific options.
1975           Answer Y if you want to include full gnu glob() instead of the smaller
1976           SUSv3 compatible glob().
1978           Most people will answer N.
1980 endmenu
1985 menu "Library Installation Options"
1987 config RUNTIME_PREFIX
1988         string "uClibc runtime library directory"
1989         default "/usr/$(TARGET_ARCH)-linux-uclibc/"
1990         help
1991           RUNTIME_PREFIX is the directory into which the uClibc runtime
1992           libraries will be installed.   The result will look something
1993           like the following:
1994               $(RUNTIME_PREFIX)/
1995                   lib/            <contains all runtime libraries>
1996                   usr/bin/ldd     <the ldd utility program>
1997                   sbin/ldconfig   <the ldconfig utility program>
1998           This value is used by the 'make install' Makefile target.  Since this
1999           directory is compiled into the shared library loader, you will need to
2000           recompile uClibc if you change this value...
2002           For a typical target system this should be set to "/", such that
2003           'make install' will install /lib/libuClibc-<VERSION>.so
2005 config DEVEL_PREFIX
2006         string "uClibc development environment directory"
2007         default "/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
2008         help
2009           DEVEL_PREFIX is the directory into which the uClibc development
2010           environment will be installed.   The result will look something
2011           like the following:
2012               $(DEVEL_PREFIX)/
2013                   lib/            <contains static libs>
2014                   include/        <Where all the header files go>
2015           This value is used by the 'make install' Makefile target when
2016           installing a uClibc development environment.
2018           For a typical target system this should be set to "/usr", such that
2019           'make install' will install /usr/include/<header files>.
2021 config MULTILIB_DIR
2022         string "library path component"
2023         default "lib"
2024         help
2025           Path component where libraries reside.
2027           For a typical target system this should be set to "lib", such that
2028           'make install' will install libraries to "/lib" and "/usr/lib"
2029           respectively
2030             DEVEL_PREFIX/MULTILIB_DIR
2031             RUNTIME_PREFIX/MULTILIB_DIR
2033           Other settings may include "lib32" or "lib64".
2035 config HARDWIRED_ABSPATH
2036         bool "Hardwire absolute paths into linker scripts"
2037         default y
2038         help
2039           This prepends absolute paths to the libraries mentioned in linker
2040           scripts such as libc.so.
2042           This is a build time optimization.  It has no impact on dynamic
2043           linking at runtime, which doesn't use linker scripts.
2045           You must disable this to use uClibc with old non-sysroot toolchains,
2046           such as the prebuilt binary cross compilers at:
2047              http://uclibc.org/downloads/binaries
2049           The amount of time saved by this optimization is actually too small to
2050           measure. The linker just had to search the library path to find the
2051           linker script, so the dentries are cache hot if it has to search the
2052           same path again.  But it's what glibc does, so we do it too.
2054 endmenu
2057 menu "Security options"
2059 config UCLIBC_BUILD_PIE
2060         bool "Build utilities as ET_DYN/PIE executables"
2061         depends on HAVE_SHARED
2062         depends on TARGET_arm || TARGET_frv || TARGET_i386 || TARGET_mips || TARGET_powerpc || TARGET_nds32
2063         select FORCE_SHAREABLE_TEXT_SEGMENTS
2064         help
2065           If you answer Y here, ldd and iconv are built as ET_DYN/PIE
2066           executables.
2068           It requires gcc-3.4 and binutils-2.15 (for arm 2.16) or later.
2069           More about ET_DYN/PIE binaries on <http://pax.grsecurity.net/> .
2071           WARNING: This option also enables FORCE_SHAREABLE_TEXT_SEGMENTS, so
2072                    all libraries have to be built with -fPIC or -fpic, and all
2073                    assembler functions must be written as position independent
2074                    code (PIC).
2076 config UCLIBC_HAS_ARC4RANDOM
2077         bool "Include the arc4random() function"
2078         help
2079           Answer Y to support the OpenBSD-like arc4random() function. This
2080           function picks a random number between 0 and N, and will always return
2081           something even if the random driver is dead. If urandom fails then
2082           gettimeofday(2) will be used as the random seed. This function is
2083           designed to be more dependable than invoking /dev/urandom directly.
2084           OpenSSL and OpenNTPD currently support this function.
2086           Most people will answer N.
2088 config ARC4RANDOM_USES_NODEV
2089         bool "Do not use /dev/urandom with arc4random()"
2090         depends on UCLIBC_HAS_ARC4RANDOM
2091         help
2092           Answer Y to use gettimeofday(2) and getpid(2) exclusively for
2093           arc4random(). This is not a bad idea for a diskless system, but
2094           it uses a lot of syscalls to stir each array element.
2096           Most people will answer N.
2098 config HAVE_NO_SSP
2099         bool
2101 config UCLIBC_HAS_SSP
2102         bool "Support for GCC stack smashing protector"
2103         depends on !HAVE_NO_SSP
2104         help
2105           Add code to support GCC's -fstack-protector[-all] option to uClibc.
2106           This requires GCC 4.1 or newer.  GCC does not have to provide libssp,
2107           the needed functions are added to ldso/libc instead.
2109           GCC's stack protector is a reimplementation of IBM's propolice.
2110           See http://www.trl.ibm.com/projects/security/ssp/ and
2111           http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
2112           for details.
2114           Note that NOEXECSTACK on a kernel with address space randomization
2115           is generally sufficient to prevent most buffer overflow exploits
2116           without increasing code size.  This option essentially adds debugging
2117           code to catch them.
2119           Most people will answer N.
2121 config SSP_QUICK_CANARY
2122         bool "Use simple guard values without accessing /dev/urandom"
2123         depends on UCLIBC_HAS_SSP
2124         help
2125           Use gettimeofday(2) to define the __guard without accessing
2126           /dev/urandom.
2127           WARNING: This makes smashing stack protector vulnerable to timing
2128                 attacks.
2129           Most people will answer N.
2131 choice
2132         prompt "Propolice protection blocking signal"
2133         depends on UCLIBC_HAS_SSP
2134         depends on DODEBUG
2135         default PROPOLICE_BLOCK_SEGV
2136         help
2137           "abort" use SIGABRT to block offending programs.
2138           This is the default implementation.
2140           "segfault" use SIGSEGV to block offending programs.
2141           Use this for debugging.
2143           If unsure, answer "abort".
2145 config PROPOLICE_BLOCK_ABRT
2146         bool "abort"
2148 config PROPOLICE_BLOCK_SEGV
2149         bool "segfault"
2151 endchoice
2153 config UCLIBC_BUILD_SSP
2154         bool "Build uClibc with -fstack-protector"
2155         depends on UCLIBC_HAS_SSP
2156         help
2157           Build all uClibc libraries and executables with -fstack-protector,
2158           adding extra stack overflow checking to most uClibc functions.
2160 config UCLIBC_BUILD_RELRO
2161         bool "Build uClibc with linker option -z RELRO"
2162         depends on HAVE_SHARED
2163         default y
2164         help
2165           Build all libraries and executables with "ld -z relro".
2167           This tells the linker to mark chunks of an executable or shared
2168           library read-only after applying dynamic relocations.  (This comes
2169           up when a global const variable is initialized to the address of a
2170           function or the value of another global variable.)
2172           This is a fairly obscure option the ld man page doesn't even bother
2173           to document properly.  It's a security paranoia issue that's more
2174           likely to consume memory (by allocating an extra page) rather than
2175           save it.
2177           This is explained in more depth at
2178           http://www.airs.com/blog/archives/189
2180           Nobody is likely to care whether you say Y or N here.
2182 config UCLIBC_BUILD_NOW
2183         bool "Build uClibc with linker option -z NOW"
2184         depends on HAVE_SHARED
2185         help
2186           Build all libraries and executables with "ld -z now".
2188           This tells the linker to resolve all symbols when the library is
2189           first loaded, rather than when each function is first called.  This
2190           increases start-up latency by a few microseconds and may do
2191           unnecessary work (resolving symbols that are never used), but the
2192           realtime people like it for making microbenchmark timings slightly
2193           more predictable and in some cases it can be slightly faster due to
2194           CPU cache behavior (not having to fault the linker back in to do
2195           lazy symbol resolution).
2197           Most people can't tell the difference between selecting Y or N here.
2199 config UCLIBC_BUILD_NOEXECSTACK
2200         bool "Build uClibc with noexecstack marking"
2201         default y
2202         help
2203           Mark all assembler files as noexecstack, which will mark uClibc
2204           as not requiring an executable stack.  (This doesn't prevent other
2205           files you link against from claiming to need an executable stack, it
2206           just won't cause uClibc to request it unnecessarily.)
2208           This is a security thing to make buffer overflows harder to exploit.
2209           By itself, it's kind of useless, as Linus Torvalds explained in 1998:
2210           http://old.lwn.net/1998/0806/a/linus-noexec.html
2212           It only actually provides any security when combined with address
2213           space randomization, explained here: http://lwn.net/Articles/121845/
2215           Address space randomization is on by default in current linux
2216           kernels (although it can be disabled using the option
2217           CONFIG_COMPAT_BRK).
2219           You should probably say Y.
2221 endmenu
2223 menu "Development/debugging options"
2225 config CROSS_COMPILER_PREFIX
2226         string "Cross-compiling toolchain prefix"
2227         default ""
2228         help
2229           The prefix used to execute your cross-compiling toolchain.  For
2230           example, if you run 'arm-linux-uclibc-gcc' to compile something,
2231           then enter 'arm-linux-uclibc-' here.
2233 config UCLIBC_EXTRA_CFLAGS
2234         string "Extra CFLAGS"
2235         default ""
2236         help
2237           Add any additional CFLAGS to be used to build uClibc.
2239 config DODEBUG
2240         bool "Enable debugging symbols"
2241         select EXTRA_WARNINGS
2242         help
2243           Say Y here if you wish to compile uClibc with debugging symbols.
2244           This will allow you to use a debugger to examine uClibc internals
2245           while applications are running.  This increases the size of the
2246           library considerably and should only be used when doing development.
2247           If you are doing development and want to debug uClibc, answer Y.
2249           Otherwise, answer N.
2251 config DODEBUG_PT
2252         bool "Build pthread with debugging output"
2253         depends on UCLIBC_HAS_THREADS && UCLIBC_HAS_LINUXTHREADS
2254         help
2255           Enable debug output in libpthread.  This is only useful when doing
2256           development in libpthread itself.
2258           Otherwise, answer N.
2260 config DOSTRIP
2261         bool "Strip libraries and executables"
2262         default y
2263         depends on !DODEBUG
2264         help
2265           Say Y here if you do wish to strip all uClibc libraries and
2266           executables.  No stripping increases the size of the binaries
2267           considerably, but makes it possible to debug uClibc libraries.
2268           Most people will answer Y.
2270 config DOASSERTS
2271         bool "Build with run-time assertion testing"
2272         help
2273           Say Y here to include runtime assertion tests.
2274           This enables runtime assertion testing in some code, which can
2275           increase the size of the library and incur runtime overhead.
2276           If you say N, then this testing will be disabled.
2278 config SUPPORT_LD_DEBUG
2279         bool "Build the shared library loader with debugging support"
2280         depends on HAVE_SHARED
2281         help
2282           Answer Y here to enable all the extra code needed to debug the uClibc
2283           native shared library loader.  The level of debugging noise that is
2284           generated depends on the LD_DEBUG environment variable...  Just set
2285           LD_DEBUG to something like: 'LD_DEBUG=token1,token2,..  prog' to
2286           debug your application.  Diagnostic messages will then be printed to
2287           the stderr.
2289           For now these debugging tokens are available:
2290             detail        provide more information for some options
2291             move          display copy processing
2292             symbols       display symbol table processing
2293             reloc         display relocation processing; detail shows the
2294                           relocation patch
2295             nofixups      never fixes up jump relocations
2296             bindings      displays the resolve processing (function calls);
2297                           detail shows the relocation patch
2298             all           Enable everything!
2300           The additional environment variable:
2301             LD_DEBUG_OUTPUT=file
2302           redirects the diagnostics to an output file created using
2303           the specified name and the process id as a suffix.
2305           An excellent start is simply:
2306             $ LD_DEBUG=binding,move,symbols,reloc,detail ./appname
2307           or to log everything to a file named 'logfile', try this
2308             $ LD_DEBUG=all LD_DEBUG_OUTPUT=logfile ./appname
2310           If you are doing development and want to debug uClibc's shared library
2311           loader, answer Y.  Mere mortals answer N.
2313 config SUPPORT_LD_DEBUG_EARLY
2314         bool "Build the shared library loader with early debugging support"
2315         depends on HAVE_SHARED
2316         help
2317           Answer Y here to if you find the uClibc shared library loader is
2318           crashing or otherwise not working very early on.  This is typical
2319           only when starting a new port when you haven't figured out how to
2320           properly get the values for argc, argv, environ, etc.  This method
2321           allows a degree of visibility into the very early shared library
2322           loader initialization process.  If you are doing development and want
2323           to debug the uClibc shared library loader early initialization,
2324           answer Y.  Mere mortals answer N.
2326 config UCLIBC_MALLOC_DEBUGGING
2327         bool "Build malloc with debugging support"
2328         depends on MALLOC || MALLOC_STANDARD
2329         select DOASSERTS
2330         help
2331           Answer Y here to compile extra debugging support code into malloc.
2332           Malloc debugging output may then be enabled at runtime using the
2333           MALLOC_DEBUG environment variable.
2335           The value of MALLOC_DEBUG should be an integer, which is interpreted
2336           as a bitmask with the following bits:
2337                   1   -  do extra consistency checking
2338                   2   -  output messages for malloc/free calls and OS
2339                          allocation calls
2340                   4   -  output messages for the `MMB' layer
2341                   8   -  output messages for internal malloc heap manipulation
2342                          calls
2344           Because this increases the size of malloc appreciably (due to strings
2345           etc), you should say N unless you need to debug a malloc problem.
2347 config UCLIBC_HAS_BACKTRACE
2348         bool "Add support for application self-debugging"
2349         depends on HAVE_SHARED
2350         help
2351           Answer Y here to compile support for application self-debugging that
2352           provides the following new functions:
2353           backtrace, backtrace_symbols, backtrace_symbols_fd
2355           The backtrace functionality is currently supported on some platforms, and it
2356           based on dwarf2 informations to properly work, so any application that
2357           want to use backtrace needs to be built with -fexceptions flag.
2359           The symbol names may be unavailable without the use of special linker
2360           options. For systems using the GNU linker, it is necessary to use the
2361           -rdynamic linker option too. Note that names of "static" functions are not
2362           exposed, and won't be available in the backtrace.
2364 config WARNINGS
2365         string "Compiler Warnings"
2366         default "-Wall"
2367         help
2368           Set this to the set of compiler warnings you wish to see while compiling.
2370 config EXTRA_WARNINGS
2371         bool "Enable extra annoying warnings"
2372         help
2373           If you wish to build with extra warnings enabled, say Y here.
2375 endmenu