summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/option-groups.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc/option-groups.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/option-groups.patch1397
1 files changed, 1397 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/option-groups.patch b/meta/recipes-core/glibc/glibc/option-groups.patch
new file mode 100644
index 0000000000..198be73524
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/option-groups.patch
@@ -0,0 +1,1397 @@
1Eglibc option group infrastructure
2
3Upstream-Status: Pending
4
5Index: git/option-groups.def
6===================================================================
7--- /dev/null 1970-01-01 00:00:00.000000000 +0000
8+++ git/option-groups.def 2014-08-27 07:26:51.652070587 +0000
9@@ -0,0 +1,868 @@
10+# This file documents the option groups EGLIBC currently supports, in
11+# a format akin to the Linux Kconfig system's. The syntax may change
12+# over time.
13+#
14+# An entry of the form:
15+#
16+# config GROUP_NAME
17+# bool "one-line explanation of what this option group controls"
18+# help
19+# Multi-line help explaining the option group's meaning in
20+# some detail, terminated by indentation level.
21+#
22+# defines an option group whose variable is GROUP_NAME, with
23+# meaningful values 'y' (enabled) and 'n' (disabled). The
24+# documentation is formatted to be consumed by some sort of
25+# interactive configuration interface, but EGLIBC doesn't have such an
26+# interface yet.
27+#
28+# An option may have a 'depends on' line, indicating which other options
29+# must also be enabled if this option is. At present, EGLIBC doesn't
30+# check that these dependencies are satisfied.
31+#
32+# Option group variables get their default values from the file
33+# 'option-groups.defaults', in the top directory of the EGLIBC source
34+# tree. By default, all EGLIBC option groups are enabled --- their
35+# variables are set to 'y'.
36+#
37+# After including 'option-groups.defaults', the EGLIBC make machinery
38+# includes the file 'option-groups.config' from the top of the build
39+# tree, if it is present. Developers can place assignments to option
40+# group variables in that file to override the defaults. For example,
41+# to disable an option group, place a line of the form:
42+#
43+# OPTION_GROUP_NAME = n
44+#
45+# in 'option-groups.config' at the top of your build tree. To
46+# explicitly enable an option group, you may also write:
47+#
48+# OPTION_GROUP_NAME = y
49+#
50+# although this simply reestablishes the value already set by
51+# 'option-groups.defaults'.
52+
53+config EGLIBC_ADVANCED_INET6
54+ bool "IPv6 Advanced Sockets API support (RFC3542)"
55+ depends on EGLIBC_INET
56+ help
57+ This option group includes the functions specified by RFC 3542,
58+ "Advanced Sockets Application Program Interface (API) for
59+ IPv6".
60+
61+ This option group includes the following functions:
62+
63+ inet6_opt_append
64+ inet6_opt_find
65+ inet6_opt_finish
66+ inet6_opt_get_val
67+ inet6_opt_init
68+ inet6_option_alloc
69+ inet6_option_append
70+ inet6_option_find
71+ inet6_option_init
72+ inet6_option_next
73+ inet6_option_space
74+ inet6_opt_next
75+ inet6_opt_set_val
76+ inet6_rth_add
77+ inet6_rth_getaddr
78+ inet6_rth_init
79+ inet6_rth_reverse
80+ inet6_rth_segments
81+ inet6_rth_space
82+
83+config EGLIBC_BACKTRACE
84+ bool "Functions for producing backtraces"
85+ help
86+ This option group includes functions for producing a list of
87+ the function calls that are currently active in a thread, from
88+ within the thread itself. These functions are often used
89+ within signal handlers, to produce diagnostic output.
90+
91+ This option group includes the following functions:
92+
93+ backtrace
94+ backtrace_symbols
95+ backtrace_symbols_fd
96+
97+config EGLIBC_BIG_MACROS
98+ bool "Use extensive inline code"
99+ help
100+ This option group specifies whether certain pieces of code
101+ should be inlined to achieve maximum speed. If this option
102+ group is not selected, function calls will be used instead,
103+ hence reducing the library footprint.
104+
105+config EGLIBC_BSD
106+ bool "BSD-specific functions, and their compatibility stubs"
107+ help
108+ This option group includes functions specific to BSD kernels.
109+ A number of these functions have stub versions that are also
110+ included in libraries built for non-BSD systems for
111+ compatibility.
112+
113+ This option group includes the following functions:
114+
115+ chflags
116+ fchflags
117+ lchmod
118+ revoke
119+ setlogin
120+
121+config EGLIBC_CXX_TESTS
122+ bool "Tests that link against the standard C++ library."
123+ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
124+ help
125+ This option group does not include any C library functions;
126+ instead, it controls which EGLIBC tests an ordinary 'make
127+ tests' runs. With this group disabled, tests that would
128+ normally link against the standard C++ library are not
129+ run.
130+
131+ The standard C++ library depends on the math library 'libm' and
132+ the wide character I/O functions included in EGLIBC. So those
133+ option groups must be enabled if this test is enabled.
134+
135+config EGLIBC_CATGETS
136+ bool "Functions for accessing message catalogs"
137+ depends on EGLIBC_LOCALE_CODE
138+ help
139+ This option group includes functions for accessing message
140+ catalogs: catopen, catclose, and catgets.
141+
142+ This option group depends on the EGLIBC_LOCALE_CODE
143+ option group.
144+
145+config EGLIBC_CHARSETS
146+ bool "iconv/gconv character set conversion libraries"
147+ help
148+ This option group includes support for character sets other
149+ than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
150+ various encodings. This affects both the character sets
151+ supported by the wide and multibyte character functions, and
152+ those supported by the 'iconv' functions.
153+
154+ With this option group disabled, EGLIBC supports only the
155+ following character sets:
156+
157+ ANSI_X3.4 - ASCII
158+ ANSI_X3.4-1968
159+ ANSI_X3.4-1986
160+ ASCII
161+ CP367
162+ CSASCII
163+ IBM367
164+ ISO-IR-6
165+ ISO646-US
166+ ISO_646.IRV:1991
167+ OSF00010020
168+ US
169+ US-ASCII
170+
171+ 10646-1:1993 - ISO 10646, in big-endian UCS4 form
172+ 10646-1:1993/UCS4
173+ CSUCS4
174+ ISO-10646
175+ ISO-10646/UCS4
176+ OSF00010104
177+ OSF00010105
178+ OSF00010106
179+ UCS-4
180+ UCS-4BE
181+ UCS4
182+
183+ UCS-4LE - ISO 10646, in little-endian UCS4 form
184+
185+ ISO-10646/UTF-8 - ISO 10646, in UTF-8 form
186+ ISO-10646/UTF8
187+ ISO-IR-193
188+ OSF05010001
189+ UTF-8
190+ UTF8
191+
192+ ISO-10646/UCS2 - ISO 10646, in target-endian UCS2 form
193+ OSF00010100
194+ OSF00010101
195+ OSF00010102
196+ UCS-2
197+ UCS2
198+
199+ UCS-2BE - ISO 10646, in big-endian UCS2 form
200+ UNICODEBIG
201+
202+ UCS-2LE - ISO 10646, in little-endian UCS2 form
203+ UNICODELITTLE
204+
205+ WCHAR_T - EGLIBC's internal form (target-endian,
206+ 32-bit ISO 10646)
207+
208+config EGLIBC_CRYPT
209+ bool "Encryption library"
210+ help
211+ This option group includes the `libcrypt' library which
212+ provides functions for one-way encryption. Supported
213+ encryption algorithms include MD5, SHA-256, SHA-512 and DES.
214+
215+config EGLIBC_CRYPT_UFC
216+ bool "Ultra fast `crypt' implementation"
217+ depends on EGLIBC_CRYPT
218+ help
219+ This option group provides ultra fast DES-based implementation of
220+ the `crypt' function. When this option group is disabled,
221+ (a) the library will not provide the setkey[_r] and encrypt[_r]
222+ functions and (b) the crypt[_r] function will return NULL and set the
223+ errno to ENOSYS if /salt/ passed does not correspond to either MD5,
224+ SHA-256 or SHA-512 algorithm.
225+
226+config EGLIBC_DB_ALIASES
227+ bool "Functions for accessing the mail aliases database"
228+ help
229+ This option group includues functions for looking up mail
230+ aliases in '/etc/aliases' or using nsswitch. It includes the
231+ following functions:
232+
233+ endaliasent
234+ getaliasbyname
235+ getaliasbyname_r
236+ getaliasent
237+ getaliasent_r
238+ setaliasent
239+
240+ When this option group is disabled, the NSS service libraries
241+ also lack support for querying their mail alias tables.
242+
243+config EGLIBC_ENVZ
244+ bool "Functions for handling envz-style environment vectors."
245+ help
246+ This option group contains functions for creating and operating
247+ on envz vectors. An "envz vector" is a vector of strings in a
248+ contiguous block of memory, where each element is a name-value
249+ pair, and elements are separated from their neighbors by null
250+ characters.
251+
252+ This option group includes the following functions:
253+
254+ envz_add envz_merge
255+ envz_entry envz_remove
256+ envz_get envz_strip
257+
258+config EGLIBC_FCVT
259+ bool "Functions for converting floating-point numbers to strings"
260+ help
261+ This option group includes functions for converting
262+ floating-point numbers to strings.
263+
264+ This option group includes the following functions:
265+
266+ ecvt qecvt
267+ ecvt_r qecvt_r
268+ fcvt qfcvt
269+ fcvt_r qfcvt_r
270+ gcvt qgcvt
271+
272+config EGLIBC_FMTMSG
273+ bool "Functions for formatting messages"
274+ help
275+ This option group includes the following functions:
276+
277+ addseverity fmtmsg
278+
279+config EGLIBC_FSTAB
280+ bool "Access functions for 'fstab'"
281+ help
282+ This option group includes functions for reading the mount
283+ point specification table, '/etc/fstab'. These functions are
284+ not included in the POSIX standard, which provides the
285+ 'getmntent' family of functions instead.
286+
287+ This option group includes the following functions:
288+
289+ endfsent getfsspec
290+ getfsent setfsent
291+ getfsfile
292+
293+config EGLIBC_FTRAVERSE
294+ bool "Functions for traversing file hierarchies"
295+ help
296+ This option group includes functions for traversing file
297+ UNIX file hierachies.
298+
299+ This option group includes the following functions:
300+
301+ fts_open ftw
302+ fts_read nftw
303+ fts_children ftw64
304+ fts_set nftw64
305+ fts_close
306+
307+config EGLIBC_GETLOGIN
308+ bool "The getlogin function"
309+ depends on EGLIBC_UTMP
310+ help
311+ This function group includes the 'getlogin' and 'getlogin_r'
312+ functions, which return the user name associated by the login
313+ activity with the current process's controlling terminal.
314+
315+ With this option group disabled, the 'glob' function will not
316+ fall back on 'getlogin' to find the user's login name for tilde
317+ expansion when the 'HOME' environment variable is not set.
318+
319+config EGLIBC_IDN
320+ bool "International domain names support"
321+ help
322+ This option group includes the `libcidn' library which
323+ provides support for international domain names.
324+
325+config EGLIBC_INET
326+ bool "Networking support"
327+ help
328+ This option group includes networking-specific functions and
329+ data. With EGLIBC_INET disabled, the EGLIBC
330+ installation and API changes as follows:
331+
332+ - The following libraries are not installed:
333+
334+ libnsl
335+ libnss_compat
336+ libnss_dns
337+ libnss_hesiod
338+ libnss_nis
339+ libnss_nisplus
340+ libresolv
341+
342+ - The following functions and variables are omitted from libc:
343+
344+ authdes_create hstrerror svc_fdset
345+ authdes_getucred htonl svc_getreq
346+ authdes_pk_create htons svc_getreq_common
347+ authnone_create if_freenameindex svc_getreq_poll
348+ authunix_create if_indextoname svc_getreqset
349+ authunix_create_default if_nameindex svc_max_pollfd
350+ bindresvport if_nametoindex svc_pollfd
351+ callrpc in6addr_any svcraw_create
352+ cbc_crypt in6addr_loopback svc_register
353+ clnt_broadcast inet6_opt_append svc_run
354+ clnt_create inet6_opt_find svc_sendreply
355+ clnt_pcreateerror inet6_opt_finish svctcp_create
356+ clnt_perrno inet6_opt_get_val svcudp_bufcreate
357+ clnt_perror inet6_opt_init svcudp_create
358+ clntraw_create inet6_option_alloc svcudp_enablecache
359+ clnt_spcreateerror inet6_option_append svcunix_create
360+ clnt_sperrno inet6_option_find svcunixfd_create
361+ clnt_sperror inet6_option_init svc_unregister
362+ clnttcp_create inet6_option_next user2netname
363+ clntudp_bufcreate inet6_option_space xdecrypt
364+ clntudp_create inet6_opt_next xdr_accepted_reply
365+ clntunix_create inet6_opt_set_val xdr_array
366+ des_setparity inet6_rth_add xdr_authdes_cred
367+ ecb_crypt inet6_rth_getaddr xdr_authdes_verf
368+ endaliasent inet6_rth_init xdr_authunix_parms
369+ endhostent inet6_rth_reverse xdr_bool
370+ endnetent inet6_rth_segments xdr_bytes
371+ endnetgrent inet6_rth_space xdr_callhdr
372+ endprotoent inet_addr xdr_callmsg
373+ endrpcent inet_aton xdr_char
374+ endservent inet_lnaof xdr_cryptkeyarg
375+ ether_aton inet_makeaddr xdr_cryptkeyarg2
376+ ether_aton_r inet_netof xdr_cryptkeyres
377+ ether_hostton inet_network xdr_des_block
378+ ether_line inet_nsap_addr xdr_double
379+ ether_ntoa inet_nsap_ntoa xdr_enum
380+ ether_ntoa_r inet_ntoa xdr_float
381+ ether_ntohost inet_ntop xdr_free
382+ freeaddrinfo inet_pton xdr_getcredres
383+ freeifaddrs innetgr xdr_hyper
384+ gai_strerror iruserok xdr_int
385+ getaddrinfo iruserok_af xdr_int16_t
386+ getaliasbyname key_decryptsession xdr_int32_t
387+ getaliasbyname_r key_decryptsession_pk xdr_int64_t
388+ getaliasent key_encryptsession xdr_int8_t
389+ getaliasent_r key_encryptsession_pk xdr_keybuf
390+ gethostbyaddr key_gendes xdr_key_netstarg
391+ gethostbyaddr_r key_get_conv xdr_key_netstres
392+ gethostbyname key_secretkey_is_set xdr_keystatus
393+ gethostbyname2 key_setnet xdr_long
394+ gethostbyname2_r key_setsecret xdr_longlong_t
395+ gethostbyname_r netname2host xdrmem_create
396+ gethostent netname2user xdr_netnamestr
397+ gethostent_r ntohl xdr_netobj
398+ getifaddrs ntohs xdr_opaque
399+ getipv4sourcefilter passwd2des xdr_opaque_auth
400+ get_myaddress pmap_getmaps xdr_pmap
401+ getnameinfo pmap_getport xdr_pmaplist
402+ getnetbyaddr pmap_rmtcall xdr_pointer
403+ getnetbyaddr_r pmap_set xdr_quad_t
404+ getnetbyname pmap_unset xdrrec_create
405+ getnetbyname_r rcmd xdrrec_endofrecord
406+ getnetent rcmd_af xdrrec_eof
407+ getnetent_r registerrpc xdrrec_skiprecord
408+ getnetgrent res_init xdr_reference
409+ getnetgrent_r rexec xdr_rejected_reply
410+ getnetname rexec_af xdr_replymsg
411+ getprotobyname rexecoptions xdr_rmtcall_args
412+ getprotobyname_r rpc_createerr xdr_rmtcallres
413+ getprotobynumber rresvport xdr_short
414+ getprotobynumber_r rresvport_af xdr_sizeof
415+ getprotoent rtime xdrstdio_create
416+ getprotoent_r ruserok xdr_string
417+ getpublickey ruserok_af xdr_u_char
418+ getrpcbyname ruserpass xdr_u_hyper
419+ getrpcbyname_r setaliasent xdr_u_int
420+ getrpcbynumber sethostent xdr_uint16_t
421+ getrpcbynumber_r setipv4sourcefilter xdr_uint32_t
422+ getrpcent setnetent xdr_uint64_t
423+ getrpcent_r setnetgrent xdr_uint8_t
424+ getrpcport setprotoent xdr_u_long
425+ getsecretkey setrpcent xdr_u_longlong_t
426+ getservbyname setservent xdr_union
427+ getservbyname_r setsourcefilter xdr_unixcred
428+ getservbyport svcauthdes_stats xdr_u_quad_t
429+ getservbyport_r svcerr_auth xdr_u_short
430+ getservent svcerr_decode xdr_vector
431+ getservent_r svcerr_noproc xdr_void
432+ getsourcefilter svcerr_noprog xdr_wrapstring
433+ h_errlist svcerr_progvers xencrypt
434+ h_errno svcerr_systemerr xprt_register
435+ herror svcerr_weakauth xprt_unregister
436+ h_nerr svc_exit
437+ host2netname svcfd_create
438+
439+ - The rpcgen, nscd, and rpcinfo commands are not installed.
440+
441+ - The 'rpc' file (a text file listing RPC services) is not installed.
442+
443+ Socket-related system calls do not fall in this option group,
444+ because many are also used for other inter-process
445+ communication mechanisms. For example, the 'syslog' routines
446+ use Unix-domain sockets to communicate with the syslog daemon;
447+ syslog is valuable in non-networked contexts.
448+
449+config EGLIBC_INET_ANL
450+ bool "Asynchronous name lookup"
451+ depends on EGLIBC_INET
452+ help
453+ This option group includes the `libanl' library which
454+ provides support for asynchronous name lookup.
455+
456+config EGLIBC_LIBM
457+ bool "libm (math library)"
458+ help
459+ This option group includes the 'libm' library, containing
460+ mathematical functions. If this option group is omitted, then
461+ an EGLIBC installation does not include shared or unshared versions
462+ of the math library.
463+
464+ Note that this does not remove all floating-point related
465+ functionality from EGLIBC; for example, 'printf' and 'scanf'
466+ can still print and read floating-point values with this option
467+ group disabled.
468+
469+ Note that the ISO Standard C++ library 'libstdc++' depends on
470+ EGLIBC's math library 'libm'. If you disable this option
471+ group, you will not be able to build 'libstdc++' against the
472+ resulting EGLIBC installation.
473+
474+config EGLIBC_LOCALES
475+ bool "Locale definitions"
476+ help
477+ This option group includes all locale definitions other than
478+ that for the "C" locale. If this option group is omitted, then
479+ only the "C" locale is supported.
480+
481+
482+config EGLIBC_LOCALE_CODE
483+ bool "Locale functions"
484+ depends on POSIX_C_LANG_WIDE_CHAR
485+ help
486+ This option group includes locale support functions, programs,
487+ and libraries. With EGLIBC_LOCALE_CODE disabled,
488+ EGLIBC supports only the 'C' locale (also known as 'POSIX'),
489+ and ignores the settings of the 'LANG' and 'LC_*' environment
490+ variables.
491+
492+ With EGLIBC_LOCALE_CODE disabled, the following
493+ functions are omitted from libc:
494+
495+ duplocale localeconv nl_langinfo rpmatch strfmon_l
496+ freelocale newlocale nl_langinfo_l strfmon uselocale
497+
498+ Furthermore, only the LC_CTYPE and LC_TIME categories of the
499+ standard "C" locale are available.
500+
501+ The EGLIBC_CATGETS option group depends on this option group.
502+
503+
504+config EGLIBC_MEMUSAGE
505+ bool "Memory profiling library"
506+ help
507+ This option group includes the `libmemusage' library and
508+ the `memusage' and `memusagestat' utilities.
509+ These components provide memory profiling functions.
510+
511+config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
512+ int "Memory profiling library buffer size"
513+ depends on EGLIBC_MEMUSAGE
514+ default "32768"
515+ help
516+ Libmemusage library buffers the profiling data in memory
517+ before writing it out to disk. By default, the library
518+ allocates 1.5M buffer, which can be substantial for some
519+ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
520+ allows to change the default buffer size. It specifies
521+ the number of entries the buffer should have.
522+ On most architectures one buffer entry amounts to 48 bytes,
523+ so setting this option to the value of 512 will reduce the size of
524+ the memory buffer to 24K.
525+
526+config EGLIBC_NIS
527+ bool "Support for NIS, NIS+, and the special 'compat' services."
528+ depends on EGLIBC_INET && EGLIBC_SUNRPC
529+ help
530+ This option group includes the NIS, NIS+, and 'compat' Name
531+ Service Switch service libraries. When it is disabled, those
532+ services libraries are not installed; you should remove any
533+ references to them from your 'nsswitch.conf' file.
534+
535+ This option group depends on the EGLIBC_INET option
536+ group; you must enable that to enable this option group.
537+
538+config EGLIBC_NSSWITCH
539+ bool "Name service switch (nsswitch) support"
540+ help
541+ This option group includes support for the 'nsswitch' facility.
542+ With this option group enabled, all EGLIBC functions for
543+ accessing various system databases (passwords and groups;
544+ networking; aliases; public keys; and so on) consult the
545+ '/etc/nsswitch.conf' configuration file to decide how to handle
546+ queries.
547+
548+ With this option group disabled, EGLIBC uses a fixed list of
549+ services to satisfy queries on each database, as requested by
550+ configuration files specified when EGLIBC is built. Your
551+ 'option-groups.config' file must set the following two
552+ variables:
553+
554+config EGLIBC_NSSWITCH_FIXED_CONFIG
555+ string "Nsswitch fixed config filename"
556+ depends on !EGLIBC_NSSWITCH
557+ default ""
558+ help
559+ Set this to the name of a file whose contents observe the
560+ same syntax as an ordinary '/etc/nsswitch.conf' file. The
561+ EGLIBC build process parses this file just as EGLIBC would
562+ at run time if EGLIBC_NSSWITCH were enabled, and
563+ produces a C library that uses the nsswitch service
564+ libraries to search for database entries as this file
565+ specifies, instead of consulting '/etc/nsswitch.conf' at run
566+ time.
567+
568+ This should be an absolute filename. The EGLIBC build
569+ process may use it from several different working
570+ directories. It may include references to Makefile
571+ variables like 'common-objpfx' (the top of the build tree,
572+ with a trailing slash), or '..' (the top of the source tree,
573+ with a trailing slash).
574+
575+ The EGLIBC source tree includes a sample configuration file
576+ named 'nss/fixed-nsswitch.conf'; for simple configurations,
577+ you will probably want to delete references to databases not
578+ needed on your system.
579+
580+config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
581+ string "Nsswitch fixed functions filename"
582+ depends on !EGLIBC_NSSWITCH
583+ default ""
584+ help
585+ The EGLIBC build process uses this file to decide which
586+ functions to make available from which service libraries.
587+ The file 'nss/fixed-nsswitch.functions' serves as a sample
588+ configuration file for this setting, and explains its syntax
589+ and meaning in more detail.
590+
591+ This should be an absolute file name. The EGLIBC build
592+ process may use it from several different working
593+ directories. It may include references to Makefile
594+ variables like 'common-objpfx' (the top of the build tree,
595+ with a trailing slash), or '..' (the top of the source tree,
596+ with a trailing slash).
597+
598+ Be sure to mention each function in each service you wish to
599+ use. If you do not mention a service's function here, the
600+ EGLIBC database access functions will not find it, even if
601+ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
602+ file.
603+
604+ In this arrangement, EGLIBC will not use the 'dlopen' and
605+ 'dlsym' functions to find database access functions. Instead,
606+ libc hard-codes references to the service libraries' database
607+ access functions. You must explicitly link your program
608+ against the name service libraries (those whose names start
609+ with 'libnss_', in the sysroot's '/lib' directory) whose
610+ functions you intend to use. This arrangement helps
611+ system-wide static analysis tools decide which functions a
612+ system actually uses.
613+
614+ Note that some nsswitch service libraries require other option
615+ groups to be enabled; for example, the EGLIBC_INET
616+ option group must be enabled to use the 'libnss_dns.so.2'
617+ service library, which uses the Domain Name System network
618+ protocol to answer queries.
619+
620+config EGLIBC_RCMD
621+ bool "Support for 'rcmd' and related library functions"
622+ depends on EGLIBC_INET
623+ help
624+ This option group includes functions for running commands on
625+ remote machines via the 'rsh' protocol, and doing authentication
626+ related to those functions. This also includes functions that
627+ use the 'rexec' protocol.
628+
629+ This option group includes the following functions:
630+
631+ rcmd ruserok
632+ rcmd_af ruserok_af
633+ rexec iruserok
634+ rexec_af iruserok_af
635+ rresvport ruserpass
636+ rresvport_af
637+
638+config EGLIBC_RTLD_DEBUG
639+ bool "Runtime linker debug print outs"
640+ help
641+ This option group enables debug output of the runtime linker
642+ which is activated via LD_DEBUG and LD_TRACE_PRELINKING
643+ environment variables. Disabling this option group yields
644+ a smaller runtime linker binary.
645+ BEWARE: Disabling this option group is likely to break
646+ the `ldd' utility which may also be used by the prelinker.
647+ In particular, the `--unused' ldd option will not work correctly.
648+
649+config EGLIBC_SPAWN
650+ bool "Support for POSIX posix_spawn functions"
651+ help
652+ This option group includes the POSIX functions for executing
653+ programs in child processes without using 'fork' or 'vfork'.
654+
655+ This option group includes the following functions:
656+
657+ posix_spawn
658+ posix_spawnattr_destroy
659+ posix_spawnattr_getflags
660+ posix_spawnattr_getpgroup
661+ posix_spawnattr_getschedparam
662+ posix_spawnattr_getschedpolicy
663+ posix_spawnattr_getsigdefault
664+ posix_spawnattr_getsigmask
665+ posix_spawnattr_init
666+ posix_spawnattr_setflags
667+ posix_spawnattr_setpgroup
668+ posix_spawnattr_setschedparam
669+ posix_spawnattr_setschedpolicy
670+ posix_spawnattr_setsigdefault
671+ posix_spawnattr_setsigmask
672+ posix_spawn_file_actions_addclose
673+ posix_spawn_file_actions_adddup2
674+ posix_spawn_file_actions_addopen
675+ posix_spawn_file_actions_destroy
676+ posix_spawn_file_actions_init
677+ posix_spawnp
678+
679+ This option group also provides the ability for the iconv,
680+ localedef, and locale programs to operate transparently on
681+ compressed charset definitions. When this option group is
682+ disabled, those programs will only operate on uncompressed
683+ charmap files.
684+
685+config EGLIBC_STREAMS
686+ bool "Support for accessing STREAMS."
687+ help
688+ This option group includes functions for reading and writing
689+ messages to and from STREAMS. The STREAMS interface provides a
690+ uniform mechanism for implementing networking services and other
691+ character-based I/O. (STREAMS are not to be confused with
692+ <stdio.h> FILE objects, also called 'streams'.)
693+
694+ This option group includes the following functions:
695+
696+ getmsg putpmsg
697+ getpmsg fattach
698+ isastream fdetach
699+ putmsg
700+
701+config EGLIBC_SUNRPC
702+ bool "Support for the Sun 'RPC' protocol."
703+ depends on EGLIBC_INET
704+ help
705+ This option group includes support for the Sun RPC protocols,
706+ including the 'rpcgen' and 'rpcinfo' programs.
707+
708+config EGLIBC_UTMP
709+ bool "Older access functions for 'utmp' login records"
710+ help
711+ This option group includes the older 'utent' family of
712+ functions for accessing user login records in the 'utmp' file.
713+ POSIX omits these functions in favor of the 'utxent' family,
714+ and they are obsolete on systems other than Linux.
715+
716+ This option group includes the following functions:
717+
718+ endutent
719+ getutent
720+ getutent_r
721+ getutid
722+ getutid_r
723+ getutline
724+ getutline_r
725+ logwtmp
726+ pututline
727+ setutent
728+ updwtmp
729+ utmpname
730+
731+ This option group includes the following libraries:
732+
733+ libutil.so (and libutil.a)
734+
735+config EGLIBC_UTMPX
736+ bool "POSIX access functions for 'utmp' login records"
737+ depends on EGLIBC_UTMP
738+ help
739+ This option group includes the POSIX functions for reading and
740+ writing user login records in the 'utmp' file (usually
741+ '/var/run/utmp'). The POSIX functions operate on 'struct
742+ utmpx' structures, as opposed to the family of older 'utent'
743+ functions, which operate on 'struct utmp' structures.
744+
745+ This option group includes the following functions:
746+
747+ endutxent
748+ getutmp
749+ getutmpx
750+ getutxent
751+ getutxid
752+ getutxline
753+ pututxline
754+ setutxent
755+ updwtmpx
756+ utmpxname
757+
758+config EGLIBC_WORDEXP
759+ bool "Shell-style word expansion"
760+ help
761+ This option group includes the 'wordexp' function for
762+ performing word expansion in the manner of the shell, and the
763+ accompanying 'wordfree' function.
764+
765+config POSIX_C_LANG_WIDE_CHAR
766+ bool "ISO C library wide character functions, excluding I/O"
767+ help
768+ This option group includes the functions defined by the ISO C
769+ standard for working with wide and multibyte characters in
770+ memory. Functions for reading and writing wide and multibyte
771+ characters from and to files call in the
772+ POSIX_WIDE_CHAR_DEVICE_IO option group.
773+
774+ This option group includes the following functions:
775+
776+ btowc mbsinit wcscspn wcstoll
777+ iswalnum mbsrtowcs wcsftime wcstombs
778+ iswalpha mbstowcs wcslen wcstoul
779+ iswblank mbtowc wcsncat wcstoull
780+ iswcntrl swprintf wcsncmp wcstoumax
781+ iswctype swscanf wcsncpy wcsxfrm
782+ iswdigit towctrans wcspbrk wctob
783+ iswgraph towlower wcsrchr wctomb
784+ iswlower towupper wcsrtombs wctrans
785+ iswprint vswprintf wcsspn wctype
786+ iswpunct vswscanf wcsstr wmemchr
787+ iswspace wcrtomb wcstod wmemcmp
788+ iswupper wcscat wcstof wmemcpy
789+ iswxdigit wcschr wcstoimax wmemmove
790+ mblen wcscmp wcstok wmemset
791+ mbrlen wcscoll wcstol
792+ mbrtowc wcscpy wcstold
793+
794+config POSIX_REGEXP
795+ bool "Regular expressions"
796+ help
797+ This option group includes the POSIX regular expression
798+ functions, and the associated non-POSIX extensions and
799+ compatibility functions.
800+
801+ With POSIX_REGEXP disabled, the following functions are
802+ omitted from libc:
803+
804+ re_comp re_max_failures regcomp
805+ re_compile_fastmap re_search regerror
806+ re_compile_pattern re_search_2 regexec
807+ re_exec re_set_registers regfree
808+ re_match re_set_syntax rpmatch
809+ re_match_2 re_syntax_options
810+
811+ Furthermore, the compatibility regexp interface defined in the
812+ <regexp.h> header file, 'compile', 'step', and 'advance', is
813+ omitted.
814+
815+config POSIX_REGEXP_GLIBC
816+ bool "Regular expressions from GLIBC"
817+ depends on POSIX_REGEXP
818+ help
819+ This option group specifies which regular expression
820+ library to use. The choice is between regex
821+ implementation from GLIBC and regex implementation from
822+ libiberty. The GLIBC variant is fully POSIX conformant and
823+ optimized for speed; regex from libiberty is more than twice
824+ as small while still is enough for most practical purposes.
825+
826+config POSIX_WIDE_CHAR_DEVICE_IO
827+ bool "Input and output functions for wide characters"
828+ depends on POSIX_C_LANG_WIDE_CHAR
829+ help
830+ This option group includes functions for reading and writing
831+ wide characters to and from <stdio.h> streams.
832+
833+ This option group includes the following functions:
834+
835+ fgetwc fwprintf putwchar vwscanf
836+ fgetws fwscanf ungetwc wprintf
837+ fputwc getwc vfwprintf wscanf
838+ fputws getwchar vfwscanf
839+ fwide putwc vwprintf
840+
841+ This option group further includes the following unlocked
842+ variants of the above functions:
843+
844+ fgetwc_unlocked getwc_unlocked
845+ fgetws_unlocked getwchar_unlocked
846+ fputwc_unlocked putwc_unlocked
847+ fputws_unlocked putwchar_unlocked
848+
849+ Note that the GNU standard C++ library, 'libstdc++.so', uses
850+ some of these functions; you will not be able to link or run
851+ C++ programs if you disable this option group.
852+
853+ This option group also affects the behavior of the following
854+ functions:
855+
856+ fdopen
857+ fopen
858+ fopen64
859+ freopen
860+ freopen64
861+
862+ These functions all take an OPENTYPE parameter which may
863+ contain a string of the form ",ccs=CHARSET", indicating that
864+ the underlying file uses the character set named CHARSET.
865+ This produces a wide-oriented stream, which is only useful
866+ when the functions included in this option group are present.
867+ If the user attempts to open a file specifying a character set
868+ in the OPENTYPE parameter, and EGLIBC was built with this
869+ option group disabled, the function returns NULL, and sets
870+ errno to EINVAL.
871+
872+
873+# This helps Emacs users browse this file using the page motion commands
874+# and commands like 'pages-directory'.
875+# Local Variables:
876+# page-delimiter: "^config\\s-"
877+# End:
878Index: git/option-groups.mak
879===================================================================
880--- /dev/null 1970-01-01 00:00:00.000000000 +0000
881+++ git/option-groups.mak 2014-08-27 07:26:51.652070587 +0000
882@@ -0,0 +1,41 @@
883+# Setup file for subdirectory Makefiles that define EGLIBC option groups.
884+
885+# EGLIBC shouldn't need to override this. However, the
886+# cross-build-friendly localedef includes this makefile to get option
887+# group variable definitions; it uses a single build tree for all the
888+# multilibs, and needs to be able to specify a different option group
889+# configuration file for each multilib.
890+option_group_config_file ?= $(objdir)/option-groups.config
891+
892+# Read the default settings for all options.
893+# We're included before ../Rules, so we can't assume $(..) is set.
894+include $(firstword $(..) ../)option-groups.defaults
895+
896+# Read the developer's option group selections, overriding the
897+# defaults from option-groups.defaults.
898+-include $(option_group_config_file)
899+
900+# $(call option-disabled, VAR) is 'y' if VAR is not 'y', or 'n' otherwise.
901+# VAR should be a variable name, not a variable reference; this is
902+# less general, but more terse for the intended use.
903+# You can use it to add a file to a list if an option group is
904+# disabled, like this:
905+# routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += ...
906+define option-disabled
907+$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y)
908+endef
909+
910+# Establish 'routines-y', etc. as simply-expanded variables.
911+aux-y :=
912+extra-libs-others-y :=
913+extra-libs-y :=
914+extra-objs-y :=
915+install-bin-y :=
916+install-others-y :=
917+install-sbin-y :=
918+others-y :=
919+others-pie-y :=
920+routines-y :=
921+test-srcs-y :=
922+tests-y :=
923+xtests-y :=
924Index: git/option-groups.defaults
925===================================================================
926--- /dev/null 1970-01-01 00:00:00.000000000 +0000
927+++ git/option-groups.defaults 2014-08-27 07:24:41.652070587 +0000
928@@ -0,0 +1,47 @@
929+# This file sets default values for all option group variables
930+# mentioned in option-groups.def; see that file for a description of
931+# each option group.
932+#
933+# Subdirectory makefiles include this file before including the user's
934+# settings from option-groups.config at the top of the build tree;
935+# that file need only refer to those options whose default settings
936+# are to be changed.
937+#
938+# By default, all option groups are enabled.
939+OPTION_EGLIBC_ADVANCED_INET6 = y
940+OPTION_EGLIBC_BACKTRACE = y
941+OPTION_EGLIBC_BIG_MACROS = y
942+OPTION_EGLIBC_BSD = y
943+OPTION_EGLIBC_CXX_TESTS = y
944+OPTION_EGLIBC_CATGETS = y
945+OPTION_EGLIBC_CHARSETS = y
946+OPTION_EGLIBC_CRYPT = y
947+OPTION_EGLIBC_CRYPT_UFC = y
948+OPTION_EGLIBC_DB_ALIASES = y
949+OPTION_EGLIBC_ENVZ = y
950+OPTION_EGLIBC_FCVT = y
951+OPTION_EGLIBC_FMTMSG = y
952+OPTION_EGLIBC_FSTAB = y
953+OPTION_EGLIBC_FTRAVERSE = y
954+OPTION_EGLIBC_GETLOGIN = y
955+OPTION_EGLIBC_IDN = y
956+OPTION_EGLIBC_INET = y
957+OPTION_EGLIBC_INET_ANL = y
958+OPTION_EGLIBC_LIBM = y
959+OPTION_EGLIBC_LOCALES = y
960+OPTION_EGLIBC_LOCALE_CODE = y
961+OPTION_EGLIBC_MEMUSAGE = y
962+OPTION_EGLIBC_NIS = y
963+OPTION_EGLIBC_NSSWITCH = y
964+OPTION_EGLIBC_RCMD = y
965+OPTION_EGLIBC_RTLD_DEBUG = y
966+OPTION_EGLIBC_SPAWN = y
967+OPTION_EGLIBC_STREAMS = y
968+OPTION_EGLIBC_SUNRPC = y
969+OPTION_EGLIBC_UTMP = y
970+OPTION_EGLIBC_UTMPX = y
971+OPTION_EGLIBC_WORDEXP = y
972+OPTION_POSIX_C_LANG_WIDE_CHAR = y
973+OPTION_POSIX_REGEXP = y
974+OPTION_POSIX_REGEXP_GLIBC = y
975+OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y
976Index: git/Makefile
977===================================================================
978--- git.orig/Makefile 2014-08-27 07:24:37.540070587 +0000
979+++ git/Makefile 2014-08-27 07:24:41.656070587 +0000
980@@ -24,6 +24,7 @@
981
982 include Makeconfig
983
984+include options-config/Makefile
985
986 # This is the default target; it makes everything except the tests.
987 .PHONY: all
988Index: git/EGLIBC.option-groups
989===================================================================
990--- /dev/null 1970-01-01 00:00:00.000000000 +0000
991+++ git/EGLIBC.option-groups 2014-08-27 07:24:41.656070587 +0000
992@@ -0,0 +1,122 @@
993+ -*- mode: text -*-
994+
995+ The EGLIBC Component Configuration System
996+ Jim Blandy <jimb@codesourcery.com>
997+
998+Introduction
999+
1000+The GNU C library (GLIBC) provides a broad range of functionality,
1001+ranging from internationalization support to transcendental
1002+mathematical functions. Its website boasts that "nearly all known and
1003+useful functions from any other C library are available." This
1004+exhaustive approach has been one of GLIBC's strengths on desktop and
1005+server systems, but it has also given GLIBC a large footprint, both in
1006+memory and on disk, making it a challenge to use in embedded systems
1007+with limited resources.
1008+
1009+The Embedded GNU C library (EGLIBC) is a variant of the GNU C library
1010+designed to work well on embedded systems. In particular, EGLIBC's
1011+component configuration system allows embedded developers to build
1012+customized versions of the library that include only the features
1013+their application uses, reducing its space requirements.
1014+
1015+EGLIBC's component configuration system categorizes the library's
1016+functions into "option groups", and allows you to include or exclude
1017+option groups individually. Some option groups depend on others;
1018+EGLIBC tracks these relationships, and ensures that the selected
1019+configuration yields a functioning library.
1020+
1021+
1022+Consistent and Predictable Behavior
1023+
1024+A flexible configuration system is a mixed blessing: if the options
1025+offered are poorly designed, it can be hard to see which choices will
1026+have the desired effects, and choices with obscure consequences can
1027+make debugging difficult. EGLIBC's configuration follows some general
1028+principles to reduce these risks:
1029+
1030+- EGLIBC has a single default configuration for each target
1031+ architecture.
1032+
1033+- In the default configuration, all option groups are enabled, and
1034+ EGLIBC is upwardly API- and ABI-compatible with GLIBC.
1035+
1036+- As much as possible, configurations only affect what functions are
1037+ present, not how they behave. If the system works with an option
1038+ group disabled, it will still work with it enabled.
1039+
1040+- As much as possible, configurations only select option groups ---
1041+ they do not describe characteristics of the target architecture.
1042+
1043+These rules mean that you have a simple debugging strategy available
1044+if you suspect that your EGLIBC configuration might be the source of a
1045+problem: fall back to the default configuration, re-test, and then
1046+disable option groups one by one, until the problem reappears.
1047+
1048+
1049+The Option Groups
1050+
1051+To see the current full list of implemented option groups, refer to the
1052+file 'option-groups.def' at the top of the source tree, or run
1053+'make menuconfig' from the top-level build directory.
1054+
1055+The POSIX.1-2001 specification includes a suggested partition of all
1056+the functions in the POSIX C API into option groups: math functions
1057+like 'sin' and 'cos'; networking functions like 'socket' and
1058+'connect'; and so on. EGLIBC could use this partitioning as the basis
1059+for future option groups.
1060+
1061+
1062+Implementation
1063+
1064+The EGLIBC component configuration system resembles the approach used
1065+by the Linux kernel to select device drivers, network protocols, and
1066+other features. A file named 'option-groups.config' in the top-level
1067+build directory contains assignments to Make variables, each of which
1068+enables or disables a particular option group. If the variable's
1069+value is set to 'y', then the option group is enabled; if it set to
1070+anything else, the option group is omitted. The file
1071+'option-groups.defaults', at the top of the source tree, establishes
1072+default values for all variables; all option groups are enabled by
1073+default.
1074+
1075+For example, the following 'option-groups.config' would omit locale
1076+data, but include mathematical functions, and everything else:
1077+
1078+ OPTION_EGLIBC_LOCALES = n
1079+ OPTION_EGLIBC_LIBM = y
1080+
1081+Like the Linux kernel, EGLIBC supports a similar set of '*config' make
1082+targets to make it easier to create 'option-groups.config', with all
1083+dependencies between option groups automatically satisfied. Run
1084+'make help' to see the list of supported make config targets. For
1085+example, 'make menuconfig' will update the current config utilising a
1086+menu based program.
1087+
1088+The option group names and their type (boolean, int, hex, string), help
1089+description, and dependencies with other option groups, are described by
1090+'option-groups.def' at the top of the source tree, analogous to the
1091+'Kconfig' files in the Linux kernel.
1092+
1093+In general, each option group variable controls whether a given set of
1094+object files in EGLIBC is compiled and included in the final
1095+libraries, or omitted from the build.
1096+
1097+Each subdirectory's Makefile categorizes its routines, libraries, and
1098+executables by option group. For example, EGLIBC's 'math/Makefile'
1099+places the 'libm' library in the OPTION_EGLIBC_LIBM group as follows:
1100+
1101+ extra-libs-$(OPTION_EGLIBC_LIBM) := libm
1102+
1103+Finally, common code in 'Makerules' cites the value of the variable
1104+'extra-libs-y', selecting only those libraries that belong to enabled
1105+option groups to be built.
1106+
1107+
1108+Current Status and Future Directions
1109+
1110+The EGLIBC component configuration system described here is still
1111+under development.
1112+
1113+We have used the system to subset some portions of EGLIBC's
1114+Index: libc/configure.ac
1115Index: git/configure.ac
1116===================================================================
1117--- git.orig/configure.ac 2014-08-27 07:24:41.196070587 +0000
1118+++ git/configure.ac 2014-08-27 07:24:41.656070587 +0000
1119@@ -127,6 +127,16 @@
1120 [sysheaders=''])
1121 AC_SUBST(sysheaders)
1122
1123+AC_ARG_WITH([kconfig],
1124+ AC_HELP_STRING([--with-kconfig=PATH],
1125+ [location of kconfig tools to use (from Linux
1126+ kernel builds) to re-use for configuring EGLIBC
1127+ option groups]),
1128+ [KCONFIG_TOOLS=$withval],
1129+ [KCONFIG_TOOLS=''])
1130+AC_SUBST(KCONFIG_TOOLS)
1131+
1132+
1133 AC_SUBST(use_default_link)
1134 AC_ARG_WITH([default-link],
1135 AC_HELP_STRING([--with-default-link],
1136Index: git/config.make.in
1137===================================================================
1138--- git.orig/config.make.in 2014-08-27 07:24:37.560070587 +0000
1139+++ git/config.make.in 2014-08-27 07:24:41.656070587 +0000
1140@@ -46,6 +46,8 @@
1141 c++-sysincludes = @CXX_SYSINCLUDES@
1142 all-warnings = @all_warnings@
1143
1144+kconfig_tools = @KCONFIG_TOOLS@
1145+
1146 have-z-combreloc = @libc_cv_z_combreloc@
1147 have-z-execstack = @libc_cv_z_execstack@
1148 have-Bgroup = @libc_cv_Bgroup@
1149Index: git/configure
1150===================================================================
1151--- git.orig/configure 2014-08-27 07:24:41.192070587 +0000
1152+++ git/configure 2014-08-27 07:24:41.660070587 +0000
1153@@ -619,6 +619,7 @@
1154 PERL
1155 BASH_SHELL
1156 libc_cv_gcc_static_libgcc
1157+KCONFIG_TOOLS
1158 CXX_SYSINCLUDES
1159 SYSINCLUDES
1160 AUTOCONF
1161@@ -733,6 +734,7 @@
1162 with_binutils
1163 with_selinux
1164 with_headers
1165+with_kconfig
1166 with_default_link
1167 enable_sanity_checks
1168 enable_shared
1169@@ -1437,6 +1439,9 @@
1170 --with-selinux if building with SELinux support
1171 --with-headers=PATH location of system headers to use (for example
1172 /usr/src/linux/include) [default=compiler default]
1173+ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel
1174+ builds) to re-use for configuring EGLIBC option
1175+ groups
1176 --with-default-link do not use explicit linker scripts
1177 --with-cpu=CPU select code for CPU variant
1178
1179@@ -3400,6 +3405,14 @@
1180
1181
1182
1183+# Check whether --with-kconfig was given.
1184+if test "${with_kconfig+set}" = set; then
1185+ withval=$with_kconfig; KCONFIG_TOOLS=$withval
1186+else
1187+ KCONFIG_TOOLS=''
1188+fi
1189+
1190+
1191
1192 # Check whether --with-default-link was given.
1193 if test "${with_default_link+set}" = set; then :
1194Index: git/options-config/Makefile
1195===================================================================
1196--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1197+++ git/options-config/Makefile 2014-08-27 07:24:41.652070587 +0000
1198@@ -0,0 +1,55 @@
1199+# ===========================================================================
1200+# EGLIBC option-groups configuration targets
1201+# These targets are included from top-level makefile
1202+
1203+ifneq ($(kconfig_tools),)
1204+ifneq (no,$(PERL))
1205+
1206+ocdir := options-config
1207+
1208+OconfigDefaults := option-groups.defaults
1209+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
1210+OconfigDef := option-groups.def
1211+Oconfig := $(common-objpfx)option-groups.config
1212+Oconfig_tmp := $(common-objpfx).tmp.config
1213+
1214+conf := $(kconfig_tools)/conf
1215+mconf := $(kconfig_tools)/mconf
1216+
1217+preproc := $(PERL) $(ocdir)/config-preproc.pl
1218+postproc := $(PERL) $(ocdir)/config-postproc.pl
1219+
1220+PHONY += defconfig config menuconfig
1221+
1222+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
1223+ rm -f $(OconfigDefaults_tmp)
1224+ rm -f $(Oconfig_tmp)
1225+ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
1226+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
1227+ $(OconfigDef)
1228+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
1229+ rm $(Oconfig_tmp)
1230+ rm $(OconfigDefaults_tmp)
1231+
1232+config: $(conf) $(OconfigDefaults) $(OconfigDef)
1233+ rm -f $(Oconfig_tmp)
1234+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
1235+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
1236+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
1237+ rm $(Oconfig_tmp)
1238+
1239+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
1240+ rm -f $(Oconfig_tmp)
1241+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
1242+ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
1243+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
1244+ rm $(Oconfig_tmp)
1245+
1246+# Help text used by make help
1247+help:
1248+ @echo ' defconfig - New config with default from default config'
1249+ @echo ' config - Update current config utilising a line-oriented program'
1250+ @echo ' menuconfig - Update current config utilising a menu based program'
1251+
1252+endif
1253+endif
1254Index: git/options-config/config-postproc.pl
1255===================================================================
1256--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1257+++ git/options-config/config-postproc.pl 2014-08-27 07:24:41.652070587 +0000
1258@@ -0,0 +1,58 @@
1259+#!/usr/bin/perl
1260+
1261+$usage = "usage: $0 <default config file> <config file>\n";
1262+
1263+die "$usage" unless @ARGV;
1264+$defaults = shift @ARGV;
1265+die "$usage" unless @ARGV;
1266+die "Could not open $ARGV[0]" unless -T $ARGV[0];
1267+
1268+sub yank {
1269+ @option = grep(!($_ =~ /$_[0]\s*=/), @option);
1270+}
1271+
1272+open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
1273+
1274+# get the full list of available options using the default config file
1275+$i = 0;
1276+while (<DEFAULTS>) {
1277+ if (/^\s*OPTION_(\w+\s*=.*$)/) {
1278+ $option[$i++] = $1;
1279+ }
1280+}
1281+
1282+# now go through the config file, making the necessary changes
1283+while (<>) {
1284+ if (/Linux Kernel Configuration/) {
1285+ # change title
1286+ s/Linux Kernel/Option Groups/;
1287+ print;
1288+ } elsif (/^\s*CONFIG_(\w+)\s*=/) {
1289+ # this is an explicit option set line, change CONFIG_ to OPTION_
1290+ # before printing and remove this option from option list
1291+ $opt = $1;
1292+ yank($opt);
1293+ s/CONFIG_/OPTION_/g;
1294+ print;
1295+ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
1296+ # this is a comment line for an unset boolean option, change CONFIG_
1297+ # to OPTION_, remove this option from option list, and convert to
1298+ # explicit OPTION_FOO=n
1299+ $opt = $1;
1300+ yank($opt);
1301+ s/CONFIG_/OPTION_/g;
1302+ print "OPTION_$opt=n\n";
1303+ } else {
1304+ print;
1305+ }
1306+}
1307+
1308+# any boolean options left in @options, are options that were not mentioned in
1309+# the config file, and implicitly that means the option must be set =n,
1310+# so do that here.
1311+foreach $opt (@option) {
1312+ if ($opt =~ /=\s*[yn]/) {
1313+ $opt =~ s/=\s*[yn]/=n/;
1314+ print "OPTION_$opt\n";
1315+ }
1316+}
1317Index: git/options-config/config-preproc.pl
1318===================================================================
1319--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1320+++ git/options-config/config-preproc.pl 2014-08-27 07:24:41.652070587 +0000
1321@@ -0,0 +1,8 @@
1322+#!/usr/bin/perl
1323+
1324+if (@ARGV) {
1325+ while (<>) {
1326+ s/OPTION_/CONFIG_/g;
1327+ print;
1328+ }
1329+}
1330Index: git/scripts/option-groups.awk
1331===================================================================
1332--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1333+++ git/scripts/option-groups.awk 2014-08-27 07:26:51.652070587 +0000
1334@@ -0,0 +1,63 @@
1335+# option-groups.awk --- generate option group header file
1336+# Given input files containing makefile-style assignments to variables,
1337+# print out a header file that #defines an appropriate preprocessor
1338+# symbol for each variable left set to 'y'.
1339+
1340+BEGIN { FS="=" }
1341+
1342+# Trim spaces.
1343+{ gsub (/[[:blank:]]/, "") }
1344+
1345+# Skip comments.
1346+/^#/ { next }
1347+
1348+# Process assignments.
1349+NF == 2 {
1350+ vars[$1] = $2
1351+}
1352+
1353+# Print final values.
1354+END {
1355+ print "/* This file is automatically generated by scripts/option-groups.awk"
1356+ print " in the EGLIBC source tree."
1357+ print ""
1358+ print " It defines macros that indicate which EGLIBC option groups were"
1359+ print " configured in 'option-groups.config' when this C library was"
1360+ print " built. For each option group named OPTION_foo, it #defines"
1361+ print " __OPTION_foo to be 1 if the group is enabled, or #defines that"
1362+ print " symbol to be 0 if the group is disabled. */"
1363+ print ""
1364+ print "#ifndef __GNU_OPTION_GROUPS_H"
1365+ print "#define __GNU_OPTION_GROUPS_H"
1366+ print ""
1367+
1368+ # Produce a sorted list of variable names.
1369+ i=0
1370+ for (var in vars)
1371+ names[i++] = var
1372+ n = asort (names)
1373+
1374+ for (i = 1; i <= n; i++)
1375+ {
1376+ var = names[i]
1377+ if (var ~ /^OPTION_/)
1378+ {
1379+ if (vars[var] == "y")
1380+ print "#define __" var " 1"
1381+ else if (vars[var] == "n")
1382+ print "#define __" var " 0"
1383+ else if (vars[var] ~ /^[0-9]+/ ||
1384+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
1385+ vars[var] ~ /^\"/)
1386+ print "#define __" var " " vars[var]
1387+ else
1388+ print "/* #undef __" var " */"
1389+ # Ignore variables that don't have boolean, int, hex, or
1390+ # string values. Ideally, this would be driven by the types
1391+ # given in option-groups.def.
1392+ }
1393+ }
1394+
1395+ print ""
1396+ print "#endif /* __GNU_OPTION_GROUPS_H */"
1397+}