[OE-core] [PATCH 1/1] eglibc-use-option-groups.patch: Several fixups
Juro Bystricky
jurobystricky at hotmail.com
Wed Nov 19 17:59:49 UTC 2014
Peter Seebach <peter.seebach at ...> writes:
>
> On Tue, 11 Nov 2014 10:55:24 +0000
> Richard Purdie <richard.purdie at ...> wrote:
>
> > > Whilst I haven't 100% confirmed it,
> > >
https://autobuilder.yoctoproject.org/main/builders/poky-tiny/builds/102/steps
/BuildImages/logs/stdio
> > > looks like it may well be as a result of this change (which was included
> > > in the master-next build in question)...
> >
> > It is 100% confirmed now, with the patch reverted there was a green
> > build.
>
> Drat. I'll study this more and try to figure out what I missed.
>
> -s
Peter, I noticed you have another patch that fixes this issue:
@@ -16469,7 +16452,7 @@ Index: git/include/libc-symbols.h
-#define HAVE_MBSTATE_T 1
-#define HAVE_MBSRTOWCS 1
+
-+#if __OPTION_EGLIBC_LOCALE_CODE
++#if defined(__OPTION_EGLIBC_LOCALE_CODE) && __OPTION_EGLIBC_LOCALE_CODE
+# define HAVE_MBSTATE_T 1
+# define HAVE_MBSRTOWCS 1
+#endif
This will fix the the issue, but (please correct me if I'm wrong)
the way I see it, since__OPTION_EGLIBC_LOCALE_CODE is defined in
gnu/option-groups.h, which is NOT included libc-symbols.h and hence
#if defined(__OPTION_EGLIBC_LOCALE_CODE)
will always evaluate as false and HAVE_MBSTATE_T will be never defined.
I am not sure why the HAVE_MBSTATE_T needs to be conditioned at all, my
understanding is
it is defined if the file <wchar.h> contains type definition "mbstate_t".
This typedef either exists or not and saying it not exists when in fact
it does might be confusing (as it already is for me) and I don't see any
relation with __OPTION_EGLIBC_LOCALE_CODE.
The only place in glibc I could find that uses HAVE_MBSTATE_T is in
fnmatch.c:
#if defined _LIBC
# include <gnu/option-groups.h>
#endif
# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || (_LIBC &&
__OPTION_EGLIBC_LOCALE_CODE)
# define HANDLE_MULTIBYTE 1
# endif
To me it seems it is actually HANDLE_MULTIBYTE that we want conditioned
with a new patch, resulting in something like:
#if defined _LIBC
# include <gnu/option-groups.h>
#endif
#if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS)
# if _LIBC
# if __OPTION_EGLIBC_LOCALE_CODE
# define HANDLE_MULTIBYTE 1
# endif
# else
# define HANDLE_MULTIBYTE 1
# endif
#endif
Incidentally, I tried a core-image-minimal build with unconditioned
HAVE_MBSTATE_T and encountered no problems, just like you did originally.
This would imply poky-tiny problem is a probably a different problem.
(The suggested patch in fnmatch.c could possibly fix it as well)
One last unrelated thing: I believe in the patch you missed one ".out"
extension,
I think it should be:
...
++ $(objpfx)tst-pcre-mem.out $(objpfx)tst-boost-mem.out
...
instead of
...
++ $(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem.out
...
More information about the Openembedded-core
mailing list