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) 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>
This commit is contained in:
parent
0935937969
commit
9fc63c57a8
|
@ -5724,7 +5724,7 @@ Index: git/posix/regex.h
|
||||||
# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
|
# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
|
||||||
|
|
||||||
+/* EGLIBC: Old regex implementation does not support these. */
|
+/* 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 this bit is set, then ignore case when matching.
|
||||||
If not set, then case is significant. */
|
If not set, then case is significant. */
|
||||||
# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
|
# 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_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
|
||||||
| RE_INTERVALS | RE_NO_EMPTY_RANGES)
|
| RE_INTERVALS | RE_NO_EMPTY_RANGES)
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_REGEXP_GLIBC
|
+#if __OPTION_POSIX_REGEXP_GLIBC
|
||||||
#define RE_SYNTAX_POSIX_BASIC \
|
#define RE_SYNTAX_POSIX_BASIC \
|
||||||
(_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
|
(_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
|
||||||
+#else
|
+#else
|
||||||
|
@ -5754,7 +5754,7 @@ Index: git/posix/regex.h
|
||||||
/* Like REG_NOTBOL, except for the end-of-line. */
|
/* Like REG_NOTBOL, except for the end-of-line. */
|
||||||
#define REG_NOTEOL (1 << 1)
|
#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
|
/* Use PMATCH[0] to delimit the start and end of the search in the
|
||||||
buffer. */
|
buffer. */
|
||||||
#define REG_STARTEND (1 << 2)
|
#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_vsscanf)
|
||||||
libc_hidden_proto (__nldbl___isoc99_vfscanf)
|
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_vfwscanf)
|
||||||
+libc_hidden_proto (__nldbl_vswscanf)
|
+libc_hidden_proto (__nldbl_vswscanf)
|
||||||
+libc_hidden_proto (__nldbl_vfwprintf)
|
+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)
|
weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf)
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section weak_function
|
attribute_compat_text_section weak_function
|
||||||
__nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
|
__nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
|
||||||
|
@ -15575,7 +15575,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
|
||||||
return done;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section
|
attribute_compat_text_section
|
||||||
__nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
|
__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)
|
libc_hidden_def (__nldbl_vdprintf)
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section weak_function
|
attribute_compat_text_section weak_function
|
||||||
__nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
|
__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)
|
libc_hidden_def (__nldbl_vsnprintf)
|
||||||
weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
|
weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section weak_function
|
attribute_compat_text_section weak_function
|
||||||
__nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt,
|
__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;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section
|
attribute_compat_text_section
|
||||||
__nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
|
__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;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section
|
attribute_compat_text_section
|
||||||
__nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
|
__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;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section
|
attribute_compat_text_section
|
||||||
__nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
|
__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)
|
libc_hidden_def (__nldbl___vfprintf_chk)
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section
|
attribute_compat_text_section
|
||||||
__nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
|
__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)
|
libc_hidden_def (__nldbl___vsprintf_chk)
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section
|
attribute_compat_text_section
|
||||||
__nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
|
__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;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
int
|
int
|
||||||
attribute_compat_text_section
|
attribute_compat_text_section
|
||||||
__nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
|
__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);
|
compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1);
|
||||||
#endif
|
#endif
|
||||||
#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2)
|
#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_swprintf, swprintf, GLIBC_2_2);
|
||||||
compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2);
|
compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2);
|
||||||
compat_symbol (libc, __nldbl_wprintf, wprintf, 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_vscanf);
|
||||||
NLDBL_DECL (__isoc99_vfscanf);
|
NLDBL_DECL (__isoc99_vfscanf);
|
||||||
NLDBL_DECL (__isoc99_vsscanf);
|
NLDBL_DECL (__isoc99_vsscanf);
|
||||||
+#ifdef __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
|
||||||
+NLDBL_DECL (vfwscanf);
|
+NLDBL_DECL (vfwscanf);
|
||||||
+NLDBL_DECL (vfwprintf);
|
+NLDBL_DECL (vfwprintf);
|
||||||
+NLDBL_DECL (vswprintf);
|
+NLDBL_DECL (vswprintf);
|
||||||
|
@ -15819,7 +15819,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
|
||||||
_G_va_list) __THROW;
|
_G_va_list) __THROW;
|
||||||
extern void __nldbl___vsyslog_chk (int, int, const char *, va_list);
|
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,
|
+extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
|
||||||
+ const wchar_t *__restrict, __gnuc_va_list);
|
+ const wchar_t *__restrict, __gnuc_va_list);
|
||||||
+extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
|
+extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
|
||||||
|
|
|
@ -1358,8 +1358,8 @@ Index: git/scripts/option-groups.awk
|
||||||
+ print " It defines macros that indicate which EGLIBC option groups were"
|
+ print " It defines macros that indicate which EGLIBC option groups were"
|
||||||
+ print " configured in 'option-groups.config' when this C library was"
|
+ print " configured in 'option-groups.config' when this C library was"
|
||||||
+ print " built. For each option group named OPTION_foo, it #defines"
|
+ 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 " __OPTION_foo to be 1 if the group is enabled, or #defines that"
|
||||||
+ print " symbol undefined if the group is disabled. */"
|
+ print " symbol to be 0 if the group is disabled. */"
|
||||||
+ print ""
|
+ print ""
|
||||||
+ print "#ifndef __GNU_OPTION_GROUPS_H"
|
+ print "#ifndef __GNU_OPTION_GROUPS_H"
|
||||||
+ print "#define __GNU_OPTION_GROUPS_H"
|
+ print "#define __GNU_OPTION_GROUPS_H"
|
||||||
|
@ -1379,7 +1379,7 @@ Index: git/scripts/option-groups.awk
|
||||||
+ if (vars[var] == "y")
|
+ if (vars[var] == "y")
|
||||||
+ print "#define __" var " 1"
|
+ print "#define __" var " 1"
|
||||||
+ else if (vars[var] == "n")
|
+ else if (vars[var] == "n")
|
||||||
+ print "/* #undef __" var " */"
|
+ print "#define __" var " 0"
|
||||||
+ else if (vars[var] ~ /^[0-9]+/ ||
|
+ else if (vars[var] ~ /^[0-9]+/ ||
|
||||||
+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
|
+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
|
||||||
+ vars[var] ~ /^\"/)
|
+ vars[var] ~ /^\"/)
|
||||||
|
|
Loading…
Reference in New Issue