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