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