diff options
author | Juro Bystricky <jurobystricky@hotmail.com> | 2014-11-27 10:32:59 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-31 10:18:57 +0000 |
commit | 0d65f6c16dcd940e6349e758dcb30f550507b426 (patch) | |
tree | fbe71b430755647533b5500cfcfbdc06dd94a8d6 /meta/recipes-core/glibc/glibc/option-groups.patch | |
parent | f8adeb08f167e4df95912a9d1c5c8d654c1e80ac (diff) | |
download | poky-0d65f6c16dcd940e6349e758dcb30f550507b426.tar.gz |
eglibc: modified option-groups.h generation
option-groups.h only explicitely #defines options that are enabled.
EGLIBC options are typically pre-processed under the assumption that if
an option is not explicitely defined then it evaluates as 0.
This assumption is correct, but it generates a compiler warning
message each time an undefined symbol is being evaluated.
In order to remove the warnings, each EGLIBC option is now defined
as 1 if the option is enabled or as 0 otherwise.
The consequence is we cannot use #ifdef OPTION_XXX when evaluating
the option, we must always use #if OPTION_XXX.
[YOCTO #7001]
(From OE-Core rev: 7f1bdc331304a61a4836a5752bca210450b6c5b5)
(From OE-Core rev: bce598f21ee9f21228766d4bb19fef21695981da)
Signed-off-by: Juro Bystricky <jurobystricky@hotmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc/option-groups.patch')
-rw-r--r-- | meta/recipes-core/glibc/glibc/option-groups.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-core/glibc/glibc/option-groups.patch b/meta/recipes-core/glibc/glibc/option-groups.patch index 693bd2fbb8..198be73524 100644 --- a/meta/recipes-core/glibc/glibc/option-groups.patch +++ b/meta/recipes-core/glibc/glibc/option-groups.patch | |||
@@ -1358,8 +1358,8 @@ Index: git/scripts/option-groups.awk | |||
1358 | + print " It defines macros that indicate which EGLIBC option groups were" | 1358 | + print " It defines macros that indicate which EGLIBC option groups were" |
1359 | + print " configured in 'option-groups.config' when this C library was" | 1359 | + print " configured in 'option-groups.config' when this C library was" |
1360 | + print " built. For each option group named OPTION_foo, it #defines" | 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 leaves that" | 1361 | + print " __OPTION_foo to be 1 if the group is enabled, or #defines that" |
1362 | + print " symbol undefined if the group is disabled. */" | 1362 | + print " symbol to be 0 if the group is disabled. */" |
1363 | + print "" | 1363 | + print "" |
1364 | + print "#ifndef __GNU_OPTION_GROUPS_H" | 1364 | + print "#ifndef __GNU_OPTION_GROUPS_H" |
1365 | + print "#define __GNU_OPTION_GROUPS_H" | 1365 | + print "#define __GNU_OPTION_GROUPS_H" |
@@ -1379,7 +1379,7 @@ Index: git/scripts/option-groups.awk | |||
1379 | + if (vars[var] == "y") | 1379 | + if (vars[var] == "y") |
1380 | + print "#define __" var " 1" | 1380 | + print "#define __" var " 1" |
1381 | + else if (vars[var] == "n") | 1381 | + else if (vars[var] == "n") |
1382 | + print "/* #undef __" var " */" | 1382 | + print "#define __" var " 0" |
1383 | + else if (vars[var] ~ /^[0-9]+/ || | 1383 | + else if (vars[var] ~ /^[0-9]+/ || |
1384 | + vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ || | 1384 | + vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ || |
1385 | + vars[var] ~ /^\"/) | 1385 | + vars[var] ~ /^\"/) |