OSDN Git Service

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