superh: enable time64
[uclibc-ng.git] / extra / Configs / Config.in
blob1fb0466fa6d7dd70889fa23225b614081292d874
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_aarch64 || TARGET_arm || TARGET_i386 || \
337                  TARGET_m68k || TARGET_mips || TARGET_powerpc || \
338                  TARGET_riscv64 || TARGET_x86_64 || TARGET_xtensa)
340 config ARCH_HAS_NO_SHARED
341         bool
343 config ARCH_HAS_NO_LDSO
344         bool
345         select ARCH_HAS_NO_SHARED
347 config ARCH_HAS_UCONTEXT
348         bool
350 config HAVE_LDSO
351         bool
353 config HAVE_SHARED
354         bool "Enable shared libraries"
355         depends on !ARCH_HAS_NO_SHARED
356         select HAVE_LDSO
357         default y
358         help
359           If you wish to build uClibc with support for shared libraries then
360           answer Y here.  If you only want to build uClibc as a static library,
361           then answer N.
363 config FORCE_SHAREABLE_TEXT_SEGMENTS
364         bool "Only load shared libraries which can share their text segment"
365         depends on HAVE_SHARED
366         select DOPIC
367         help
368           If you answer Y here, the uClibc native shared library loader will
369           only load shared libraries, which do not need to modify any
370           non-writable segments. These libraries haven't set the DT_TEXTREL
371           tag in the dynamic section (==> objdump).
372           All your libraries must be compiled with -fPIC or -fpic, and all
373           assembler function must be written as position independent code (PIC).
374           Enabling this option will make uClibc's shared library loader a
375           little bit smaller and guarantee that no memory will be wasted by
376           badly coded shared libraries.
378 config LDSO_LDD_SUPPORT
379         bool "Native 'ldd' support"
380         depends on HAVE_SHARED
381         default y
382         help
383           Enable all the code needed to support traditional ldd,
384           which executes the shared library loader to resolve all dependencies
385           and then provide a list of shared libraries that are required for an
386           application to function.  Disabling this option will make uClibc's
387           shared library loader a little bit smaller.
388           Most people will answer Y.
390 config LDSO_CACHE_SUPPORT
391         bool "Enable library loader cache (ld.so.conf)"
392         depends on HAVE_SHARED
393         default y
394         help
395           Enable this to make use of /etc/ld.so.conf, the shared library loader
396           cache configuration file to support for non-standard library paths.
397           After updating this file, it is necessary to run 'ldconfig' to update
398           the /etc/ld.so.cache shared library loader cache file.
400 config LDSO_PRELOAD_ENV_SUPPORT
401         bool "Enable library loader LD_PRELOAD environment"
402         depends on HAVE_SHARED
403         default y
404         help
405           Enable this to make use of LD_PRELOAD environment variable.
406           A whitespace-separated list of additional, user-specified, ELF shared
407           libraries to be loaded before all others. This can be used to
408           selectively override functions in other shared libraries. For
409           set-user-ID/set-group-ID ELF binaries, only libraries in the standard
410           search directories that are also set-user-ID will be loaded.
412 config LDSO_PRELOAD_FILE_SUPPORT
413         bool "Enable library loader preload file (ld.so.preload)"
414         depends on HAVE_SHARED
415         help
416           Enable this to make use of /etc/ld.so.preload. This file contains a
417           whitespace separated list of shared libraries to be loaded before
418           the program.
420 config LDSO_BASE_FILENAME
421         string "Shared library loader naming prefix"
422         depends on HAVE_SHARED && (LDSO_CACHE_SUPPORT || LDSO_PRELOAD_FILE_SUPPORT)
423         default "ld.so"
424         help
425           If you wish to support both uClibc and glibc on the same system, it
426           is necessary to set this to something other than "ld.so" to avoid
427           conflicts with glibc, which also uses "ld.so".  This prevents both
428           libraries from using the same /etc/ld.so.* files.  If you wish to
429           support both uClibc and glibc on the same system then you should set
430           this to "ld-uClibc.so".
432           Most people will leave this set to the default of "ld.so".
434           WARNING: Changing the default prefix could cause problems with
435                    binutils' ld !
437 config LDSO_STANDALONE_SUPPORT
438         bool "Dynamic linker stand-alone mode support"
439         depends on HAVE_SHARED
440         help
441           The dynamic linker can be run either indirectly through running some
442           dynamically linked program or library (in which case no command line
443           options to the dynamic linker can be passed and, in the ELF case, the
444           dynamic linker which is stored in the .interp section of the program
445           is executed) or directly by running:
447           /lib/ld-uClibc.so.*  [OPTIONS] [PROGRAM [ARGUMENTS]]
449           Stand-alone execution is a prerequisite for adding prelink
450           capabilities to uClibc dynamic linker, as well useful for testing an
451           updated version of the dynamic linker without breaking the system.
453 config LDSO_PRELINK_SUPPORT
454         bool "Dynamic linker prelink support"
455         depends on HAVE_SHARED
456         select LDSO_STANDALONE_SUPPORT
457         help
458           The dynamic linker can be used in stand-alone mode by the prelink tool
459           for prelinking ELF shared libraries and binaries to speed up startup
460           time. It also is able to load and handle prelinked libraries and
461           binaries at runtime.
463 config ARCH_VDSO_SUPPORT
464         bool
465         
466 config VDSO_SUPPORT
467         bool "Dynamic linker vDSO support"
468         depends on ARCH_VDSO_SUPPORT
469         help
470           Enable this option to support vDSO loading
472           vDSO provides access to some kernel function without a systemcall
473           if provided by the kernel
475           most archs support gettimeofday() and clock_gettime()
477           vDSO loading can be disabled via VDSO_DISABLE environment variable
479 config UCLIBC_STATIC_LDCONFIG
480         bool "Link ldconfig statically"
481         depends on HAVE_SHARED
482         default y
483         help
484           Enable this option to statically link the ldconfig binary.
486           Making ldconfig static can be beneficial if you have a library
487           problem and need to use ldconfig to recover.  Sometimes it is
488           preferable to instead keep the size of the system down, in which
489           case you should disable this option.
491 config LDSO_RUNPATH
492         bool "Enable ELF RUNPATH tag support"
493         depends on HAVE_SHARED
494         default y if LDSO_CACHE_SUPPORT
495         help
496           ELF's may have dynamic RPATH/RUNPATH tags.  These tags list paths
497           which extend the library search paths.  They are really only useful
498           if a package installs libraries in non standard locations and
499           ld.so.conf support is disabled.
501           Usage of RUNPATH tags is not too common, so disabling this feature
502           should be safe for most people.
504 config LDSO_RUNPATH_OF_EXECUTABLE
505         bool "Use executables RUNPATH/RPATH when searching for libraries."
506         depends on LDSO_RUNPATH
507         default n
508         help
509           Use the executables RUNPATH/RPATH to find to find libraries even
510           though this behavour is not standard.  Setting this option causes
511           the uclibc dynamic linker behavour to match the glibc dynamic linker.
513 config LDSO_SAFE_RUNPATH
514         bool "Allow only RUNPATH beginning with /"
515         depends on LDSO_RUNPATH
516         default y
517         help
518           Allow only absolute path in RPATH/RUNPATH.
520 config LDSO_SEARCH_INTERP_PATH
521         bool "Add ldso path to lib search path"
522         depends on HAVE_SHARED
523         default y
524         help
525           The ldso is told where it is being executed from and can use that
526           path to find related core libraries.  This is useful by default,
527           but can be annoying in a mixed development environment.
529           i.e. if the ldso is run from /foo/boo/ldso.so, it will start its
530           library search with /foo/boo/
532           If unsure, simply say Y here.
534 config LDSO_LD_LIBRARY_PATH
535         bool "Add LD_LIBRARY_PATH to lib search path"
536         depends on HAVE_SHARED
537         default y
538         help
539           On hardened system it could be useful to disable the use of
540           LD_LIBRARY_PATH environment variable (a colon-separated list of
541           directories in which to search for ELF libraries at execution-time).
543           If unsure, simply say Y here.
545 config UCLIBC_CTOR_DTOR
546         bool
547         default y if !TARGET_riscv64 && !TARGET_lm32
548         help
549           If you wish to build uClibc with support for global constructor
550           (ctor) and global destructor (dtor) support, then answer Y here.
551           When ctor/dtor support is enabled, binaries linked with uClibc must
552           also be linked with crtbegin.o and crtend.o which are provided by gcc
553           (the "*startfile:" and "*endfile:" settings in your gcc specs file
554           may need to be adjusted to include these files).  This support will
555           also add a small amount of additional size to each binary compiled vs
556           uClibc.  If you will be using uClibc with C++, or if you need the gcc
557           __attribute__((constructor)) and __attribute__((destructor)) to work,
558           then you definitely want to answer Y here.  If you don't need ctors
559           or dtors and want your binaries to be as small as possible, then
560           answer N.
562 config LDSO_GNU_HASH_SUPPORT
563         bool "Enable GNU hash style support"
564         depends on HAVE_SHARED && !TARGET_mips
565         help
566           Newest binutils support a new hash style named GNU-hash. The dynamic
567           linker will use the new GNU-hash section (.gnu.hash) for symbol lookup
568           if present into the ELF binaries, otherwise it will use the old SysV
569           hash style (.hash). This ensures that it is completely backward
570           compatible.
571           Further, being the hash table implementation self-contained into each
572           executable and shared libraries, objects with mixed hash style can
573           peacefully coexist in the same process.
575           If you want to use this new feature, answer Y
577 choice
578         prompt "Thread support"
579         default HAS_NO_THREADS
580         help
581           If you want to compile uClibc with pthread support, then answer Y.
582           This will increase the size of uClibc by adding a bunch of locking
583           to critical data structures, and adding extra code to ensure that
584           functions are properly reentrant.
586 config HAS_NO_THREADS
587         bool "none"
588         help
589           Disable thread support.
591 config UCLIBC_HAS_LINUXTHREADS
592         bool "Linuxthreads"
593         # linuxthreads need nanosleep()
594         select UCLIBC_HAS_REALTIME
595         depends on !TARGET_aarch64 && \
596                    !TARGET_riscv64 && \
597                    !TARGET_riscv32 && \
598                    !TARGET_metag
599         help
600           If you want to compile uClibc with Linuxthreads support, then answer Y.
602 config UCLIBC_HAS_THREADS_NATIVE
603         bool "Native POSIX Threading (NPTL)"
604         select UCLIBC_HAS_TLS
605         select UCLIBC_HAS_STDIO_FUTEXES
606         select UCLIBC_HAS_REALTIME
607         # i386 has no lowlevellock support (yet) as opposed to i486 onward
608         depends on !CONFIG_386 && \
609                    !TARGET_alpha && \
610                    !TARGET_avr32 && \
611                    !TARGET_bfin && \
612                    !TARGET_c6x && \
613                    !TARGET_cris && \
614                    !TARGET_frv && \
615                    !TARGET_h8300 && \
616                    !TARGET_hppa && \
617                    !TARGET_ia64 && \
618                    (ARCH_USE_MMU || TARGET_arm)
619         help
620           If you want to compile uClibc with NPTL support, then answer Y.
622 endchoice
624 config UCLIBC_HAS_THREADS
625         def_bool y if !HAS_NO_THREADS
627 config UCLIBC_HAS_TLS
628         bool "Thread-Local Storage"
629         depends on UCLIBC_HAS_THREADS_NATIVE
630         help
631           If you want to enable TLS support then answer Y.
632           This is fast an efficient way to store per-thread local data
633           which is not on stack. It needs __thread support enabled in
634           gcc.
636 config PTHREADS_DEBUG_SUPPORT
637         bool "Build pthreads debugging support"
638         depends on UCLIBC_HAS_THREADS
639         help
640           Say Y here if you wish to be able to debug applications that use
641           uClibc's pthreads library.  By enabling this option, a library
642           named libthread_db will be built.  This library will be dlopen()'d
643           by gdb and will allow gdb to debug the threads in your application.
645           IMPORTANT NOTE!  Because gdb must dlopen() the libthread_db library,
646           you must compile gdb with uClibc in order for pthread debugging to
647           work properly.
649           If you are doing development and want to debug applications using
650           uClibc's pthread library, answer Y.  Otherwise, answer N.
652 config PTHREADS_STACK_DEFAULT_SIZE
653         int "Default thread stack size"
654         default 4194304 if TARGET_alpha # 4 MiB
655         default 4194304 if TARGET_powerpc # 4 MiB
656         default 2097152 # 2 MiB
657         help
658           Set the default thread stack size. This option is useful on MMU-less
659           systems where the stack size is fixed and the default stack size may
660           be excessively large and waste memory.
662 config UCLIBC_HAS_SYSLOG
663         bool "Syslog support"
664         default y
665         depends on UCLIBC_HAS_NETWORK_SUPPORT
666         select UCLIBC_HAS_SOCKET
667         help
668           Support sending messages to the system logger.
669           This requires socket-support.
671 config UCLIBC_HAS_LFS
672         def_bool y
673         help
674           Large file support (always enabled; config symbol retained for
675           feature test to be compatible with uClibc).
676 choice
677         prompt "Malloc Implementation"
678         default MALLOC if ! ARCH_USE_MMU
679         default MALLOC_STANDARD if ARCH_USE_MMU
681 config MALLOC
682         bool "malloc"
683         help
684           "malloc" use mmap for all allocations and so works very well on
685           MMU-less systems that do not support the brk() system call.   It is
686           pretty smart about reusing already allocated memory, and minimizing
687           memory wastage.
688           This is the default for uClinux MMU-less systems.
690 config MALLOC_SIMPLE
691         bool "malloc-simple"
692         help
693           "malloc-simple" is trivially simple and slow as molasses.  It
694           was written from scratch for uClibc, and is the simplest possible
695           (and therefore smallest) malloc implementation.
697           This uses only the mmap() system call to allocate and free memory,
698           and does not use the brk() system call at all, making it a fine
699           choice for MMU-less systems with very limited memory.  It's 100%
700           standards compliant, thread safe, very small, and releases freed
701           memory back to the OS immediately rather than keeping it in the
702           process's heap for reallocation.  It is also VERY SLOW.
704 config MALLOC_STANDARD
705         bool "malloc-standard"
706         depends on ARCH_USE_MMU
707         help
708           "malloc-standard" is derived from the public domain dlmalloc
709           implementation by Doug Lea.  It is quite fast, and is pretty smart
710           about reusing already allocated memory, and minimizing memory
711           wastage.  This uses brk() for small allocations, while using mmap()
712           for larger allocations.  This is the default malloc implementation
713           for uClibc.
715           If unsure, answer "malloc-standard".
717 endchoice
719 config UCLIBC_DYNAMIC_ATEXIT
720         bool "Dynamic atexit() Support"
721         default y
722         help
723           When this option is enabled, uClibc will support an infinite number,
724           of atexit() and on_exit() functions, limited only by your available
725           memory.  This can be important when uClibc is used with C++, since
726           global destructors are implemented via atexit(), and it is quite
727           possible to exceed the default number when this option is disabled.
728           Enabling this option adds a few bytes, and more significantly makes
729           atexit and on_exit depend on malloc, which can be bad when compiling
730           static executables.
732           Unless you use uClibc with C++, you should probably answer N.
734 config UCLIBC_HAS_UTMPX
735         bool "utmpx based support for tracking login/logouts to/from the system"
736         help
737           Answer y to enable support for accessing user accounting database.
738           It can be used to track all login/logout to the system.
740 config UCLIBC_HAS_UTMP
741         bool "utmp support (XPG2 compat, SVr4 compat)"
742         depends on UCLIBC_HAS_UTMPX
743         help
744           Answer y to enable legacy SVID support for accessing
745           user accounting database:
746                    getutent(), getutid(), getutline(), pututline(),
747                    setutent(), endutent(), utmpname() in utmp.h
748           It can be used to track all login/logout to the system.
750           If unsure, answer N and use corresponding POSIX functions
751           from utmpx.h
753 config UCLIBC_SUSV2_LEGACY
754         bool "Enable SuSv2 LEGACY functions"
755         help
756           Enable this option if you want to have SuSv2 LEGACY functions
757           Currently applies to:
759           valloc
761           WARNING! ABI incompatibility.
763 config UCLIBC_SUSV3_LEGACY
764         bool "Enable SuSv3 LEGACY functions"
765         #vfork,
766         # h_errno
767         # gethostbyaddr
768         # gethostbyname
769         help
770           Enable this option if you want to have SuSv3 LEGACY functions
771           in the library, else they are replaced by SuSv3 proposed macros.
772           Currently applies to:
774           bcmp, bcopy, bzero, index, rindex, ftime,
775           bsd_signal, (ecvt), (fcvt), gcvt, (getcontext),
776           (getwd), (makecontext),
777           mktemp, (pthread_attr_getstackaddr), (pthread_attr_setstackaddr),
778           scalb, (setcontext), (swapcontext), ualarm, usleep,
779           wcswcs.
781           WARNING! ABI incompatibility.
783 config UCLIBC_HAS_CONTEXT_FUNCS
784         bool "Use obsolescent context control functions"
785         depends on UCLIBC_SUSV3_LEGACY && ARCH_HAS_UCONTEXT
786         help
787           Add into library the SuSv3 obsolescent functions used for context
788           control. The setcontext family allows the implementation in C of
789           advanced control flow patterns such as iterators, fibers, and
790           coroutines. They may be viewed as an advanced version of
791           setjmp/longjmp; whereas the latter allows only a single non-local jump
792           up the stack, setcontext allows the creation of multiple cooperative
793           threads of control, each with its own stack.
794           These functions are: setcontext, getcontext, makecontext, swapcontext.
796 config UCLIBC_SUSV3_LEGACY_MACROS
797         bool "Enable SuSv3 LEGACY macros"
798         help
799           Enable this option if you want to have SuSv3 LEGACY macros.
800           Currently applies to bcopy/bzero/bcmp/index/rindex et al.
801           WARNING! ABI incompatibility.
803 config UCLIBC_SUSV4_LEGACY
804         bool "Enable SuSv4 LEGACY or obsolescent functions"
805         help
806           Enable this option if you want to have SuSv4 LEGACY functions
807           and macros in the library.
808           Currently applies to:
810           - XSI functions:
811             _longjmp, _setjmp, _tolower, _toupper, ftw, getitimer,
812             gettimeofday, isascii, pthread_getconcurrency,
813             pthread_setconcurrency, setitimer, setpgrp, sighold,
814             sigignore, sigpause, sigrelse, sigset, siginterrupt,
815             tempnam, toascii, ulimit.
817           - Base functions:
818             asctime, asctime_r, ctime, ctime_r, gets, rand_r,
819             tmpnam, utime.
821           WARNING! ABI incompatibility.
823 config UCLIBC_STRICT_HEADERS
824         bool "Hide structures and constants for unsupported features"
825         help
826           Hide structures and constants in headers that should not be used,
827           because the respective feature is disabled.
829           WARNING! enabling this option requires to patch many faulty apps,
830           since they make (wrongly) use of these structures/constants,
831           although the feature was disabled.
833 config UCLIBC_HAS_STUBS
834         bool "Provide stubs for unavailable functionality"
835         help
836           With this option uClibc provides non-functional stubs for
837           functions which are impossible to implement on the target
838           architecture. Otherwise, such functions are simply omitted.
840 config UCLIBC_HAS_SHADOW
841         bool "Shadow Password Support"
842         default y
843         help
844           Answer N if you do not need shadow password support.
845           Most people will answer Y.
847 config UCLIBC_HAS_PROGRAM_INVOCATION_NAME
848         bool "Support for program_invocation_name"
849         help
850           Support for the GNU-specific program_invocation_name and
851           program_invocation_short_name strings.  Some GNU packages
852           (like tar and coreutils) utilize these for extra useful
853           output, but in general are not required.
855           At startup, these external strings are automatically set
856           up based on the value of ARGV[0].
858           If unsure, just answer N.
860 config UCLIBC_HAS___PROGNAME
861         bool "Support for __progname"
862         default y
863         help
864           Some packages (like openssh) like to peek into internal libc
865           symbols to make their output a bit more user friendly.
867           At startup, __progname is automatically set up based on the
868           value of ARGV[0].
870           If unsure, just answer N.
872 config UCLIBC_HAS_PTY
873         bool "Support for pseudo-terminals"
874         default y
875         help
876           This enables support for pseudo-terminals (see man 4 pts
877           and man 7 pty).
879           If unsure, just answer Y.
881 config ASSUME_DEVPTS
882         bool "Assume that /dev/pts is a devpts or devfs file system"
883         default y
884         depends on UCLIBC_HAS_PTY
885         help
886           Enable this if /dev/pts is on a devpts or devfs filesystem.  Both
887           these filesystems automatically manage permissions on the /dev/pts
888           devices.  You may need to mount your devpts or devfs filesystem on
889           /dev/pts for this to work.
891           Most people should answer Y.
893 config UNIX98PTY_ONLY
894         bool "Support only Unix 98 PTYs"
895         default y
896         depends on UCLIBC_HAS_PTY
897         help
898           If you want to support only Unix 98 PTYs enable this.  Some older
899           applications may need this disabled and will thus use legacy BSD
900           style PTY handling which is more complex and also bigger than
901           Unix 98 PTY handling.
903           For most current programs, you can generally answer Y.
905 if UNIX98PTY_ONLY
906 config UCLIBC_HAS_GETPT
907         bool "Support getpt() (glibc-compat)"
908         depends on UCLIBC_HAS_PTY
909         help
910           Some packages may need getpt().
911           All of those are non-standard and can be considered
912           GNU/libc compatibility.
913           Either use posix_openpt() or just open /dev/ptmx yourself.
915           If unsure, just say N.
916 endif
918 if !UNIX98PTY_ONLY
919 # Have to use __libc_ptyname{1,2}[] and related bloat
920 config UCLIBC_HAS_GETPT
921         def_bool y
922 endif
924 config UCLIBC_HAS_LIBUTIL
925         bool "Provide libutil library and functions"
926         depends on UCLIBC_HAS_PTY
927         help
928           Provide a libutil library.
929           This non-standard conforming library provides the following
930           utility functions:
932           forkpty(): combines openpty(), fork(2), and login_tty() to
933                        create a new process operating in a pseudo-terminal.
934           login(): write utmp and wtmp entries
935           login_tty(): prepares for a login on the tty fd by creating a
936                        new session, making fd the controlling terminal for
937                        the calling process, setting fd to be the standard
938                        input, output, and error streams of the current
939                        process, and closing fd.
940           logout(): write utmp and wtmp entries
941           logwtmp(): constructs a utmp structure and calls updwtmp() to
942                        append the structure to the utmp file.
943           openpty(): finds an available pseudo-terminal and returns
944                        file descriptors for the master and slave
946           This library adds about 3k-4k to your system.
948 config UCLIBC_HAS_TM_EXTENSIONS
949         bool "Support 'struct tm' timezone extension fields"
950         default y
951         help
952           Enabling this option adds fields to 'struct tm' in time.h for
953           tracking the number of seconds east of UTC, and an abbreviation for
954           the current timezone.  These fields are not specified by the SuSv3
955           standard, but they are commonly used in both GNU and BSD application
956           code.
958           To strictly follow the SuSv3 standard, leave this disabled.
959           Most people will probably want to answer Y.
961 config UCLIBC_HAS_TZ_CACHING
962         bool "Enable caching of the last valid timezone 'TZ' string"
963         default y
964         help
965           Answer Y to enable caching of the last valid 'TZ' string describing
966           the timezone setting.  This allows a quick string compare to avoid
967           repeated parsing of unchanged 'TZ' strings when tzset() is called.
969           Most people will answer Y.
971 config UCLIBC_HAS_TZ_FILE
972         bool "Enable '/etc/TZ' file support to set a default timezone (uClibc-specific)"
973         default y
974         help
975           Answer Y to enable the setting of a default timezone for uClibc.
977           Ordinarily, uClibc gets the timezone information exclusively from the
978           'TZ' environment variable.  In particular, there is no support for
979           the zoneinfo directory tree or the /etc/timezone file used by glibc.
981           With this option enabled, uClibc will use the value stored in the
982           file '/etc/TZ' (default path) to obtain timezone information if the
983           'TZ' environment variable is missing or has an invalid value.  The
984           file consists of a single line (newline required) of text describing
985           the timezone in the format specified for the TZ environment variable.
987           Doing 'echo CST6CDT > /etc/TZ' is enough to create a valid file.
988           See
989           http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
990           for details on valid settings of 'TZ'.
992           Most people will answer Y.
994 config UCLIBC_HAS_TZ_FILE_READ_MANY
995         bool "Repeatedly read the '/etc/TZ' file"
996         depends on UCLIBC_HAS_TZ_FILE
997         default y
998         help
999           Answer Y to enable repeated reading of the '/etc/TZ' file even after
1000           a valid value has been read.  This incurs the overhead of an
1001           open/read/close for each tzset() call (explicit or implied).  However,
1002           setting this will allow applications to update their timezone
1003           information if the contents of the file change.
1005           Most people will answer Y.
1007 config UCLIBC_TZ_FILE_PATH
1008         string "Path to the 'TZ' file for setting the global timezone"
1009         depends on UCLIBC_HAS_TZ_FILE
1010         default "/etc/TZ"
1011         help
1012           This is the path to the 'TZ' file.
1014           Most people will use the default of '/etc/TZ'.
1016 config UCLIBC_FALLBACK_TO_ETC_LOCALTIME
1017         bool "Use /etc/localtime as a fallback"
1018         depends on UCLIBC_HAS_TZ_FILE
1019         default y
1020         help
1021           Answer Y to try to use /etc/localtime file.
1022           On glibc systems this file (if it is in TZif2 format)
1023           contains timezone string at the end.
1025           Most people will answer Y.
1027 config UCLIBC_USE_TIME64
1028         bool "Use *time64 syscalls instead of 32bit ones (if possible)"
1029         depends on TARGET_arc                            || \
1030                    TARGET_arm                            || \
1031                    TARGET_microblaze                     || \
1032                    (TARGET_mips && !CONFIG_MIPS_N64_ABI) || \
1033                    TARGET_or1k                           || \
1034                    TARGET_powerpc                        || \
1035                    TARGET_riscv32                        || \
1036                    TARGET_sparc                          || \
1037                    TARGET_sh                             || \
1038                    TARGET_xtensa
1039         # TODO: add support for other architectures
1040         default n
1042         help
1043           Replace 32bit syscalls to their 64/time64 analog if possible.
1045 endmenu
1047 menu "Advanced Library Settings"
1049 config UCLIBC_PWD_BUFFER_SIZE
1050         int "Buffer size for getpwnam() and friends"
1051         default 256
1052         range 12 1024
1053         help
1054           This sets the value of the buffer size for getpwnam() and friends.
1055           By default, this is 256. (For reference, glibc uses 1024).
1056           The value can be found using sysconf() with the _SC_GETPW_R_SIZE_MAX
1057           parameter.
1059 config UCLIBC_GRP_BUFFER_SIZE
1060         int "Buffer size for getgrnam() and friends"
1061         default 256
1062         range 12 1024
1063         help
1064           This sets the value of the buffer size for getgrnam() and friends.
1065           By default, this is 256. (For reference, glibc uses 1024).
1066           The value can be found using sysconf() with the _SC_GETGR_R_SIZE_MAX
1067           parameter.
1069 comment "Support various families of functions"
1071 config UCLIBC_LINUX_SPECIFIC
1072         bool "Linux specific functions"
1073         default y
1074         help
1075           accept4(), bdflush(),
1076           capget(), capset(), eventfd(), fallocate(),
1077           fstatfs(), getrandom(), inotify_*(), ioperm(), iopl(),
1078           madvise(), modify_ldt(), pipe2(), personality(),
1079           prctl()/arch_prctl(), pivot_root(), modify_ldt(),
1080           ppoll(), readahead(), reboot(), remap_file_pages(),
1081           sched_getaffinity(), sched_setaffinity(), sendfile(),
1082           setfsgid(), setfsuid(), setresgid(), setresuid(),
1083           splice(), vmsplice(), tee(), signalfd(), statfs(),
1084           swapoff(), swapon(), sync_file_range(), syncfs(),
1085           _sysctl(), sysinfo(), timerfd_*(), vhangup(), umount(),
1086           umount2()
1088 config UCLIBC_HAS_GNU_ERROR
1089         bool "Support GNU extensions for error-reporting"
1090         default y
1091         help
1092           Support for the GNU-specific error(), error_at_line(),
1093           void (* error_print_progname)(), error_message_count
1094           functions and variables.  Some GNU packages
1095           utilize these for extra useful output, but in general
1096           are not required.
1098           If unsure, just answer N.
1100 config UCLIBC_BSD_SPECIFIC
1101         bool "BSD specific functions"
1102         default y
1103         help
1104           mincore(), getdomainname(), setdomainname()
1106           If unsure, say N.
1108 config UCLIBC_HAS_BSD_ERR
1109         bool "BSD err functions"
1110         default y
1111         help
1112           These functions are non-standard BSD extensions.
1113           err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()
1115           If unsure, say N.
1117 config UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
1118         bool "BSD obsolete signal functions"
1119         help
1120           These functions are provided as a compatibility interface for
1121           programs that make use of the historical System V signal API.
1122           This API is obsolete:
1123           new applications should use the POSIX signal API (sigaction(2),
1124           sigprocmask(2), etc.).
1125           Affected functions:
1127           sigset(), sighold(), sigrelse(), sigignore()
1129           If unsure, say N.
1131 config UCLIBC_HAS_BSD_B64_NTOP_B64_PTON
1132         bool "Support b64_ntop(), b64_pton() (bsd-compat)"
1133         help
1134           Answer Y if you need additional BSD compatibility
1135           (e.g. for openbsd-netcat).
1137           Most people will say N.
1139 config UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL
1140         bool "SYSV obsolete signal functions"
1141         help
1142           Use of sysv_signal() should be avoided; use sigaction(2) instead.
1144           If unsure, say N.
1146 config UCLIBC_NTP_LEGACY
1147         bool "ntp_*() aliases"
1148         help
1149           Provide legacy aliases for ntp functions:
1150           ntp_adjtime(), ntp_gettime()
1152           It is safe to say N here.
1154 config UCLIBC_SV4_DEPRECATED
1155         bool "Enable SVr4 deprecated functions"
1156         help
1157           These functions are DEPRECATED in System V release 4.
1158           Say N unless you desparately need one of the functions below:
1160           ustat() [use statfs(2) in your code instead]
1162 config UCLIBC_HAS_REALTIME
1163         bool "Realtime-related family of SUSv functions"
1164         default y
1165         help
1166           These functions are part of the Timers option and need not
1167           be available on all implementations.
1168           Includes AIO, message-queue, scheduler, semaphore functions:
1170           aio.h
1171           mqueue.h
1172           sched.h
1173           semaphore.h
1175           aio_cancel()
1176           aio_error()
1177           aio_fsync()
1178           aio_read()
1179           lio_listio()
1180           aio_return()
1181           aio_suspend()
1182           aio_write()
1183           clock_getres(), clock_gettime(), clock_settime()
1184           fdatasync()
1185           mlockall(), munlockall()
1186           mlock(), munlock()
1187           mq_close()
1188           mq_getattr()
1189           mq_notify()
1190           mq_open()
1191           mq_receive()
1192           mq_send()
1193           mq_setattr()
1194           mq_unlink()
1195           nanosleep()
1196           sched_getparam()
1197           sched_get_priority_max(), sched_get_priority_min()
1198           sched_getscheduler()
1199           sched_rr_get_interval()
1200           sched_setparam()
1201           sched_setscheduler()
1202           sem_close()
1203           sem_destroy()
1204           sem_getvalue()
1205           sem_init()
1206           sem_open()
1207           sem_post()
1208           sem_trywait(), sem_wait()
1209           sem_unlink()
1210           sigqueue()
1211           sigtimedwait(), sigwaitinfo()
1212           timer_create()
1213           timer_delete()
1214           timer_getoverrun(), timer_gettime(), timer_settime()
1216 config UCLIBC_HAS_ADVANCED_REALTIME
1217         bool "Advanced realtime-related family of SUSv functions"
1218         default y
1219         depends on UCLIBC_HAS_REALTIME
1220         help
1221           These functions are part of the Timers option and need not
1222           be available on all implementations.
1224           clock_getcpuclockid()
1225           clock_nanosleep()
1226           mq_timedreceive()
1227           mq_timedsend()
1228           posix_fadvise()
1229           posix_fallocate()
1230           posix_madvise()
1231           posix_memalign()
1232           posix_mem_offset()
1233           posix_spawnattr_destroy(), posix_spawnattr_init()
1234           posix_spawnattr_getflags(), posix_spawnattr_setflags()
1235           posix_spawnattr_getpgroup(), posix_spawnattr_setpgroup()
1236           posix_spawnattr_getschedparam(), posix_spawnattr_setschedparam()
1237           posix_spawnattr_getschedpolicy(), posix_spawnattr_setschedpolicy()
1238           posix_spawnattr_getsigdefault(), posix_spawnattr_setsigdefault()
1239           posix_spawnattr_getsigmask(), posix_spawnattr_setsigmask()
1240           posix_spawn_file_actions_addclose()
1241           posix_spawn_file_actions_adddup2()
1242           posix_spawn_file_actions_addopen()
1243           posix_spawn_file_actions_destroy()
1244           posix_spawn_file_actions_init()
1245           posix_spawn()
1246           posix_spawnp()
1247           posix_typed_mem_get_info()
1248           pthread_mutex_timedlock()
1249           sem_timedwait()
1251 #config UCLIBC_HAS_TERMIOS
1252 #       bool "termios functions"
1253 #       default y
1254 #       help
1255 #         Get and set terminal attributes, line control, get and set baud
1256 #         rate.
1257 #         termios(), tcgetattr(), tcsetattr(), tcsendbreak(), tcdrain(),
1258 #         tcflush(), tcflow(), cfmakeraw(), cfgetospeed(), cfgetispeed(),
1259 #         cfsetispeed(), cfsetospeed(), cfsetspeed()
1261 #         If unsure, say Y.
1263 config UCLIBC_HAS_EPOLL
1264         bool "epoll"
1265         default y
1266         help
1267           epoll_create(), epoll_ctl(), epoll_wait() functions.
1269 config UCLIBC_HAS_XATTR
1270         bool "Extended Attributes"
1271         default y
1272         help
1273           Extended Attributes support.
1275           setxattr()
1276           lsetxattr()
1277           fsetxattr()
1278           getxattr()
1279           lgetxattr()
1280           fgetxattr()
1281           listxattr()
1282           llistxattr()
1283           flistxattr()
1284           removexattr()
1285           lremovexattr()
1286           fremovexattr()
1288           Say N unless you need support for extended attributes and the
1289           filesystems do actually support them.
1291 config UCLIBC_HAS_PROFILING
1292         bool "Profiling support"
1293         default y
1294         help
1295           gcc's -finstrument-functions needs these.
1297           Most people can safely answer N.
1299 config UCLIBC_HAS_CRYPT_IMPL
1300         bool "libcrypt support"
1301         default y
1302         help
1303           libcrypt contains crypt(), setkey() and encrypt()
1305 config UCLIBC_HAS_SHA256_CRYPT_IMPL
1306         bool "libcrypt SHA256 support"
1307         depends on UCLIBC_HAS_CRYPT_IMPL
1308         help
1309           This adds support for SHA256 password hashing via the crypt() function.
1310           Say N here if you do not need SHA256 crypt support.
1312 config UCLIBC_HAS_SHA512_CRYPT_IMPL
1313         bool "libcrypt SHA512 support"
1314         depends on UCLIBC_HAS_CRYPT_IMPL
1315         help
1316           This adds support for SHA512 password hashing via the crypt() function.
1317           Say N here if you do not need SHA512 crypt support.
1319 config UCLIBC_HAS_CRYPT_STUB
1320         bool "libcrypt stubs"
1321         default y
1322         depends on !UCLIBC_HAS_CRYPT_IMPL
1323         help
1324           Standards mandate that crypt(3) provides a stub if it is unavailable.
1325           If you enable this option then stubs for
1326             crypt(), setkey() and encrypt()
1327           will be provided in a small libcrypt.
1329 config UCLIBC_HAS_CRYPT
1330         def_bool y
1331         depends on UCLIBC_HAS_CRYPT_IMPL || UCLIBC_HAS_CRYPT_STUB
1332 endmenu
1334 menuconfig UCLIBC_HAS_NETWORK_SUPPORT
1335         bool "Networking Support"
1336         default y
1337         help
1338           Say N here if you do not need network support.
1340 if UCLIBC_HAS_NETWORK_SUPPORT
1341 config UCLIBC_HAS_SOCKET
1342         bool "Socket support"
1343         default y
1344         help
1345           If you want to include support for sockets then answer Y.
1347 config UCLIBC_HAS_IPV4
1348         bool "IP version 4 support"
1349         default y
1350         select UCLIBC_HAS_SOCKET
1351         help
1352           If you want to include support for the Internet Protocol
1353           (IP version 4) then answer Y.
1355           Most people will say Y.
1357 config UCLIBC_HAS_IPV6
1358         bool "IP version 6 support"
1359         select UCLIBC_HAS_SOCKET
1360         help
1361           If you want to include support for the next version of the Internet
1362           Protocol (IP version 6) then answer Y.
1364           Most people should answer N.
1366 config UCLIBC_USE_NETLINK
1367         bool "Use netlink to query interfaces"
1368         depends on UCLIBC_HAS_SOCKET
1369         help
1370           In newer versions of Linux (2.4.17+), support was added for querying
1371           network device information via netlink rather than the old style
1372           ioctl's.  Most of the time, the older ioctl style is sufficient (and
1373           it is smaller than netlink), but if you find that not all of your
1374           devices are being returned by the if_nameindex() function, you will
1375           have to use the netlink implementation.
1377           Most people can safely answer N.
1379 config UCLIBC_SUPPORT_AI_ADDRCONFIG
1380         bool "Support the AI_ADDRCONFIG flag"
1381         depends on UCLIBC_USE_NETLINK
1382         help
1383           The implementation of AI_ADDRCONFIG is aligned with the glibc
1384           implementation using netlink to query interfaces to find both
1385           ipv4 and ipv6 support. This is only needed if an application uses
1386           the AI_ADDRCONFIG flag.
1388           Most people can safely answer N.
1390 config UCLIBC_HAS_BSD_RES_CLOSE
1391         bool "Support res_close() (bsd-compat)"
1392         help
1393           Answer Y if you desperately want to support BSD compatibility in
1394           the network code.
1396           Most people will say N.
1398 config UCLIBC_HAS_COMPAT_RES_STATE
1399         bool "Use compatible but bloated _res"
1400         default y
1401         help
1402           Answer Y if you build network utilities and they muck with resolver
1403           internals a lot (_res global structure). uclibc does not use most
1404           of _res.XXX fields, and with this option OFF they won't even exist.
1405           Which will make e.g. dig build fail.
1406           Answering N saves around 400 bytes in bss.
1408 config UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
1409         bool "Use extra compatible but extra bloated _res"
1410         help
1411           Answer Y if selecting UCLIBC_HAS_COMPAT_RES_STATE is not enough.
1412           As far as I can say, this should never be needed.
1414 config UCLIBC_HAS_RESOLVER_SUPPORT
1415         bool "DNS resolver functions"
1416         select UCLIBC_HAS_COMPAT_RES_STATE
1417         depends on UCLIBC_HAS_IPV4 || UCLIBC_HAS_IPV6
1418         help
1419           Provide implementations for DNS resolver functions.
1420           In particular, the following functions will be added to the
1421           library:
1423           ns_skiprr, ns_initparse, ns_parserr, ns_msg_getflag,
1424           res_mkquery, res_init, res_ninit, res_close, res_nclose
1425           res_query, res_search, res_querydomain,
1426           dn_expand, dn_comp,
1427           ns_name_uncompress, ns_name_ntop, ns_name_pton, ns_name_unpack,
1428           ns_name_pack, ns_name_compress, ns_name_skip, dn_skipname,
1429           ns_get16, ns_get32, ns_put16, ns_put32
1431 choice
1432         prompt "DNS Query ID generation"
1433         default UCLIBC_DNSRAND_MODE_PRNGPLUS
1434         help
1435           Control how successive dns query ids' are generated during
1436           dns lookup.
1438 config UCLIBC_DNSRAND_MODE_URANDOM
1439         bool "urandom"
1440         help
1441           "urandom" uses /dev/urandom available under many unix flavours
1442           to generate dns query id. This can generate good random ids,
1443           by dipping into the entropy pool maintained by the system.
1444           However this is relatively slow compared to the other options,
1445           as it may involve cryptographic operations internally and
1446           kernel-userspace handshake.
1448 config UCLIBC_DNSRAND_MODE_CLOCK
1449         bool "clock"
1450         depends on UCLIBC_HAS_REALTIME
1451         help
1452           "clock" uses CLOCK_REALTIME of the system to generate plausibly
1453           random dns query id. Systems require to have clock source with
1454           nanosec granularity mapped to this clock id for this to generate
1455           plausibly random values. However has processor and io performances
1456           improve in future, its effectiveness can get impacted.
1458 config UCLIBC_DNSRAND_MODE_PRNGPLUS
1459         bool "prngplus"
1460         help
1461           "prngplus" uses random prng available within uclibc, to indirectly
1462           generate the dns query id. This tries to provide a good balance
1463           between speed and randomness to an extent. It periodically reseeds
1464           the prng using random value generated from either the urandom or
1465           else the clock, if either of them is available. Additionally applies
1466           transform (one way, if possible) on internal generated random values.
1467           These make it difficult to infer internal state of prng from unbroken
1468           sequences of exposed random values.
1469           This is the default.
1471 config UCLIBC_DNSRAND_MODE_SIMPLECOUNTER
1472         bool "simplecounter"
1473         help
1474           "simplecounter" uses a simple counter to generate dns query id.
1475           This is a very simple logic and can be subjected to dns poison
1476           attack relatively easily.
1477           It is recommended to avoid this option.
1479 endchoice
1482 endif
1485 menu "String and Stdio Support"
1487 config UCLIBC_HAS_STRING_GENERIC_OPT
1488         bool "Use faster (but larger) generic string functions"
1489         default y
1490         help
1491           Answer Y to use the (tweaked) glibc generic string functions.
1493           In general, they are faster (but 3-5K larger) than the base
1494           uClibc string functions which are optimized solely for size.
1496           Many people will answer Y.
1498 config UCLIBC_HAS_STRING_ARCH_OPT
1499         bool "Use arch-specific assembly string functions (where available)"
1500         default y
1501         help
1502           Answer Y to use any archtecture-specific assembly language string
1503           functions available for this target plaform.
1505           Note that assembly implementations are not available for all string
1506           functions, so some generic (written in C) string functions may
1507           still be used.
1509           These are small and fast, the only reason _not_ to say Y here is
1510           for debugging purposes.
1512 config UCLIBC_HAS_STDIO_FUTEXES
1513         bool "Use futexes for multithreaded I/O locking"
1514         depends on UCLIBC_HAS_THREADS_NATIVE
1515         help
1516           If you want to compile uClibc to use futexes for low-level
1517           I/O locking, answer Y.  Otherwise, answer N.
1519 config UCLIBC_HAS_CTYPE_TABLES
1520         bool "Use Table Versions Of 'ctype.h' Functions."
1521         default y
1522         help
1523           Answer Y to use table versions of the 'ctype.h' functions.
1524           While the non-table versions are often smaller when building
1525           statically linked apps, they work only in stub locale mode.
1527           Most people will answer Y.
1529 config UCLIBC_HAS_CTYPE_SIGNED
1530         bool "Support Signed Characters In 'ctype.h' Functions."
1531         depends on UCLIBC_HAS_CTYPE_TABLES
1532         default y
1533         help
1534           Answer Y to enable support for passing signed char values to
1535           the 'ctype.h' functions.  ANSI/ISO C99 and SUSv3 specify that
1536           these functions are only defined for unsigned char values and
1537           EOF.  However, glibc allows negative signed char values as well
1538           in order to support 'broken old programs'.
1540           Most people will answer Y.
1542 choice
1543         prompt "ctype argument checking"
1544         depends on UCLIBC_HAS_CTYPE_TABLES
1545         default UCLIBC_HAS_CTYPE_UNSAFE
1546         help
1547           Please select the invalid arg behavior you want for the 'ctype'
1548           functions.
1550           The 'ctype' functions are now implemented using table lookups, with
1551           the arg being the index.  This can result in incorrect memory accesses
1552           or even segfaults for args outside of the allowed range.
1554           NOTE: This only affects the 'ctype' _functions_.  It does not affect
1555           the macro implementations.
1557 config UCLIBC_HAS_CTYPE_UNSAFE
1558         bool "Do not check -- unsafe"
1560 config UCLIBC_HAS_CTYPE_CHECKED
1561         bool "Detect and handle appropriately"
1563 config UCLIBC_HAS_CTYPE_ENFORCED
1564         bool "Issue a diagnostic and abort()"
1566 endchoice
1569 config UCLIBC_HAS_WCHAR
1570         bool "Wide Character Support"
1571         help
1572           Answer Y to enable wide character support.  This will make uClibc
1573           much larger.  It is also currently required for locale support.
1575           Most people will answer N.
1577 config UCLIBC_HAS_LIBICONV
1578         bool "Iconv Support"
1579         select UCLIBC_HAS_WCHAR
1580         help
1581           Add tiny iconv support for charset conversion from and to UTF-8.
1583 config UCLIBC_HAS_LIBINTL
1584         bool "Intl stubs support"
1585         help
1586           If you enable this option you get stubs for the gettext family of
1587           functions.
1589 config UCLIBC_HAS_LOCALE
1590         bool "Locale Support"
1591         select UCLIBC_HAS_WCHAR
1592         select UCLIBC_HAS_CTYPE_TABLES
1593         select UCLIBC_HAS_LIBICONV
1594         help
1595           uClibc now has full ANSI/ISO C99 locale support (except for
1596           wcsftime() and collating items in regex).  Be aware that enabling
1597           this option will make uClibc much larger.
1599           Enabling UCLIBC_HAS_LOCALE with the default set of supported locales
1600           (169 UTF-8 locales, and 144 locales for other codesets) will enlarge
1601           uClibc by around 300k.  You can reduce this size by building your own
1602           custom set of locate data (see extra/locale/LOCALES for details).
1604           uClibc's locale support is still under development.  For example,
1605           codesets using shift states are not currently supported.  Support is
1606           planned in the next iteration of locale support.
1608           Answer Y to enable locale support.  Most people will answer N.
1610 choice
1612 prompt "Locale data"
1613         depends on UCLIBC_HAS_LOCALE
1614         default UCLIBC_BUILD_MINIMAL_LOCALE
1616 config UCLIBC_BUILD_MINIMAL_LOCALE
1617         bool "Only selected locales"
1618         depends on UCLIBC_HAS_LOCALE
1619         help
1620           If you do not need all locales that are available on your
1621           host-box, then set this to 'Y'.
1623 config UCLIBC_BUILD_ALL_LOCALE
1624         bool "All locales"
1625         depends on UCLIBC_HAS_LOCALE
1626         help
1627           This builds all the locales that are available on your
1628           host-box.
1630 endchoice
1632 config UCLIBC_BUILD_MINIMAL_LOCALES
1633         string "locales to use"
1634         depends on UCLIBC_BUILD_MINIMAL_LOCALE
1635         default "en_US"
1636         help
1637           Space separated list of locales to use.
1639           E.g.:
1640               en_US en_GB de_AT
1641           default:
1642               en_US
1644 config UCLIBC_HAS_XLOCALE
1645         bool "Extended Locale Support (experimental/incomplete)"
1646         depends on UCLIBC_HAS_LOCALE
1647         help
1648           Answer Y to enable extended locale support similar to that provided
1649           by glibc.  This is primarily intended to support libstd++
1650           functionality.
1651           However, it also allows thread-specific locale selection via
1652           uselocale().
1654           Most people will answer N.
1656 config UCLIBC_HAS_HEXADECIMAL_FLOATS
1657         bool "Support hexadecimal float notation"
1658         depends on UCLIBC_HAS_CTYPE_TABLES
1659         depends on UCLIBC_HAS_FLOATS
1660         help
1661           Answer Y to enable support for hexadecimal float notation in the
1662           (wchar and) char string to floating point conversion functions, as
1663            well as support for the %a and %A conversion specifiers in the
1664            *printf() and *scanf() functions.
1666           Most people will answer N.
1668 config UCLIBC_HAS_GLIBC_DIGIT_GROUPING
1669         bool "Support glibc's \"'\" flag for allowing locale-specific digit grouping"
1670         depends on UCLIBC_HAS_LOCALE
1671         depends on UCLIBC_HAS_FLOATS
1672         help
1673           Answer Y to enable support for glibc's \"'\" flag for allowing
1674           locale-specific digit grouping in base 10 integer conversions and
1675           appropriate floating point conversions in the *printf() and *scanf()
1676           functions.
1678           Most people will answer N.
1680 config UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING
1681         bool "Do not require digit grouping when the \"'\" flag is specified"
1682         depends on UCLIBC_HAS_GLIBC_DIGIT_GROUPING
1683         default y
1684         help
1685           Answer Y to make digit grouping optional when the \"'\" flag is
1686           specified.
1687           This is the standard glibc behavior.  If the initial string of digits
1688           exceeds the maximum group number, the input will be treated as a
1689           normal non-grouped number.
1691           Most people will answer N.
1693 config UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
1694         bool "Support glibc's register_printf_function() (glibc-compat)"
1695         depends on !USE_OLD_VFPRINTF
1696         help
1697           Answer Y to support glibc's register_printf_function() to allow an
1698           application to add its own printf conversion specifiers.
1699           parse_printf_format() is also enabled.
1701           NOTE: Limits the number or registered specifiers to 10.
1702           NOTE: Requires new conversion specifiers to be ASCII
1703                 characters (0-0x7f).  This is to avoid problems with processing
1704                 format strings in locales with different multibyte conversions.
1706           Most people will answer N.
1708 config USE_OLD_VFPRINTF
1709         bool "Use the old vfprintf implementation"
1710         depends on !UCLIBC_HAS_WCHAR
1711         help
1712           Set to true to use the old vfprintf instead of the new.  This is
1713           roughly C89 compliant with some extensions, and is much smaller.
1714           However, it does not support wide chars, positional args, or glibc
1715           custom printf specifiers.
1717           Most people will answer N.
1719 config UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS
1720         int "Maximum number of positional args.  Either 0 or >= 9."
1721         depends on !USE_OLD_VFPRINTF
1722         default 9
1723         help
1724           Set the maximum number of positional args supported by the
1725           printf/scanf functions.  The Single Unix Specification Version 3
1726           requires a minimum value of 9.  Setting this to a value lower than
1727           9 will disable positional arg support and cause the NL_ARGMAX macro
1728           in limits.h to be #undef'd.
1730           WARNING!  The workspace to support positional args is currently
1731                     allocated on the stack.  You probably don't want to set
1732                     this to too high a value.
1734           Most people will answer 9.
1736 choice
1737         prompt "Stdio buffer size"
1738         default UCLIBC_HAS_STDIO_BUFSIZ_4096
1739         help
1740           Please select a value for BUFSIZ.  This will be used by the
1741           stdio subsystem as the default buffer size for a file, and
1742           affects fopen(), setvbuf(), etc.
1744           NOTE: Setting this to 'none' will disable buffering completely.
1745           However, BUFSIZ will still be defined in stdio.h as 256 because
1746           many applications use this value.
1748 config UCLIBC_HAS_STDIO_BUFSIZ_NONE
1749         bool "none (WARNING - BUFSIZ will be 256 in stdio.h)"
1750         depends on !UCLIBC_HAS_WCHAR
1752 config UCLIBC_HAS_STDIO_BUFSIZ_256
1753         bool "256 (minimum ANSI/ISO C99 value)"
1755 config UCLIBC_HAS_STDIO_BUFSIZ_512
1756         bool "512"
1758 config UCLIBC_HAS_STDIO_BUFSIZ_1024
1759         bool "1024"
1761 config UCLIBC_HAS_STDIO_BUFSIZ_2048
1762         bool "2048"
1764 config UCLIBC_HAS_STDIO_BUFSIZ_4096
1765         bool "4096"
1767 config UCLIBC_HAS_STDIO_BUFSIZ_8192
1768         bool "8192"
1770 # If you add more choices, you will need to update uClibc_stdio.h.
1772 endchoice
1774 choice
1775         prompt "Stdio builtin buffer size (uClibc-specific)"
1776         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1777         default UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
1778         help
1779           When a FILE is created with fopen(), an attempt is made to allocate
1780           a BUFSIZ buffer for it.  If the allocation fails, fopen() will still
1781           succeed but the FILE will be unbuffered.
1783           This option adds a small amount of space to each FILE to act as an
1784           emergency buffer in the event of a buffer allocation failure.
1786           Most people will answer None.
1788 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
1789         bool "None"
1791 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4
1792         bool "4"
1794 config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8
1795         bool "8"
1797 # If you add more choices, you will need to update uClibc_stdio.h.
1799 endchoice
1801 config UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT
1802         bool "Attempt to shutdown stdio subsystem when abort() is called."
1803         help
1804           ANSI/ISO C99 requires abort() to be asyn-signal-safe.  So there was
1805           a behavioral change made in SUSv3.  Previously, abort() was required
1806           to have the affect of fclose() on all open streams.  The wording has
1807           been changed to "may" from "shall".
1809           Most people will answer N.
1811 config UCLIBC_HAS_STDIO_GETC_MACRO
1812         bool "Provide a macro version of getc()"
1813         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1814         default y
1815         help
1816           Provide a macro version of getc().
1818           Most people will answer Y.
1820 config UCLIBC_HAS_STDIO_PUTC_MACRO
1821         bool "Provide a macro version of putc()"
1822         depends on !UCLIBC_HAS_STDIO_BUFSIZ_NONE
1823         default y
1824         help
1825           Provide a macro version of putc().
1827           Most people will answer Y.
1829 config UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION
1830         bool "Support auto-r/w transition"
1831         default y
1832         help
1833           Answer Y to enable the stdio subsystem to automaticly transition
1834           between reading and writing.  This relaxes the ANSI/ISO C99
1835           requirement:
1837           When a file is opened with update mode ('+' as the second or third
1838           character in the list of mode argument values), both input and output
1839           may be performed on the associated stream. However, output shall not
1840           be directly followed by input without an intervening call to the
1841           fflush function or to a file positioning function (fseek, fsetpos,
1842           or rewind), and input shall not be directly followed by output without
1843           an intervening call to a file positioning function, unless the input
1844           operation encounters end­of­file.
1846           Most people will answer Y.
1848 config UCLIBC_HAS_FOPEN_LARGEFILE_MODE
1849         bool "Support an fopen() 'F' flag for large file mode (uClibc-specific)"
1850         help
1851           Answer Y to enable a uClibc-specific extension to allow passing an
1852           additional 'F' flag in the mode string for fopen() to specify that
1853           the file should be open()ed with the O_LARGEFILE flag set.
1855           Most people will answer N.
1857 config UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
1858         bool "Support an fopen() 'x' flag for exclusive mode (glibc-compat)"
1859         help
1860           Answer Y to support a glibc extension to allow passing
1861           additional 'x' flag in the mode string for fopen() to specify that
1862           the file should be open()ed with the O_EXCL flag set.
1864           Most people will answer N.
1866 config UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
1867         bool "Support an fopen() 'e' flag for close-on-exec mode (glibc-compat)"
1868         help
1869           Answer Y to support a glibc extension to allow passing
1870           additional 'e' flag in the mode string for fopen() to specify that
1871           the file should be open()ed with the O_CLOEXEC flag set.
1873           Most people will answer N.
1875 config UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
1876         bool "Support fmemopen(), open_memstream(), and fopencookie() (glibc-compat)"
1877         help
1878           Answer Y to support the glibc 'custom stream' extension functions
1879           fmemopen(), open_memstream(), and fopencookie().
1881           NOTE: There are some minor differences regarding seeking behavior.
1883           Most people will answer N.
1885 config UCLIBC_HAS_PRINTF_M_SPEC
1886         bool "Support the '%m' specifier in printf format strings (glibc-compat)"
1887         help
1888           Answer Y to support a glibc extension to interpret '%m' in printf
1889           format strings as an instruction to output the error message string
1890           (as generated by strerror) corresponding to the current value of
1891           'errno'.
1893           Most people will answer N.
1895 config UCLIBC_HAS_ERRNO_MESSAGES
1896         bool "Include the errno message text in the library"
1897         default y
1898         help
1899           Answer Y if you want to include the errno message text in the
1900           library.  This adds about 3K to the library, but enables strerror()
1901           to generate text other than 'Unknown error <number>'.
1903           Most people will answer Y.
1905 config UCLIBC_HAS_SYS_ERRLIST
1906         bool "Support sys_errlist[] (obsolete-compat)"
1907         depends on UCLIBC_HAS_ERRNO_MESSAGES
1908         help
1909           Answer Y if you want to support the obsolete sys_errlist[].
1910           This adds about 0.5k to the library, except for the mips
1911           arch where it adds over 4K.
1913           WARNING!  In the future, support for sys_errlist[] may be unavailable
1914                     in at least some configurations.  In fact, it may be removed
1915                     altogether.
1917           Most people will answer N.
1919           Application writers: use the strerror(3) function.
1921 config UCLIBC_HAS_SIGNUM_MESSAGES
1922         bool "Include the signum message text in the library"
1923         default y
1924         help
1925           Answer Y if you want to include the signum message text in the
1926           library.  This adds about 0.5K to the library, but enables strsignal()
1927           to generate text other than 'Unknown signal <number>'.
1929           Most people will answer Y.
1931 config UCLIBC_HAS_SYS_SIGLIST
1932         bool "Support sys_siglist[] (bsd-compat)"
1933         depends on UCLIBC_HAS_SIGNUM_MESSAGES
1934         help
1935           Answer Y if you want to support sys_siglist[].
1937           WARNING!  In the future, support for sys_siglist[] may be unavailable
1938                     in at least some configurations.  In fact, it may be removed
1939                     altogether.
1941           Most people will answer N.
1943 config UCLIBC_HAS_GNU_GETOPT
1944         bool "Support gnu getopt"
1945         default y
1946         help
1947           Answer Y if you want to include full gnu getopt() instead of a
1948           (much smaller) SUSv3 compatible getopt().
1949           Note that getopt_long, getopt_long_only as well as getsubopt
1950           are implemented on top of this choice.
1952           Most people will answer Y.
1954 config UCLIBC_HAS_GETOPT_LONG
1955         bool "Support getopt_long/getopt_long_only (glibc-compat)"
1956         default y
1957         help
1958           Answer Y if you want to include getopt_long[_only()] used by many
1959           apps.
1961           Most people will answer Y.
1963 config UCLIBC_HAS_GNU_GETSUBOPT
1964         bool "Support getsubopt"
1965         default y
1966         help
1967           Answer Y if you want to include getsubopt().
1969           Most people will answer Y.
1971 config UCLIBC_HAS_ARGP
1972         bool "Support argp"
1973         select UCLIBC_HAS_GETOPT_LONG
1974         select UCLIBC_HAS_GNU_GETOPT
1975         select UCLIBC_HAS_WCHAR
1976         default n
1977         help
1978           Argp is an interface for parsing unix-style argument vectors. Unlike
1979           the common getopt interface, it provides many advanced features in
1980           addition to parsing options, such as automatic output in response to
1981           `--help' and `--version' options.
1982           A library can export an argp option parser, which programs can easily
1983           use in conjunction with their own option parser.
1984           Argp support is needed by elfutils libdw.
1986           Most people can safely answer N.
1988 endmenu
1991 menu "Big and Tall"
1993 config UCLIBC_HAS_REGEX
1994         bool "Regular Expression Support"
1995         default y
1996         help
1997           POSIX regular expression code is really big -- 53k all by itself.
1998           If you don't use regular expressions, turn this off and save space.
1999           Of course, if you only statically link, leave this on, since it will
2000           only be included in your apps if you use regular expressions.
2002 config UCLIBC_HAS_FNMATCH
2003         bool "fnmatch Support"
2004         default y
2005         help
2006           POSIX fnmatch.
2008 config UCLIBC_HAS_WORDEXP
2009         bool "Support the wordexp() interface"
2010         depends on UCLIBC_HAS_GLOB
2011         help
2012           The SuSv3 wordexp() interface performs word expansions per the  Shell
2013           and Utilities volume of IEEE Std 1003.1-2001, Section 2.6.  It is
2014           intended for use by applications that want to implement all of the
2015           standard Bourne shell expansions on input data.
2017           This interface is rarely used, and very large.  Unless you have a
2018           pressing need for wordexp(), you should probably answer N.
2020 config UCLIBC_HAS_NFTW
2021         bool "Support the nftw() interface"
2022         help
2023           The SuSv3 nftw() interface is used to recursively descend
2024           directory paths while repeatedly calling a function.
2026           This interface is rarely used, and adds around 4.5k.  Unless you have
2027           a pressing need for nftw(), you should probably answer N.
2029 config UCLIBC_HAS_FTW
2030         bool "Support the ftw() interface (SUSv4-obsolete)"
2031         depends on UCLIBC_SUSV4_LEGACY
2032         help
2033           The SuSv3 ftw() interface is used to recursively descend
2034           directory paths while repeatedly calling a function.
2036           This interface is rarely used, and adds around 4.5k.  Unless you have
2037           a pressing need for ftw(), you should probably answer N.
2039 config UCLIBC_HAS_FTS
2040         bool "Support the fts() interface (bsd-compat)"
2041         help
2042           The fts functions are provided for traversing UNIX file hierarchies.
2044           This interface is currently used by the elfutils and adds
2045           around 7.5k.
2046           You should port your application to use the POSIX nftw()
2047           interface.
2049           Unless you need to build/use elfutils, you should prolly answer N.
2051 config UCLIBC_HAS_GLOB
2052         bool "Support the glob() interface"
2053         depends on UCLIBC_HAS_FNMATCH
2054         default y
2055         help
2057           The glob interface is somewhat large (weighing in at about 2,5k).  It
2058           is used fairly often, but is an option since people wanting to go for
2059           absolute minimum size may wish to omit it.
2061           Most people will answer Y.
2063 config UCLIBC_HAS_GNU_GLOB
2064         bool "Support gnu glob() interface"
2065         depends on UCLIBC_HAS_GLOB
2066         help
2067           The gnu glob interface is somewhat larger (weighing in at about 4,2k)
2068           than it's SuSv3 counterpart (and is out of date). It is an old copy
2069           from glibc and does not support all the GNU specific options.
2071           Answer Y if you want to include full gnu glob() instead of the smaller
2072           SUSv3 compatible glob().
2074           Most people will answer N.
2076 endmenu
2081 menu "Library Installation Options"
2083 config RUNTIME_PREFIX
2084         string "uClibc runtime library directory"
2085         default "/usr/$(TARGET_ARCH)-linux-uclibc/"
2086         help
2087           RUNTIME_PREFIX is the directory into which the uClibc runtime
2088           libraries will be installed.   The result will look something
2089           like the following:
2090               $(RUNTIME_PREFIX)/
2091                   lib/            <contains all runtime libraries>
2092                   usr/bin/ldd     <the ldd utility program>
2093                   sbin/ldconfig   <the ldconfig utility program>
2094           This value is used by the 'make install' Makefile target.  Since this
2095           directory is compiled into the shared library loader, you will need to
2096           recompile uClibc if you change this value...
2098           For a typical target system this should be set to "/", such that
2099           'make install' will install /lib/libuClibc-<VERSION>.so
2101 config DEVEL_PREFIX
2102         string "uClibc development environment directory"
2103         default "/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
2104         help
2105           DEVEL_PREFIX is the directory into which the uClibc development
2106           environment will be installed.   The result will look something
2107           like the following:
2108               $(DEVEL_PREFIX)/
2109                   lib/            <contains static libs>
2110                   include/        <Where all the header files go>
2111           This value is used by the 'make install' Makefile target when
2112           installing a uClibc development environment.
2114           For a typical target system this should be set to "/usr", such that
2115           'make install' will install /usr/include/<header files>.
2117 config MULTILIB_DIR
2118         string "library path component"
2119         default "lib"
2120         help
2121           Path component where libraries reside.
2123           For a typical target system this should be set to "lib", such that
2124           'make install' will install libraries to "/lib" and "/usr/lib"
2125           respectively
2126             DEVEL_PREFIX/MULTILIB_DIR
2127             RUNTIME_PREFIX/MULTILIB_DIR
2129           Other settings may include "lib32" or "lib64".
2131 config HARDWIRED_ABSPATH
2132         bool "Hardwire absolute paths into linker scripts"
2133         default y
2134         help
2135           This prepends absolute paths to the libraries mentioned in linker
2136           scripts such as libc.so.
2138           This is a build time optimization.  It has no impact on dynamic
2139           linking at runtime, which doesn't use linker scripts.
2141           You must disable this to use uClibc with old non-sysroot toolchains,
2142           such as the prebuilt binary cross compilers at:
2143              http://uclibc.org/downloads/binaries
2145           The amount of time saved by this optimization is actually too small to
2146           measure. The linker just had to search the library path to find the
2147           linker script, so the dentries are cache hot if it has to search the
2148           same path again.  But it's what glibc does, so we do it too.
2150 endmenu
2153 menu "Security options"
2155 config UCLIBC_BUILD_PIE
2156         bool "Build utilities as ET_DYN/PIE executables"
2157         depends on HAVE_SHARED
2158         depends on TARGET_arm || TARGET_frv || TARGET_i386 || TARGET_mips || TARGET_powerpc || TARGET_nds32
2159         select FORCE_SHAREABLE_TEXT_SEGMENTS
2160         help
2161           If you answer Y here, ldd and iconv are built as ET_DYN/PIE
2162           executables.
2164           It requires gcc-3.4 and binutils-2.15 (for arm 2.16) or later.
2165           More about ET_DYN/PIE binaries on <http://pax.grsecurity.net/> .
2167           WARNING: This option also enables FORCE_SHAREABLE_TEXT_SEGMENTS, so
2168                    all libraries have to be built with -fPIC or -fpic, and all
2169                    assembler functions must be written as position independent
2170                    code (PIC).
2172 config HAVE_NO_SSP
2173         bool
2175 config UCLIBC_HAS_SSP
2176         bool "Support for GCC stack smashing protector"
2177         depends on !HAVE_NO_SSP
2178         help
2179           Add code to support GCC's -fstack-protector[-all] option to uClibc.
2180           This requires GCC 4.1 or newer.  GCC does not have to provide libssp,
2181           the needed functions are added to ldso/libc instead.
2183           GCC's stack protector is a reimplementation of IBM's propolice.
2184           See http://www.trl.ibm.com/projects/security/ssp/ and
2185           http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
2186           for details.
2188           Note that NOEXECSTACK on a kernel with address space randomization
2189           is generally sufficient to prevent most buffer overflow exploits
2190           without increasing code size.  This option essentially adds debugging
2191           code to catch them.
2193           Most people will answer N.
2195 config SSP_QUICK_CANARY
2196         bool "Use simple guard values without accessing /dev/urandom"
2197         depends on UCLIBC_HAS_SSP
2198         help
2199           Use gettimeofday(2) to define the __guard without accessing
2200           /dev/urandom.
2201           WARNING: This makes smashing stack protector vulnerable to timing
2202                 attacks.
2203           Most people will answer N.
2205 choice
2206         prompt "Propolice protection blocking signal"
2207         depends on UCLIBC_HAS_SSP
2208         depends on DODEBUG
2209         default PROPOLICE_BLOCK_SEGV
2210         help
2211           "abort" use SIGABRT to block offending programs.
2212           This is the default implementation.
2214           "segfault" use SIGSEGV to block offending programs.
2215           Use this for debugging.
2217           If unsure, answer "abort".
2219 config PROPOLICE_BLOCK_ABRT
2220         bool "abort"
2222 config PROPOLICE_BLOCK_SEGV
2223         bool "segfault"
2225 endchoice
2227 config UCLIBC_BUILD_SSP
2228         bool "Build uClibc with -fstack-protector"
2229         depends on UCLIBC_HAS_SSP
2230         help
2231           Build all uClibc libraries and executables with -fstack-protector,
2232           adding extra stack overflow checking to most uClibc functions.
2234 config UCLIBC_BUILD_RELRO
2235         bool "Build uClibc with linker option -z RELRO"
2236         depends on HAVE_SHARED
2237         default y
2238         help
2239           Build all libraries and executables with "ld -z relro".
2241           This tells the linker to mark chunks of an executable or shared
2242           library read-only after applying dynamic relocations.  (This comes
2243           up when a global const variable is initialized to the address of a
2244           function or the value of another global variable.)
2246           This is a fairly obscure option the ld man page doesn't even bother
2247           to document properly.  It's a security paranoia issue that's more
2248           likely to consume memory (by allocating an extra page) rather than
2249           save it.
2251           This is explained in more depth at
2252           http://www.airs.com/blog/archives/189
2254           Nobody is likely to care whether you say Y or N here.
2256 config UCLIBC_BUILD_NOW
2257         bool "Build uClibc with linker option -z NOW"
2258         depends on HAVE_SHARED
2259         help
2260           Build all libraries and executables with "ld -z now".
2262           This tells the linker to resolve all symbols when the library is
2263           first loaded, rather than when each function is first called.  This
2264           increases start-up latency by a few microseconds and may do
2265           unnecessary work (resolving symbols that are never used), but the
2266           realtime people like it for making microbenchmark timings slightly
2267           more predictable and in some cases it can be slightly faster due to
2268           CPU cache behavior (not having to fault the linker back in to do
2269           lazy symbol resolution).
2271           Most people can't tell the difference between selecting Y or N here.
2273 config UCLIBC_BUILD_NOEXECSTACK
2274         bool "Build uClibc with noexecstack marking"
2275         default y
2276         help
2277           Mark all assembler files as noexecstack, which will mark uClibc
2278           as not requiring an executable stack.  (This doesn't prevent other
2279           files you link against from claiming to need an executable stack, it
2280           just won't cause uClibc to request it unnecessarily.)
2282           This is a security thing to make buffer overflows harder to exploit.
2283           By itself, it's kind of useless, as Linus Torvalds explained in 1998:
2284           http://old.lwn.net/1998/0806/a/linus-noexec.html
2286           It only actually provides any security when combined with address
2287           space randomization, explained here: http://lwn.net/Articles/121845/
2289           Address space randomization is on by default in current linux
2290           kernels (although it can be disabled using the option
2291           CONFIG_COMPAT_BRK).
2293           You should probably say Y.
2295 endmenu
2297 menu "Development/debugging options"
2299 config CROSS_COMPILER_PREFIX
2300         string "Cross-compiling toolchain prefix"
2301         default ""
2302         help
2303           The prefix used to execute your cross-compiling toolchain.  For
2304           example, if you run 'arm-linux-uclibc-gcc' to compile something,
2305           then enter 'arm-linux-uclibc-' here.
2307 config UCLIBC_EXTRA_CFLAGS
2308         string "Extra CFLAGS"
2309         default ""
2310         help
2311           Add any additional CFLAGS to be used to build uClibc.
2313 config DODEBUG
2314         bool "Enable debugging symbols"
2315         select EXTRA_WARNINGS
2316         help
2317           Say Y here if you wish to compile uClibc with debugging symbols.
2318           This will allow you to use a debugger to examine uClibc internals
2319           while applications are running.  This increases the size of the
2320           library considerably and should only be used when doing development.
2321           If you are doing development and want to debug uClibc, answer Y.
2323           Otherwise, answer N.
2325 config DODEBUG_PT
2326         bool "Build pthread with debugging output"
2327         depends on UCLIBC_HAS_THREADS && UCLIBC_HAS_LINUXTHREADS
2328         help
2329           Enable debug output in libpthread.  This is only useful when doing
2330           development in libpthread itself.
2332           Otherwise, answer N.
2334 config DOSTRIP
2335         bool "Strip libraries and executables"
2336         default y
2337         depends on !DODEBUG
2338         help
2339           Say Y here if you do wish to strip all uClibc libraries and
2340           executables.  No stripping increases the size of the binaries
2341           considerably, but makes it possible to debug uClibc libraries.
2342           Most people will answer Y.
2344 config DOASSERTS
2345         bool "Build with run-time assertion testing"
2346         help
2347           Say Y here to include runtime assertion tests.
2348           This enables runtime assertion testing in some code, which can
2349           increase the size of the library and incur runtime overhead.
2350           If you say N, then this testing will be disabled.
2352 config SUPPORT_LD_DEBUG
2353         bool "Build the shared library loader with debugging support"
2354         depends on HAVE_SHARED
2355         help
2356           Answer Y here to enable all the extra code needed to debug the uClibc
2357           native shared library loader.  The level of debugging noise that is
2358           generated depends on the LD_DEBUG environment variable...  Just set
2359           LD_DEBUG to something like: 'LD_DEBUG=token1,token2,..  prog' to
2360           debug your application.  Diagnostic messages will then be printed to
2361           the stderr.
2363           For now these debugging tokens are available:
2364             detail        provide more information for some options
2365             move          display copy processing
2366             symbols       display symbol table processing
2367             reloc         display relocation processing; detail shows the
2368                           relocation patch
2369             nofixups      never fixes up jump relocations
2370             bindings      displays the resolve processing (function calls);
2371                           detail shows the relocation patch
2372             vdso          display vdso symbol table processing
2373             all           Enable everything!
2375           The additional environment variable:
2376             LD_DEBUG_OUTPUT=file
2377           redirects the diagnostics to an output file created using
2378           the specified name and the process id as a suffix.
2380           An excellent start is simply:
2381             $ LD_DEBUG=binding,move,symbols,reloc,detail ./appname
2382           or to log everything to a file named 'logfile', try this
2383             $ LD_DEBUG=all LD_DEBUG_OUTPUT=logfile ./appname
2385           If you are doing development and want to debug uClibc's shared library
2386           loader, answer Y.  Mere mortals answer N.
2388 config SUPPORT_LD_DEBUG_EARLY
2389         bool "Build the shared library loader with early debugging support"
2390         depends on HAVE_SHARED
2391         help
2392           Answer Y here to if you find the uClibc shared library loader is
2393           crashing or otherwise not working very early on.  This is typical
2394           only when starting a new port when you haven't figured out how to
2395           properly get the values for argc, argv, environ, etc.  This method
2396           allows a degree of visibility into the very early shared library
2397           loader initialization process.  If you are doing development and want
2398           to debug the uClibc shared library loader early initialization,
2399           answer Y.  Mere mortals answer N.
2401 config UCLIBC_MALLOC_DEBUGGING
2402         bool "Build malloc with debugging support"
2403         depends on MALLOC || MALLOC_STANDARD
2404         select DOASSERTS
2405         help
2406           Answer Y here to compile extra debugging support code into malloc.
2407           Malloc debugging output may then be enabled at runtime using the
2408           MALLOC_DEBUG environment variable.
2410           The value of MALLOC_DEBUG should be an integer, which is interpreted
2411           as a bitmask with the following bits:
2412                   1   -  do extra consistency checking
2413                   2   -  output messages for malloc/free calls and OS
2414                          allocation calls
2415                   4   -  output messages for the `MMB' layer
2416                   8   -  output messages for internal malloc heap manipulation
2417                          calls
2419           Because this increases the size of malloc appreciably (due to strings
2420           etc), you should say N unless you need to debug a malloc problem.
2422 config UCLIBC_HAS_BACKTRACE
2423         bool "Add support for application self-debugging"
2424         depends on HAVE_SHARED
2425         help
2426           Answer Y here to compile support for application self-debugging that
2427           provides the following new functions:
2428           backtrace, backtrace_symbols, backtrace_symbols_fd
2430           The backtrace functionality is currently supported on some platforms, and it
2431           based on dwarf2 informations to properly work, so any application that
2432           want to use backtrace needs to be built with -fexceptions flag.
2434           The symbol names may be unavailable without the use of special linker
2435           options. For systems using the GNU linker, it is necessary to use the
2436           -rdynamic linker option too. Note that names of "static" functions are not
2437           exposed, and won't be available in the backtrace.
2439 config WARNINGS
2440         string "Compiler Warnings"
2441         default "-Wall"
2442         help
2443           Set this to the set of compiler warnings you wish to see while compiling.
2445 config EXTRA_WARNINGS
2446         bool "Enable extra annoying warnings"
2447         help
2448           If you wish to build with extra warnings enabled, say Y here.
2450 endmenu