diff options
author | Juro Bystricky <jurobystricky@hotmail.com> | 2014-11-27 10:32:59 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-05 17:42:47 +0000 |
commit | 7f1bdc331304a61a4836a5752bca210450b6c5b5 (patch) | |
tree | 9ec5822ae1ba2198236c9377227c1214d5384951 | |
parent | 9e4b25893cc8e15e390b8f25545416ef431f0b88 (diff) | |
download | openembedded-core-7f1bdc331304a61a4836a5752bca210450b6c5b5.tar.gz openembedded-core-7f1bdc331304a61a4836a5752bca210450b6c5b5.tar.bz2 openembedded-core-7f1bdc331304a61a4836a5752bca210450b6c5b5.zip |
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>
-rw-r--r-- | meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch | 34 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc/option-groups.patch | 6 |
2 files changed, 20 insertions, 20 deletions
diff --git a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch index 40c783212a..7136253c8b 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch +++ b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch @@ -5724,7 +5724,7 @@ Index: git/posix/regex.h # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) +/* EGLIBC: Old regex implementation does not support these. */ -+# ifdef __OPTION_POSIX_REGEXP_GLIBC ++# if __OPTION_POSIX_REGEXP_GLIBC /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) @@ -5740,7 +5740,7 @@ Index: git/posix/regex.h (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) -+#ifdef __OPTION_POSIX_REGEXP_GLIBC ++#if __OPTION_POSIX_REGEXP_GLIBC #define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) +#else @@ -5754,7 +5754,7 @@ Index: git/posix/regex.h /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) -+#ifdef __OPTION_POSIX_REGEXP_GLIBC ++#if __OPTION_POSIX_REGEXP_GLIBC /* Use PMATCH[0] to delimit the start and end of the search in the buffer. */ #define REG_STARTEND (1 << 2) @@ -15542,7 +15542,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c libc_hidden_proto (__nldbl___isoc99_vsscanf) libc_hidden_proto (__nldbl___isoc99_vfscanf) + -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO +libc_hidden_proto (__nldbl_vfwscanf) +libc_hidden_proto (__nldbl_vswscanf) +libc_hidden_proto (__nldbl_vfwprintf) @@ -15559,7 +15559,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c } weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf) -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section weak_function __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...) @@ -15575,7 +15575,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c return done; } -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...) @@ -15591,7 +15591,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c } libc_hidden_def (__nldbl_vdprintf) -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section weak_function __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap) @@ -15607,7 +15607,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c libc_hidden_def (__nldbl_vsnprintf) weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf) -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section weak_function __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt, @@ -15623,7 +15623,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c return done; } -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section __nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) @@ -15639,7 +15639,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c return done; } -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...) @@ -15655,7 +15655,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c return done; } -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen, @@ -15671,7 +15671,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c } libc_hidden_def (__nldbl___vfprintf_chk) -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap) @@ -15687,7 +15687,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c } libc_hidden_def (__nldbl___vsprintf_chk) -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen, @@ -15719,7 +15719,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c return done; } -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO int attribute_compat_text_section __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) @@ -15735,7 +15735,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1); #endif #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2) -+# ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++# if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2); compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2); compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2); @@ -15783,7 +15783,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h NLDBL_DECL (__isoc99_vscanf); NLDBL_DECL (__isoc99_vfscanf); NLDBL_DECL (__isoc99_vsscanf); -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO +NLDBL_DECL (vfwscanf); +NLDBL_DECL (vfwprintf); +NLDBL_DECL (vswprintf); @@ -15819,7 +15819,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h _G_va_list) __THROW; extern void __nldbl___vsyslog_chk (int, int, const char *, va_list); - -+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO ++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO +extern int __nldbl___vfwprintf_chk (FILE *__restrict, int, + const wchar_t *__restrict, __gnuc_va_list); +extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t, 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] ~ /^\"/) |