summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-09-05 21:52:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-10 13:01:49 +0100
commit607a3d57c5dfa38718b8c8a7d7a58d568f10a6f6 (patch)
tree61418f7632e81e98ea90d82d4634bb6863bbff52
parent4bca66470ea953963b5d3537046d5080564d190e (diff)
downloadpoky-607a3d57c5dfa38718b8c8a7d7a58d568f10a6f6.tar.gz
eglibc-2.16: Add kconfig infrastructure
This will let eglibc use kernel like option management through kconfig (From OE-Core rev: 4282b86072fd5a916d0d12082d6ba575bce691f2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.16/0001-eglibc-menuconfig-support.patch1007
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.16/0002-eglibc-menuconfig-hex-string-options.patch169
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.16/0003-eglibc-menuconfig-build-instructions.patch176
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.16.bb5
4 files changed, 1356 insertions, 1 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.16/0001-eglibc-menuconfig-support.patch b/meta/recipes-core/eglibc/eglibc-2.16/0001-eglibc-menuconfig-support.patch
new file mode 100644
index 0000000000..624392666a
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/0001-eglibc-menuconfig-support.patch
@@ -0,0 +1,1007 @@
1Pulled from
2http://www.eglibc.org/archives/patches/msg01042.html
3
4Upstream-Status: Pending
5Signed-off-by: Khem
6
7Hi,
8
9This patch adds 'make menuconfig' support to EGLIBC.
10
11
12EGLIBC can re-use the Linux kernel kconfig host tools ('conf' and 'mconf') unmodified, by passing appropriate environment variables and with some pre- and post-processing on the input/output config files.
13
14There are three new make targets supported, which all are defined in the new libc/options-config/Makefile, which is included by the top-level libc/Makefile:
15
16- 'make defconfig'. This passes 'libc/option-groups.defaults' to 'conf' as a default config, and outputs 'option-groups.config' to the top-level build directory, which will be the same as the default config.
17
18- 'make config'. This is the same line-oriented interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
19
20- 'make menuconfig'. This is the same menu-based interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
21
22
23Pre-Processing:
24
25
26The Linux kernel kconfig tools expect a prefix of "CONFIG_" on all config option names, but EGLIBC expects a prefix of "OPTION_". The pre-processing script, libc/options-config/config-preproc.pl, simply replaces "CONFIG_ with "OPTION_" in the given config file. The libc/options-config/Makefile passes the script output to a temporary config file, which is then passed to 'conf' or 'mconf'.
27
28Post-Processing (libc/options-config/config-postproc.pl):
29
30
31- Disabled options are output as a comment line of the form "# CONFIG_FOO is not set". This needs to be changed to an explicit "CONFIG_FOO=n" in order to be compatible with 'option-groups.awk' which generates the option-groups.h header.
32
33- "CONFIG_" prefix is changed back to "OPTION_".
34
35
36- The kconfig tools will not output anything for options that depend on a parent option, when the parent option is disabled. This implicit disable must be converted to an explicit "CONFIG_FOO=n" in order to be compatible with the way EGLIBC overrides the default option settings in 'libc/option-groups.defaults' with those in 'option-groups.config'.
37
38
39A new configure option, '--with-kconfig=<PATH>', tells EGLIBC where to find the pre-built 'conf' and 'mconf' host tools from Linux kernel builds.
40
41libc/EGLIBC.cross-building is updated to include instructions for using '--with-kconfig' for the final EGLIBC build, and shows how and when to run 'make *config'.
42
43libc/EGLIBC.option-groups is updated to include new information on the menuconfig support.
44
45Thanks,
46
47attached is the updated patch to address above issues.
48
49Steve
50
51--
52Steve Longerbeam | Senior Embedded Engineer, ESD Services
53Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
54P 510.354.5838 | M 408.410.2735
55Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
56
57
58Index: libc/EGLIBC.cross-building
59===================================================================
60--- libc.orig/EGLIBC.cross-building 2012-08-21 22:25:49.000000000 -0700
61+++ libc/EGLIBC.cross-building 2012-09-05 21:44:09.749577576 -0700
62@@ -243,9 +243,29 @@
63 > $src/libc/configure \
64 > --prefix=/usr \
65 > --with-headers=$sysroot/usr/include \
66+ > --with-kconfig=$obj/linux/scripts/kconfig \
67 > --build=$build \
68 > --host=$target \
69 > --disable-profile --without-gd --without-cvs --enable-add-ons
70+
71+Note the additional '--with-kconfig' option. This tells EGLIBC where to
72+find the host config tools used by the kernel 'make config' and 'make
73+menuconfig'. These tools can be re-used by EGLIBC for its own 'make
74+*config' support, which will create 'option-groups.config' for you.
75+But first make sure those tools have been built by running some
76+dummy 'make *config' calls in the kernel directory:
77+
78+ $ cd $obj/linux
79+ $ PATH=$tools/bin:$PATH make config \
80+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
81+ $ PATH=$tools/bin:$PATH make menuconfig \
82+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
83+
84+Now we can configure and build the full EGLIBC:
85+
86+ $ cd $obj/eglibc
87+ $ PATH=$tools/bin:$PATH make defconfig
88+ $ PATH=$tools/bin:$PATH make menuconfig
89 $ PATH=$tools/bin:$PATH make
90 $ PATH=$tools/bin:$PATH make install install_root=$sysroot
91
92Index: libc/configure.in
93===================================================================
94--- libc.orig/configure.in 2012-09-05 21:40:19.000000000 -0700
95+++ libc/configure.in 2012-09-05 21:44:09.769577577 -0700
96@@ -96,6 +96,16 @@
97 [sysheaders=$withval],
98 [sysheaders=''])
99
100+AC_ARG_WITH([kconfig],
101+ AC_HELP_STRING([--with-kconfig=PATH],
102+ [location of kconfig tools to use (from Linux
103+ kernel builds) to re-use for configuring EGLIBC
104+ option groups]),
105+ [KCONFIG_TOOLS=$withval],
106+ [KCONFIG_TOOLS=''])
107+AC_SUBST(KCONFIG_TOOLS)
108+
109+
110 AC_SUBST(use_default_link)
111 AC_ARG_WITH([default-link],
112 AC_HELP_STRING([--with-default-link],
113Index: libc/config.make.in
114===================================================================
115--- libc.orig/config.make.in 2012-08-21 22:25:55.000000000 -0700
116+++ libc/config.make.in 2012-09-05 21:45:16.253579810 -0700
117@@ -48,6 +48,8 @@
118 c++-sysincludes = @CXX_SYSINCLUDES@
119 all-warnings = @all_warnings@
120
121+kconfig_tools = @KCONFIG_TOOLS@
122+
123 have-z-combreloc = @libc_cv_z_combreloc@
124 have-z-execstack = @libc_cv_z_execstack@
125 have-Bgroup = @libc_cv_Bgroup@
126Index: libc/options-config/config-postproc.pl
127===================================================================
128--- /dev/null 1970-01-01 00:00:00.000000000 +0000
129+++ libc/options-config/config-postproc.pl 2012-09-05 21:44:09.769577577 -0700
130@@ -0,0 +1,54 @@
131+#!/usr/bin/perl
132+
133+$usage = "usage: $0 <default config file> <config file>\n";
134+
135+die "$usage" unless @ARGV;
136+$defaults = shift @ARGV;
137+die "$usage" unless @ARGV;
138+die "Could not open $ARGV[0]" unless -T $ARGV[0];
139+
140+sub yank {
141+ @option = grep($_ ne $_[0], @option);
142+}
143+
144+open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
145+
146+# get the full list of available options using the default config file
147+$i = 0;
148+while (<DEFAULTS>) {
149+ if (/^\s*OPTION_(\w+)\s*=/) {
150+ $option[$i++] = $1;
151+ }
152+}
153+
154+# now go through the config file, making the necessary changes
155+while (<>) {
156+ if (/Linux Kernel Configuration/) {
157+ # change title
158+ s/Linux Kernel/Option Groups/;
159+ print;
160+ } elsif (/^\s*CONFIG_(\w+)\s*=/) {
161+ # this is an explicit option set line, change CONFIG_ to OPTION_
162+ # before printing and remove this option from option list
163+ $opt = $1;
164+ yank($opt);
165+ s/CONFIG_/OPTION_/g;
166+ print;
167+ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
168+ # this is a comment line, change CONFIG_ to OPTION_, remove this
169+ # option from option list, and convert to explicit OPTION_FOO=n
170+ $opt = $1;
171+ yank($opt);
172+ s/CONFIG_/OPTION_/g;
173+ print "OPTION_$opt=n\n";
174+ } else {
175+ print;
176+ }
177+}
178+
179+# any options left in @options, are options that were not mentioned in
180+# the config file, and implicitly that means the option must be set =n,
181+# so do that here.
182+foreach $opt (@option) {
183+ print "OPTION_$opt=n\n";
184+}
185Index: libc/options-config/config-preproc.pl
186===================================================================
187--- /dev/null 1970-01-01 00:00:00.000000000 +0000
188+++ libc/options-config/config-preproc.pl 2012-09-05 21:44:09.769577577 -0700
189@@ -0,0 +1,8 @@
190+#!/usr/bin/perl
191+
192+if (@ARGV) {
193+ while (<>) {
194+ s/OPTION_/CONFIG_/g;
195+ print;
196+ }
197+}
198Index: libc/options-config/Makefile
199===================================================================
200--- /dev/null 1970-01-01 00:00:00.000000000 +0000
201+++ libc/options-config/Makefile 2012-09-05 21:44:09.769577577 -0700
202@@ -0,0 +1,55 @@
203+# ===========================================================================
204+# EGLIBC option-groups configuration targets
205+# These targets are included from top-level makefile
206+
207+ifneq ($(kconfig_tools),)
208+ifneq (no,$(PERL))
209+
210+ocdir := options-config
211+
212+OconfigDefaults := option-groups.defaults
213+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
214+OconfigDef := option-groups.def
215+Oconfig := $(common-objpfx)option-groups.config
216+Oconfig_tmp := $(common-objpfx).tmp.config
217+
218+conf := $(kconfig_tools)/conf
219+mconf := $(kconfig_tools)/mconf
220+
221+preproc := $(PERL) $(ocdir)/config-preproc.pl
222+postproc := $(PERL) $(ocdir)/config-postproc.pl
223+
224+PHONY += defconfig config menuconfig
225+
226+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
227+ rm -f $(OconfigDefaults_tmp)
228+ rm -f $(Oconfig_tmp)
229+ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
230+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
231+ $(OconfigDef)
232+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
233+ rm $(Oconfig_tmp)
234+ rm $(OconfigDefaults_tmp)
235+
236+config: $(conf) $(OconfigDefaults) $(OconfigDef)
237+ rm -f $(Oconfig_tmp)
238+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
239+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
240+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
241+ rm $(Oconfig_tmp)
242+
243+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
244+ rm -f $(Oconfig_tmp)
245+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
246+ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
247+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
248+ rm $(Oconfig_tmp)
249+
250+# Help text used by make help
251+help:
252+ @echo ' defconfig - New config with default from default config'
253+ @echo ' config - Update current config utilising a line-oriented program'
254+ @echo ' menuconfig - Update current config utilising a menu based program'
255+
256+endif
257+endif
258Index: libc/option-groups.defaults
259===================================================================
260--- libc.orig/option-groups.defaults 2012-08-21 22:26:18.000000000 -0700
261+++ libc/option-groups.defaults 2012-09-05 21:44:09.769577577 -0700
262@@ -8,41 +8,41 @@
263 # are to be changed.
264 #
265 # By default, all option groups are enabled.
266-OPTION_EGLIBC_ADVANCED_INET6 = y
267-OPTION_EGLIBC_BACKTRACE = y
268-OPTION_EGLIBC_BIG_MACROS = y
269-OPTION_EGLIBC_BSD = y
270-OPTION_EGLIBC_CXX_TESTS = y
271-OPTION_EGLIBC_CATGETS = y
272-OPTION_EGLIBC_CHARSETS = y
273-OPTION_EGLIBC_CRYPT = y
274-OPTION_EGLIBC_CRYPT_UFC = y
275-OPTION_EGLIBC_DB_ALIASES = y
276-OPTION_EGLIBC_ENVZ = y
277-OPTION_EGLIBC_FCVT = y
278-OPTION_EGLIBC_FMTMSG = y
279-OPTION_EGLIBC_FSTAB = y
280-OPTION_EGLIBC_FTRAVERSE = y
281-OPTION_EGLIBC_GETLOGIN = y
282-OPTION_EGLIBC_IDN = y
283-OPTION_EGLIBC_INET = y
284-OPTION_EGLIBC_INET_ANL = y
285-OPTION_EGLIBC_LIBM = y
286-OPTION_EGLIBC_LIBM_BIG = y
287-OPTION_EGLIBC_LOCALES = y
288-OPTION_EGLIBC_LOCALE_CODE = y
289-OPTION_EGLIBC_MEMUSAGE = y
290-OPTION_EGLIBC_NIS = y
291-OPTION_EGLIBC_NSSWITCH = y
292-OPTION_EGLIBC_RCMD = y
293-OPTION_EGLIBC_RTLD_DEBUG = y
294-OPTION_EGLIBC_SPAWN = y
295-OPTION_EGLIBC_STREAMS = y
296-OPTION_EGLIBC_SUNRPC = y
297-OPTION_EGLIBC_UTMP = y
298-OPTION_EGLIBC_UTMPX = y
299-OPTION_EGLIBC_WORDEXP = y
300-OPTION_POSIX_C_LANG_WIDE_CHAR = y
301-OPTION_POSIX_REGEXP = y
302-OPTION_POSIX_REGEXP_GLIBC = y
303-OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y
304+OPTION_EGLIBC_ADVANCED_INET6=y
305+OPTION_EGLIBC_BACKTRACE=y
306+OPTION_EGLIBC_BIG_MACROS=y
307+OPTION_EGLIBC_BSD=y
308+OPTION_EGLIBC_CXX_TESTS=y
309+OPTION_EGLIBC_CATGETS=y
310+OPTION_EGLIBC_CHARSETS=y
311+OPTION_EGLIBC_CRYPT=y
312+OPTION_EGLIBC_CRYPT_UFC=y
313+OPTION_EGLIBC_DB_ALIASES=y
314+OPTION_EGLIBC_ENVZ=y
315+OPTION_EGLIBC_FCVT=y
316+OPTION_EGLIBC_FMTMSG=y
317+OPTION_EGLIBC_FSTAB=y
318+OPTION_EGLIBC_FTRAVERSE=y
319+OPTION_EGLIBC_GETLOGIN=y
320+OPTION_EGLIBC_IDN=y
321+OPTION_EGLIBC_INET=y
322+OPTION_EGLIBC_INET_ANL=y
323+OPTION_EGLIBC_LIBM=y
324+OPTION_EGLIBC_LIBM_BIG=y
325+OPTION_EGLIBC_LOCALES=y
326+OPTION_EGLIBC_LOCALE_CODE=y
327+OPTION_EGLIBC_MEMUSAGE=y
328+OPTION_EGLIBC_NIS=y
329+OPTION_EGLIBC_NSSWITCH=y
330+OPTION_EGLIBC_RCMD=y
331+OPTION_EGLIBC_RTLD_DEBUG=y
332+OPTION_EGLIBC_SPAWN=y
333+OPTION_EGLIBC_STREAMS=y
334+OPTION_EGLIBC_SUNRPC=y
335+OPTION_EGLIBC_UTMP=y
336+OPTION_EGLIBC_UTMPX=y
337+OPTION_EGLIBC_WORDEXP=y
338+OPTION_POSIX_C_LANG_WIDE_CHAR=y
339+OPTION_POSIX_REGEXP=y
340+OPTION_POSIX_REGEXP_GLIBC=y
341+OPTION_POSIX_WIDE_CHAR_DEVICE_IO=y
342Index: libc/option-groups.def
343===================================================================
344--- libc.orig/option-groups.def 2012-08-21 22:25:45.000000000 -0700
345+++ libc/option-groups.def 2012-09-05 21:44:09.773577578 -0700
346@@ -4,19 +4,19 @@
347 #
348 # An entry of the form:
349 #
350-# config OPTION_GROUP_NAME
351+# config GROUP_NAME
352 # bool "one-line explanation of what this option group controls"
353 # help
354 # Multi-line help explaining the option group's meaning in
355 # some detail, terminated by indentation level.
356 #
357-# defines an option group whose variable is OPTION_GROUP_NAME, with
358+# defines an option group whose variable is GROUP_NAME, with
359 # meaningful values 'y' (enabled) and 'n' (disabled). The
360 # documentation is formatted to be consumed by some sort of
361 # interactive configuration interface, but EGLIBC doesn't have such an
362 # interface yet.
363 #
364-# An option may have a 'depends' line, indicating which other options
365+# An option may have a 'depends on' line, indicating which other options
366 # must also be enabled if this option is. At present, EGLIBC doesn't
367 # check that these dependencies are satisfied.
368 #
369@@ -41,9 +41,9 @@
370 # although this simply reestablishes the value already set by
371 # 'option-groups.defaults'.
372
373-config OPTION_EGLIBC_ADVANCED_INET6
374+config EGLIBC_ADVANCED_INET6
375 bool "IPv6 Advanced Sockets API support (RFC3542)"
376- depends OPTION_EGLIBC_INET
377+ depends on EGLIBC_INET
378 help
379 This option group includes the functions specified by RFC 3542,
380 "Advanced Sockets Application Program Interface (API) for
381@@ -71,7 +71,7 @@
382 inet6_rth_segments
383 inet6_rth_space
384
385-config OPTION_EGLIBC_BACKTRACE
386+config EGLIBC_BACKTRACE
387 bool "Functions for producing backtraces"
388 help
389 This option group includes functions for producing a list of
390@@ -85,7 +85,7 @@
391 backtrace_symbols
392 backtrace_symbols_fd
393
394-config OPTION_EGLIBC_BIG_MACROS
395+config EGLIBC_BIG_MACROS
396 bool "Use extensive inline code"
397 help
398 This option group specifies whether certain pieces of code
399@@ -93,7 +93,7 @@
400 group is not selected, function calls will be used instead,
401 hence reducing the library footprint.
402
403-config OPTION_EGLIBC_BSD
404+config EGLIBC_BSD
405 bool "BSD-specific functions, and their compatibility stubs"
406 help
407 This option group includes functions specific to BSD kernels.
408@@ -109,10 +109,9 @@
409 revoke
410 setlogin
411
412-config OPTION_EGLIBC_CXX_TESTS
413+config EGLIBC_CXX_TESTS
414 bool "Tests that link against the standard C++ library."
415- depends OPTION_POSIX_WIDE_CHAR_DEVICE_IO
416- depends OPTION_EGLIBC_LIBM
417+ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
418 help
419 This option group does not include any C library functions;
420 instead, it controls which EGLIBC tests an ordinary 'make
421@@ -121,23 +120,22 @@
422 run.
423
424 The standard C++ library depends on the math library 'libm' and
425- the wide character I/O functions included in EGLIBC. If those
426- option groups are disabled, this test must also be disabled.
427+ the wide character I/O functions included in EGLIBC. So those
428+ option groups must be enabled if this test is enabled.
429
430-config OPTION_EGLIBC_CATGETS
431+config EGLIBC_CATGETS
432 bool "Functions for accessing message catalogs"
433- depends OPTION_EGLIBC_LOCALE_CODE
434+ depends on EGLIBC_LOCALE_CODE
435 help
436 This option group includes functions for accessing message
437 catalogs: catopen, catclose, and catgets.
438
439- This option group depends on the OPTION_EGLIBC_LOCALE_CODE
440- option group; if you disable that, you must also disable this.
441+ This option group depends on the EGLIBC_LOCALE_CODE
442+ option group.
443
444-config OPTION_EGLIBC_CHARSETS
445+config EGLIBC_CHARSETS
446 bool "iconv/gconv character set conversion libraries"
447 help
448-
449 This option group includes support for character sets other
450 than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
451 various encodings. This affects both the character sets
452@@ -198,16 +196,16 @@
453 WCHAR_T - EGLIBC's internal form (target-endian,
454 32-bit ISO 10646)
455
456-config OPTION_EGLIBC_CRYPT
457+config EGLIBC_CRYPT
458 bool "Encryption library"
459 help
460 This option group includes the `libcrypt' library which
461 provides functions for one-way encryption. Supported
462 encryption algorithms include MD5, SHA-256, SHA-512 and DES.
463
464-config OPTION_EGLIBC_CRYPT_UFC
465+config EGLIBC_CRYPT_UFC
466 bool "Ultra fast `crypt' implementation"
467- depends OPTION_EGLIBC_CRYPT
468+ depends on EGLIBC_CRYPT
469 help
470 This option group provides ultra fast DES-based implementation of
471 the `crypt' function. When this option group is disabled,
472@@ -216,7 +214,7 @@
473 errno to ENOSYS if /salt/ passed does not correspond to either MD5,
474 SHA-256 or SHA-512 algorithm.
475
476-config OPTION_EGLIBC_DB_ALIASES
477+config EGLIBC_DB_ALIASES
478 bool "Functions for accessing the mail aliases database"
479 help
480 This option group includues functions for looking up mail
481@@ -233,7 +231,7 @@
482 When this option group is disabled, the NSS service libraries
483 also lack support for querying their mail alias tables.
484
485-config OPTION_EGLIBC_ENVZ
486+config EGLIBC_ENVZ
487 bool "Functions for handling envz-style environment vectors."
488 help
489 This option group contains functions for creating and operating
490@@ -248,7 +246,7 @@
491 envz_entry envz_remove
492 envz_get envz_strip
493
494-config OPTION_EGLIBC_FCVT
495+config EGLIBC_FCVT
496 bool "Functions for converting floating-point numbers to strings"
497 help
498 This option group includes functions for converting
499@@ -262,14 +260,14 @@
500 fcvt_r qfcvt_r
501 gcvt qgcvt
502
503-config OPTION_EGLIBC_FMTMSG
504+config EGLIBC_FMTMSG
505 bool "Functions for formatting messages"
506 help
507 This option group includes the following functions:
508
509 addseverity fmtmsg
510
511-config OPTION_EGLIBC_FSTAB
512+config EGLIBC_FSTAB
513 bool "Access functions for 'fstab'"
514 help
515 This option group includes functions for reading the mount
516@@ -283,7 +281,7 @@
517 getfsent setfsent
518 getfsfile
519
520-config OPTION_EGLIBC_FTRAVERSE
521+config EGLIBC_FTRAVERSE
522 bool "Functions for traversing file hierarchies"
523 help
524 This option group includes functions for traversing file
525@@ -297,9 +295,9 @@
526 fts_set nftw64
527 fts_close
528
529-config OPTION_EGLIBC_GETLOGIN
530+config EGLIBC_GETLOGIN
531 bool "The getlogin function"
532- depends OPTION_EGLIBC_UTMP
533+ depends on EGLIBC_UTMP
534 help
535 This function group includes the 'getlogin' and 'getlogin_r'
536 functions, which return the user name associated by the login
537@@ -309,17 +307,17 @@
538 fall back on 'getlogin' to find the user's login name for tilde
539 expansion when the 'HOME' environment variable is not set.
540
541-config OPTION_EGLIBC_IDN
542+config EGLIBC_IDN
543 bool "International domain names support"
544 help
545 This option group includes the `libcidn' library which
546 provides support for international domain names.
547
548-config OPTION_EGLIBC_INET
549+config EGLIBC_INET
550 bool "Networking support"
551 help
552 This option group includes networking-specific functions and
553- data. With OPTION_EGLIBC_INET disabled, the EGLIBC
554+ data. With EGLIBC_INET disabled, the EGLIBC
555 installation and API changes as follows:
556
557 - The following libraries are not installed:
558@@ -439,14 +437,14 @@
559 use Unix-domain sockets to communicate with the syslog daemon;
560 syslog is valuable in non-networked contexts.
561
562-config OPTION_EGLIBC_INET_ANL
563+config EGLIBC_INET_ANL
564 bool "Asynchronous name lookup"
565- depends OPTION_EGLIBC_INET
566+ depends on EGLIBC_INET
567 help
568 This option group includes the `libanl' library which
569 provides support for asynchronous name lookup.
570
571-config OPTION_EGLIBC_LIBM
572+config EGLIBC_LIBM
573 bool "libm (math library)"
574 help
575 This option group includes the 'libm' library, containing
576@@ -464,8 +462,9 @@
577 group, you will not be able to build 'libstdc++' against the
578 resulting EGLIBC installation.
579
580-config OPTION_EGLIBC_LIBM_BIG
581+config EGLIBC_LIBM_BIG
582 bool "Math library size"
583+ depends on EGLIBC_LIBM
584 help
585 This option group enables default configuration of the math library.
586 Not selecting this option group removes most of the extended and
587@@ -477,7 +476,7 @@
588 This option group is useful for systems that do not rely on precise
589 floating point math.
590
591-config OPTION_EGLIBC_LOCALES
592+config EGLIBC_LOCALES
593 bool "Locale definitions"
594 help
595 This option group includes all locale definitions other than
596@@ -485,17 +484,17 @@
597 only the "C" locale is supported.
598
599
600-config OPTION_EGLIBC_LOCALE_CODE
601+config EGLIBC_LOCALE_CODE
602 bool "Locale functions"
603- depends OPTION_POSIX_C_LANG_WIDE_CHAR
604+ depends on POSIX_C_LANG_WIDE_CHAR
605 help
606 This option group includes locale support functions, programs,
607- and libraries. With OPTION_EGLIBC_LOCALE_FUNCTIONS disabled,
608+ and libraries. With EGLIBC_LOCALE_CODE disabled,
609 EGLIBC supports only the 'C' locale (also known as 'POSIX'),
610 and ignores the settings of the 'LANG' and 'LC_*' environment
611 variables.
612
613- With OPTION_EGLIBC_LOCALE_CODE disabled, the following
614+ With EGLIBC_LOCALE_CODE disabled, the following
615 functions are omitted from libc:
616
617 duplocale localeconv nl_langinfo rpmatch strfmon_l
618@@ -504,46 +503,43 @@
619 Furthermore, only the LC_CTYPE and LC_TIME categories of the
620 standard "C" locale are available.
621
622- The OPTION_EGLIBC_CATGETS option group depends on this option
623- group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also
624- disable OPTION_EGLIBC_CATGETS.
625+ The EGLIBC_CATGETS option group depends on this option group.
626+
627
628-config OPTION_EGLIBC_MEMUSAGE
629+config EGLIBC_MEMUSAGE
630 bool "Memory profiling library"
631 help
632 This option group includes the `libmemusage' library and
633 the `memusage' and `memusagestat' utilities.
634 These components provide memory profiling functions.
635
636- OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
637+ EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
638
639 Libmemusage library buffers the profiling data in memory
640 before writing it out to disk. By default, the library
641 allocates 1.5M buffer, which can be substantial for some
642- systems. OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
643+ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
644 allows to change the default buffer size. It specifies
645 the number of entries the buffer should have.
646 On most architectures one buffer entry amounts to 48 bytes,
647 so setting this option to the value of 512 will reduce the size of
648 the memory buffer to 24K.
649
650-config OPTION_EGLIBC_NIS
651+config EGLIBC_NIS
652 bool "Support for NIS, NIS+, and the special 'compat' services."
653- depends OPTION_EGLIBC_INET
654- depends OPTION_EGLIBC_SUNRPC
655+ depends on EGLIBC_INET && EGLIBC_SUNRPC
656 help
657 This option group includes the NIS, NIS+, and 'compat' Name
658 Service Switch service libraries. When it is disabled, those
659 services libraries are not installed; you should remove any
660 references to them from your 'nsswitch.conf' file.
661
662- This option group depends on the OPTION_EGLIBC_INET option
663+ This option group depends on the EGLIBC_INET option
664 group; you must enable that to enable this option group.
665
666-config OPTION_EGLIBC_NSSWITCH
667+config EGLIBC_NSSWITCH
668 bool "Name service switch (nsswitch) support"
669 help
670-
671 This option group includes support for the 'nsswitch' facility.
672 With this option group enabled, all EGLIBC functions for
673 accessing various system databases (passwords and groups;
674@@ -557,12 +553,12 @@
675 'option-groups.config' file must set the following two
676 variables:
677
678- OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
679+ EGLIBC_NSSWITCH_FIXED_CONFIG
680
681 Set this to the name of a file whose contents observe the
682 same syntax as an ordinary '/etc/nsswitch.conf' file. The
683 EGLIBC build process parses this file just as EGLIBC would
684- at run time if OPTION_EGLIBC_NSSWITCH were enabled, and
685+ at run time if EGLIBC_NSSWITCH were enabled, and
686 produces a C library that uses the nsswitch service
687 libraries to search for database entries as this file
688 specifies, instead of consulting '/etc/nsswitch.conf' at run
689@@ -580,7 +576,7 @@
690 you will probably want to delete references to databases not
691 needed on your system.
692
693- OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS
694+ EGLIBC_NSSWITCH_FIXED_FUNCTIONS
695
696 The EGLIBC build process uses this file to decide which
697 functions to make available from which service libraries.
698@@ -598,28 +594,28 @@
699 Be sure to mention each function in each service you wish to
700 use. If you do not mention a service's function here, the
701 EGLIBC database access functions will not find it, even if
702- it is listed in the OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
703+ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
704 file.
705
706- In this arrangement, EGLIBC will not use the 'dlopen' and
707- 'dlsym' functions to find database access functions. Instead,
708- libc hard-codes references to the service libraries' database
709- access functions. You must explicitly link your program
710- against the name service libraries (those whose names start
711- with 'libnss_', in the sysroot's '/lib' directory) whose
712- functions you intend to use. This arrangement helps
713- system-wide static analysis tools decide which functions a
714- system actually uses.
715-
716- Note that some nsswitch service libraries require other option
717- groups to be enabled; for example, the OPTION_EGLIBC_INET
718- option group must be enabled to use the 'libnss_dns.so.2'
719- service library, which uses the Domain Name System network
720- protocol to answer queries.
721+ In this arrangement, EGLIBC will not use the 'dlopen' and
722+ 'dlsym' functions to find database access functions. Instead,
723+ libc hard-codes references to the service libraries' database
724+ access functions. You must explicitly link your program
725+ against the name service libraries (those whose names start
726+ with 'libnss_', in the sysroot's '/lib' directory) whose
727+ functions you intend to use. This arrangement helps
728+ system-wide static analysis tools decide which functions a
729+ system actually uses.
730+
731+ Note that some nsswitch service libraries require other option
732+ groups to be enabled; for example, the EGLIBC_INET
733+ option group must be enabled to use the 'libnss_dns.so.2'
734+ service library, which uses the Domain Name System network
735+ protocol to answer queries.
736
737-config OPTION_EGLIBC_RCMD
738+config EGLIBC_RCMD
739 bool "Support for 'rcmd' and related library functions"
740- depends OPTION_EGLIBC_INET
741+ depends on EGLIBC_INET
742 help
743 This option group includes functions for running commands on
744 remote machines via the 'rsh' protocol, and doing authentication
745@@ -635,7 +631,7 @@
746 rresvport ruserpass
747 rresvport_af
748
749-config OPTION_EGLIBC_RTLD_DEBUG
750+config EGLIBC_RTLD_DEBUG
751 bool "Runtime linker debug print outs"
752 help
753 This option group enables debug output of the runtime linker
754@@ -646,7 +642,7 @@
755 the `ldd' utility which may also be used by the prelinker.
756 In particular, the `--unused' ldd option will not work correctly.
757
758-config OPTION_EGLIBC_SPAWN
759+config EGLIBC_SPAWN
760 bool "Support for POSIX posix_spawn functions"
761 help
762 This option group includes the POSIX functions for executing
763@@ -682,7 +678,7 @@
764 disabled, those programs will only operate on uncompressed
765 charmap files.
766
767-config OPTION_EGLIBC_STREAMS
768+config EGLIBC_STREAMS
769 bool "Support for accessing STREAMS."
770 help
771 This option group includes functions for reading and writing
772@@ -698,14 +694,14 @@
773 isastream fdetach
774 putmsg
775
776-config OPTION_EGLIBC_SUNRPC
777+config EGLIBC_SUNRPC
778 bool "Support for the Sun 'RPC' protocol."
779- depends OPTION_EGLIBC_INET
780+ depends on EGLIBC_INET
781 help
782 This option group includes support for the Sun RPC protocols,
783 including the 'rpcgen' and 'rpcinfo' programs.
784
785-config OPTION_EGLIBC_UTMP
786+config EGLIBC_UTMP
787 bool "Older access functions for 'utmp' login records"
788 help
789 This option group includes the older 'utent' family of
790@@ -732,9 +728,9 @@
791
792 libutil.so (and libutil.a)
793
794-config OPTION_EGLIBC_UTMPX
795+config EGLIBC_UTMPX
796 bool "POSIX access functions for 'utmp' login records"
797- depends OPTION_EGLIBC_UTMP
798+ depends on EGLIBC_UTMP
799 help
800 This option group includes the POSIX functions for reading and
801 writing user login records in the 'utmp' file (usually
802@@ -755,21 +751,21 @@
803 updwtmpx
804 utmpxname
805
806-config OPTION_EGLIBC_WORDEXP
807+config EGLIBC_WORDEXP
808 bool "Shell-style word expansion"
809 help
810 This option group includes the 'wordexp' function for
811 performing word expansion in the manner of the shell, and the
812 accompanying 'wordfree' function.
813
814-config OPTION_POSIX_C_LANG_WIDE_CHAR
815+config POSIX_C_LANG_WIDE_CHAR
816 bool "ISO C library wide character functions, excluding I/O"
817 help
818 This option group includes the functions defined by the ISO C
819 standard for working with wide and multibyte characters in
820 memory. Functions for reading and writing wide and multibyte
821 characters from and to files call in the
822- OPTION_POSIX_WIDE_CHAR_DEVICE_IO option group.
823+ POSIX_WIDE_CHAR_DEVICE_IO option group.
824
825 This option group includes the following functions:
826
827@@ -791,14 +787,14 @@
828 mbrlen wcscoll wcstol
829 mbrtowc wcscpy wcstold
830
831-config OPTION_POSIX_REGEXP
832+config POSIX_REGEXP
833 bool "Regular expressions"
834 help
835 This option group includes the POSIX regular expression
836 functions, and the associated non-POSIX extensions and
837 compatibility functions.
838
839- With OPTION_POSIX_REGEXP disabled, the following functions are
840+ With POSIX_REGEXP disabled, the following functions are
841 omitted from libc:
842
843 re_comp re_max_failures regcomp
844@@ -812,9 +808,9 @@
845 <regexp.h> header file, 'compile', 'step', and 'advance', is
846 omitted.
847
848-config OPTION_POSIX_REGEXP_GLIBC
849+config POSIX_REGEXP_GLIBC
850 bool "Regular expressions from GLIBC"
851- depends OPTION_POSIX_REGEXP
852+ depends on POSIX_REGEXP
853 help
854 This option group specifies which regular expression
855 library to use. The choice is between regex
856@@ -823,9 +819,9 @@
857 optimized for speed; regex from libiberty is more than twice
858 as small while still is enough for most practical purposes.
859
860-config OPTION_POSIX_WIDE_CHAR_DEVICE_IO
861+config POSIX_WIDE_CHAR_DEVICE_IO
862 bool "Input and output functions for wide characters"
863- depends OPTION_POSIX_C_LANG_WIDE_CHAR
864+ depends on POSIX_C_LANG_WIDE_CHAR
865 help
866 This option group includes functions for reading and writing
867 wide characters to and from <stdio.h> streams.
868Index: libc/Makefile
869===================================================================
870--- libc.orig/Makefile 2012-08-21 22:25:54.000000000 -0700
871+++ libc/Makefile 2012-09-05 21:44:09.773577578 -0700
872@@ -24,6 +24,7 @@
873
874 include Makeconfig
875
876+include options-config/Makefile
877
878 # This is the default target; it makes everything except the tests.
879 .PHONY: all
880Index: libc/configure
881===================================================================
882--- libc.orig/configure 2012-09-05 21:40:19.000000000 -0700
883+++ libc/configure 2012-09-05 21:44:09.777577578 -0700
884@@ -628,6 +628,7 @@
885 libc_cv_have_bash2
886 BASH_SHELL
887 libc_cv_gcc_static_libgcc
888+KCONFIG_TOOLS
889 CXX_SYSINCLUDES
890 SYSINCLUDES
891 AUTOCONF
892@@ -735,6 +736,7 @@
893 with_binutils
894 with_selinux
895 with_headers
896+with_kconfig
897 with_default_link
898 enable_sanity_checks
899 enable_shared
900@@ -1425,6 +1427,9 @@
901 --with-selinux if building with SELinux support
902 --with-headers=PATH location of system headers to use (for example
903 /usr/src/linux/include) [default=compiler default]
904+ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel
905+ builds) to re-use for configuring EGLIBC option
906+ groups
907 --with-default-link do not use explicit linker scripts
908 --with-pkgversion=PKG Use PKG in the version string in place of "EGLIBC"
909 --with-bugurl=URL Direct users to URL to report a bug
910@@ -3485,6 +3490,14 @@
911
912
913
914+# Check whether --with-kconfig was given.
915+if test "${with_kconfig+set}" = set; then
916+ withval=$with_kconfig; KCONFIG_TOOLS=$withval
917+else
918+ KCONFIG_TOOLS=''
919+fi
920+
921+
922
923 # Check whether --with-default-link was given.
924 if test "${with_default_link+set}" = set; then :
925Index: libc/EGLIBC.option-groups
926===================================================================
927--- libc.orig/EGLIBC.option-groups 2012-08-21 22:26:20.000000000 -0700
928+++ libc/EGLIBC.option-groups 2012-09-05 21:44:09.777577578 -0700
929@@ -56,33 +56,9 @@
930
931 The Option Groups
932
933-EGLIBC currently implements the following option groups, also
934-documented in the file 'option-groups.def':
935-
936-OPTION_EGLIBC_CATGETS
937- This option group includes functions for accessing message
938- catalogs: catopen, catclose, and catgets.
939-
940-OPTION_EGLIBC_LOCALES
941- This option group includes all locale definitions other than
942- those for the "C" locale. If this option group is omitted, then
943- only the "C" locale is supported.
944-
945-OPTION_EGLIBC_LIBM
946- This option group includes the 'libm' library, containing
947- mathematical functions. If this option group is omitted, then
948- an EGLIBC installation does not include shared or unshared versions
949- of the math library.
950-
951- Note that this does not remove all floating-point related
952- functionality from EGLIBC; for example, 'printf' and 'scanf'
953- can still print and read floating-point values with this option
954- group disabled.
955-
956- Note that the ISO Standard C++ library 'libstdc++' depends on
957- EGLIBC's math library 'libm'. If you disable this option
958- group, you will not be able to build 'libstdc++' against the
959- resulting EGLIBC installation.
960+To see the current full list of implemented option groups, refer to the
961+file 'option-groups.def' at the top of the source tree, or run
962+'make menuconfig' from the top-level build directory.
963
964 The POSIX.1-2001 specification includes a suggested partition of all
965 the functions in the POSIX C API into option groups: math functions
966@@ -110,6 +86,18 @@
967 OPTION_EGLIBC_LOCALES = n
968 OPTION_EGLIBC_LIBM = y
969
970+Like the Linux kernel, EGLIBC supports a similar set of '*config' make
971+targets to make it easier to create 'option-groups.config', with all
972+dependencies between option groups automatically satisfied. Run
973+'make help' to see the list of supported make config targets. For
974+example, 'make menuconfig' will update the current config utilising a
975+menu based program.
976+
977+The option group names and their type (boolean, int, hex, string), help
978+description, and dependencies with other option groups, are described by
979+'option-groups.def' at the top of the source tree, analogous to the
980+'Kconfig' files in the Linux kernel.
981+
982 In general, each option group variable controls whether a given set of
983 object files in EGLIBC is compiled and included in the final
984 libraries, or omitted from the build.
985@@ -132,22 +120,3 @@
986
987 We have used the system to subset some portions of EGLIBC's
988 functionality. It needs to be extended to cover more of the library.
989-
990-At the moment, EGLIBC performs no sanity checks on the contents of
991-'option-groups.config'; if an option group's name is mistyped, the
992-option group is silently included in the build. EGLIBC should check
993-that all variables set in 'option-groups.config' are proper option
994-group names, and that their values are appropriate.
995-
996-Some portions of EGLIBC depend on others; for example, the Sun Remote
997-Procedure Call functions in 'sunrpc' depend on the networking
998-functions in 'inet'. The sanity checking described above should check
999-that the selection configuration satisfies dependencies within EGLIBC,
1000-and produce a legible error message if it does not. At the moment,
1001-inconsistent configurations produce link errors late in the build
1002-process.
1003-
1004-The Linux kernel's configuration system provides interactive
1005-interfaces for creating and modifying configuration files (which also
1006-perform the sanity checking and dependency tracking described above).
1007-EGLIBC should provide similar interfaces.
diff --git a/meta/recipes-core/eglibc/eglibc-2.16/0002-eglibc-menuconfig-hex-string-options.patch b/meta/recipes-core/eglibc/eglibc-2.16/0002-eglibc-menuconfig-hex-string-options.patch
new file mode 100644
index 0000000000..7caba48112
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/0002-eglibc-menuconfig-hex-string-options.patch
@@ -0,0 +1,169 @@
1pulled from
2
3http://www.eglibc.org/archives/patches/msg01043.html
4
5
6Upstream-Status: Pending
7Signed-off-by: Khem
8
9
10This patch builds on the menuconfig patch for EGLIBC.
11
12
13There are a few options that have non-boolean types, that would benefit from the new 'make *config' support:
14
15EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE (int)
16EGLIBC_NSSWITCH_FIXED_CONFIG (string)
17EGLIBC_NSSWITCH_FIXED_FUNCTIONS (string)
18
19
20The patch converts these to real options in libc/option-groups.def. Also, libc/scripts/option-groups.awk is modified to output a '#define' line for int, hex, or string options encountered in the config file.
21
22In the post-processing script config-postproc.pl, a small change is needed: for any boolean option FOO that is implicitly disabled in the kconfig output, make sure that option is indeed a boolean before printing the explicit OPTION_FOO=n.
23
24Finally, libc/malloc/Makefile passes __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE as a CPPFLAGS, which is not necessary anymore because this macro will now be present in the generated header.
25
26attached is the updated patch to address above issues.
27
28Steve
29
30--
31Steve Longerbeam | Senior Embedded Engineer, ESD Services
32Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
33P 510.354.5838 | M 408.410.2735
34Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
35
36
37Index: libc/malloc/Makefile
38===================================================================
39--- libc.orig/malloc/Makefile 2012-01-04 22:06:18.000000000 -0800
40+++ libc/malloc/Makefile 2012-05-09 19:35:28.598682105 -0700
41@@ -48,10 +48,6 @@
42 ifeq ($(OPTION_EGLIBC_MEMUSAGE),y)
43 extra-libs = libmemusage
44 extra-libs-others = $(extra-libs)
45-
46-ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
47-CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE)
48-endif
49 endif
50
51 libmemusage-routines = memusage
52Index: libc/option-groups.def
53===================================================================
54--- libc.orig/option-groups.def 2012-05-09 19:33:48.398677256 -0700
55+++ libc/option-groups.def 2012-05-09 19:35:28.610682107 -0700
56@@ -513,8 +513,11 @@
57 the `memusage' and `memusagestat' utilities.
58 These components provide memory profiling functions.
59
60- EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
61-
62+config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
63+ int "Memory profiling library buffer size"
64+ depends on EGLIBC_MEMUSAGE
65+ default "32768"
66+ help
67 Libmemusage library buffers the profiling data in memory
68 before writing it out to disk. By default, the library
69 allocates 1.5M buffer, which can be substantial for some
70@@ -553,8 +556,11 @@
71 'option-groups.config' file must set the following two
72 variables:
73
74- EGLIBC_NSSWITCH_FIXED_CONFIG
75-
76+config EGLIBC_NSSWITCH_FIXED_CONFIG
77+ string "Nsswitch fixed config filename"
78+ depends on !EGLIBC_NSSWITCH
79+ default ""
80+ help
81 Set this to the name of a file whose contents observe the
82 same syntax as an ordinary '/etc/nsswitch.conf' file. The
83 EGLIBC build process parses this file just as EGLIBC would
84@@ -576,8 +582,11 @@
85 you will probably want to delete references to databases not
86 needed on your system.
87
88- EGLIBC_NSSWITCH_FIXED_FUNCTIONS
89-
90+config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
91+ string "Nsswitch fixed functions filename"
92+ depends on !EGLIBC_NSSWITCH
93+ default ""
94+ help
95 The EGLIBC build process uses this file to decide which
96 functions to make available from which service libraries.
97 The file 'nss/fixed-nsswitch.functions' serves as a sample
98Index: libc/options-config/config-postproc.pl
99===================================================================
100--- libc.orig/options-config/config-postproc.pl 2012-05-09 19:33:36.530676681 -0700
101+++ libc/options-config/config-postproc.pl 2012-05-09 19:35:28.610682107 -0700
102@@ -8,7 +8,7 @@
103 die "Could not open $ARGV[0]" unless -T $ARGV[0];
104
105 sub yank {
106- @option = grep($_ ne $_[0], @option);
107+ @option = grep(!($_ =~ /$_[0]\s*=/), @option);
108 }
109
110 open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
111@@ -16,7 +16,7 @@
112 # get the full list of available options using the default config file
113 $i = 0;
114 while (<DEFAULTS>) {
115- if (/^\s*OPTION_(\w+)\s*=/) {
116+ if (/^\s*OPTION_(\w+\s*=.*$)/) {
117 $option[$i++] = $1;
118 }
119 }
120@@ -35,8 +35,9 @@
121 s/CONFIG_/OPTION_/g;
122 print;
123 } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
124- # this is a comment line, change CONFIG_ to OPTION_, remove this
125- # option from option list, and convert to explicit OPTION_FOO=n
126+ # this is a comment line for an unset boolean option, change CONFIG_
127+ # to OPTION_, remove this option from option list, and convert to
128+ # explicit OPTION_FOO=n
129 $opt = $1;
130 yank($opt);
131 s/CONFIG_/OPTION_/g;
132@@ -46,9 +47,12 @@
133 }
134 }
135
136-# any options left in @options, are options that were not mentioned in
137+# any boolean options left in @options, are options that were not mentioned in
138 # the config file, and implicitly that means the option must be set =n,
139 # so do that here.
140 foreach $opt (@option) {
141- print "OPTION_$opt=n\n";
142+ if ($opt =~ /=\s*[yn]/) {
143+ $opt =~ s/=\s*[yn]/=n/;
144+ print "OPTION_$opt\n";
145+ }
146 }
147Index: libc/scripts/option-groups.awk
148===================================================================
149--- libc.orig/scripts/option-groups.awk 2012-01-04 22:06:00.000000000 -0800
150+++ libc/scripts/option-groups.awk 2012-05-09 19:35:28.610682107 -0700
151@@ -46,9 +46,15 @@
152 print "#define __" var " 1"
153 else if (vars[var] == "n")
154 print "/* #undef __" var " */"
155- # Ignore variables that don't have boolean values.
156- # Ideally, this would be driven by the types given in
157- # option-groups.def.
158+ else if (vars[var] ~ /^[0-9]+/ ||
159+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
160+ vars[var] ~ /^\"/)
161+ print "#define __" var " " vars[var]
162+ else
163+ print "/* #undef __" var " */"
164+ # Ignore variables that don't have boolean, int, hex, or
165+ # string values. Ideally, this would be driven by the types
166+ # given in option-groups.def.
167 }
168 }
169
diff --git a/meta/recipes-core/eglibc/eglibc-2.16/0003-eglibc-menuconfig-build-instructions.patch b/meta/recipes-core/eglibc/eglibc-2.16/0003-eglibc-menuconfig-build-instructions.patch
new file mode 100644
index 0000000000..d137f5b318
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/0003-eglibc-menuconfig-build-instructions.patch
@@ -0,0 +1,176 @@
1Pulled from
2
3http://www.eglibc.org/archives/patches/msg01035.html
4
5Upstream-Status: Pending
6Signed-off-by: Khem
7
8As part of the menuconfig development, I encountered some outdated information in the cross-build instructions, libc/EGLIBC.cross-building. This patch updates the file with new (and tested) instructions. It is unrelated to the menuconfig support, but applies after.
9
10My testing was done with an ARM target, and an x86_64 Linux host, so I converted the instructions to use those host/target types from the original i686/powerpc. Hope that's ok.
11
12
13Thanks,
14
15--
16Steve Longerbeam | Senior Embedded Engineer, ESD Services
17Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
18P 510.354.5838 | M 408.410.2735
19Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
20
21
22 EGLIBC.cross-building | 59 +++++++++++++++++++++++++++++---------------------
23 1 file changed, 35 insertions(+), 24 deletions(-)
24
25Index: libc/EGLIBC.cross-building
26===================================================================
27--- libc.orig/EGLIBC.cross-building 2012-05-09 19:33:36.522676681 -0700
28+++ libc/EGLIBC.cross-building 2012-05-09 19:36:13.918684298 -0700
29@@ -47,31 +47,34 @@
30 EGLIBC requires recent versions of the GNU binutils, GCC, and the
31 Linux kernel. The web page <http://www.eglibc.org/prerequisites>
32 documents the current requirements, and lists patches needed for
33-certain target architectures. As of this writing, EGLIBC required
34-binutils 2.17, GCC 4.1, and Linux 2.6.19.1.
35+certain target architectures. As of this writing, these build
36+instructions have been tested with binutils 2.22.51, GCC 4.6.2,
37+and Linux 3.1.
38
39 First, let's set some variables, to simplify later commands. We'll
40-build EGLIBC and GCC for a PowerPC target, known to the Linux kernel
41-as 'powerpc', and we'll do the build on an Intel Linux box:
42+build EGLIBC and GCC for an ARM target, known to the Linux kernel
43+as 'arm', and we'll do the build on an Intel x86_64 Linux box:
44
45- $ build=i686-pc-linux-gnu
46+ $ build=x86_64-pc-linux-gnu
47 $ host=$build
48- $ target=powerpc-none-linux-gnu
49- $ linux_arch=powerpc
50+ $ target=arm-none-linux-gnueabi
51+ $ linux_arch=arm
52
53 We're using the aforementioned versions of Binutils, GCC, and Linux:
54
55- $ binutilsv=binutils-2.17
56- $ gccv=gcc-4.1.1
57- $ linuxv=linux-2.6.20
58+ $ binutilsv=binutils-2.22.51
59+ $ gccv=gcc-4.6.2
60+ $ linuxv=linux-3.1
61
62 We're carrying out the entire process under '~/cross-build', which
63-contains unpacked source trees:
64+contains unpacked source trees for binutils, gcc, and linux kernel,
65+along with EGLIBC svn trunk (which can be checked-out with
66+'svn co http://www.eglibc.org/svn/trunk eglibc'):
67
68- $ top=$HOME/cross-build/ppc
69+ $ top=$HOME/cross-build/$target
70 $ src=$HOME/cross-build/src
71 $ ls $src
72- binutils-2.17 gcc-4.1.1 libc linux-2.6.20
73+ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1
74
75 We're going to place our build directories in a subdirectory 'obj',
76 we'll install the cross-development toolchain in 'tools', and we'll
77@@ -99,7 +102,7 @@
78
79 The First GCC
80
81-For our work, we need a cross-compiler targeting a PowerPC Linux
82+For our work, we need a cross-compiler targeting an ARM Linux
83 system. However, that configuration includes the shared library
84 'libgcc_s.so', which is compiled against the EGLIBC headers (which we
85 haven't installed yet) and linked against 'libc.so' (which we haven't
86@@ -125,7 +128,8 @@
87 > --prefix=$tools \
88 > --without-headers --with-newlib \
89 > --disable-shared --disable-threads --disable-libssp \
90- > --disable-libgomp --disable-libmudflap \
91+ > --disable-libgomp --disable-libmudflap --disable-libquadmath \
92+ > --disable-decimal-float --disable-libffi \
93 > --enable-languages=c
94 $ PATH=$tools/bin:$PATH make
95 $ PATH=$tools/bin:$PATH make install
96@@ -162,12 +166,13 @@
97 > CXX=$tools/bin/$target-g++ \
98 > AR=$tools/bin/$target-ar \
99 > RANLIB=$tools/bin/$target-ranlib \
100- > $src/libc/configure \
101+ > $src/eglibc/libc/configure \
102 > --prefix=/usr \
103 > --with-headers=$sysroot/usr/include \
104 > --build=$build \
105 > --host=$target \
106- > --disable-profile --without-gd --without-cvs --enable-add-ons
107+ > --disable-profile --without-gd --without-cvs \
108+ > --enable-add-ons=nptl,libidn,../ports
109
110 The option '--prefix=/usr' may look strange, but you should never
111 configure EGLIBC with a prefix other than '/usr': in various places,
112@@ -181,6 +186,11 @@
113 The '--with-headers' option tells EGLIBC where the Linux headers have
114 been installed.
115
116+The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look
117+for the listed glibc add-ons. Most notably the ports add-on (located
118+just above the libc sources in the EGLIBC svn tree) is required to
119+support ARM targets.
120+
121 We can now use the 'install-headers' makefile target to install the
122 headers:
123
124@@ -223,6 +233,7 @@
125 > --prefix=$tools \
126 > --with-sysroot=$sysroot \
127 > --disable-libssp --disable-libgomp --disable-libmudflap \
128+ > --disable-libffi --disable-libquadmath \
129 > --enable-languages=c
130 $ PATH=$tools/bin:$PATH make
131 $ PATH=$tools/bin:$PATH make install
132@@ -240,13 +251,14 @@
133 > CXX=$tools/bin/$target-g++ \
134 > AR=$tools/bin/$target-ar \
135 > RANLIB=$tools/bin/$target-ranlib \
136- > $src/libc/configure \
137+ > $src/eglibc/libc/configure \
138 > --prefix=/usr \
139 > --with-headers=$sysroot/usr/include \
140 > --with-kconfig=$obj/linux/scripts/kconfig \
141 > --build=$build \
142 > --host=$target \
143- > --disable-profile --without-gd --without-cvs --enable-add-ons
144+ > --disable-profile --without-gd --without-cvs \
145+ > --enable-add-ons=nptl,libidn,../ports
146
147 Note the additional '--with-kconfig' option. This tells EGLIBC where to
148 find the host config tools used by the kernel 'make config' and 'make
149@@ -337,15 +349,15 @@
150 ELF Header:
151 ...
152 Type: EXEC (Executable file)
153- Machine: PowerPC
154+ Machine: ARM
155
156 ...
157 Program Headers:
158 Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
159 PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4
160- INTERP 0x000134 0x10000134 0x10000134 0x0000d 0x0000d R 0x1
161- [Requesting program interpreter: /lib/ld.so.1]
162- LOAD 0x000000 0x10000000 0x10000000 0x008f0 0x008f0 R E 0x10000
163+ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
164+ [Requesting program interpreter: /lib/ld-linux.so.3]
165+ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000
166 ...
167
168 Looking at the dynamic section of the installed 'libgcc_s.so', we see
169@@ -357,7 +369,6 @@
170 Dynamic section at offset 0x1083c contains 24 entries:
171 Tag Type Name/Value
172 0x00000001 (NEEDED) Shared library: [libc.so.6]
173- 0x00000001 (NEEDED) Shared library: [ld.so.1]
174 0x0000000e (SONAME) Library soname: [libgcc_s.so.1]
175 ...
176
diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
index c4bc18c9d6..5a10387c1c 100644
--- a/meta/recipes-core/eglibc/eglibc_2.16.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
@@ -3,7 +3,7 @@ require eglibc.inc
3SRCREV = "20393" 3SRCREV = "20393"
4 4
5DEPENDS += "gperf-native" 5DEPENDS += "gperf-native"
6PR = "r7" 6PR = "r8"
7PR_append = "+svnr${SRCPV}" 7PR_append = "+svnr${SRCPV}"
8 8
9EGLIBC_BRANCH="eglibc-2_16" 9EGLIBC_BRANCH="eglibc-2_16"
@@ -26,6 +26,9 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};protocol=h
26 file://add_resource_h_to_wait_h.patch \ 26 file://add_resource_h_to_wait_h.patch \
27 file://0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch \ 27 file://0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch \
28 file://0001-Add-ARM-specific-static-stubs.c.patch \ 28 file://0001-Add-ARM-specific-static-stubs.c.patch \
29 file://0001-eglibc-menuconfig-support.patch \
30 file://0002-eglibc-menuconfig-hex-string-options.patch \
31 file://0003-eglibc-menuconfig-build-instructions.patch \
29 " 32 "
30LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \ 33LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
31 file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ 34 file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \