aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/option-groups.patch
diff options
context:
space:
mode:
authorJuro Bystricky <jurobystricky@hotmail.com>2014-11-27 10:32:59 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-05 17:42:47 +0000
commit7f1bdc331304a61a4836a5752bca210450b6c5b5 (patch)
tree9ec5822ae1ba2198236c9377227c1214d5384951 /meta/recipes-core/glibc/glibc/option-groups.patch
parent9e4b25893cc8e15e390b8f25545416ef431f0b88 (diff)
downloadopenembedded-core-contrib-7f1bdc331304a61a4836a5752bca210450b6c5b5.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] Signed-off-by: Juro Bystricky <jurobystricky@hotmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/glibc/glibc/option-groups.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/option-groups.patch6
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
+ print " It defines macros that indicate which EGLIBC option groups were"
+ print " configured in 'option-groups.config' when this C library was"
+ print " built. For each option group named OPTION_foo, it #defines"
-+ print " __OPTION_foo to be 1 if the group is enabled, or leaves that"
-+ print " symbol undefined if the group is disabled. */"
++ print " __OPTION_foo to be 1 if the group is enabled, or #defines that"
++ print " symbol to be 0 if the group is disabled. */"
+ print ""
+ print "#ifndef __GNU_OPTION_GROUPS_H"
+ print "#define __GNU_OPTION_GROUPS_H"
@@ -1379,7 +1379,7 @@ Index: git/scripts/option-groups.awk
+ if (vars[var] == "y")
+ print "#define __" var " 1"
+ else if (vars[var] == "n")
-+ print "/* #undef __" var " */"
++ print "#define __" var " 0"
+ else if (vars[var] ~ /^[0-9]+/ ||
+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
+ vars[var] ~ /^\"/)