OSDN Git Service

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