[OE-core] [PATCH 1/1] eglibc-use-option-groups.patch: Several fixups

Juro Bystricky jurobystricky at hotmail.com
Thu Nov 20 18:59:14 UTC 2014


Hello Peter, 
my concern is that if the file libc-symbols.h is patched like this:

#if defined(__OPTION_EGLIBC_LOCALE_CODE) && __OPTION_EGLIBC_LOCALE_CODE
# define HAVE_MBSTATE_T    1
# define HAVE_MBSRTOWCS    1
#endif

then it will be ALWAYS evaluated as:  

#if 0
# define HAVE_MBSTATE_T    1
# define HAVE_MBSRTOWCS    1
#endif

because

#if defined __OPTION_EGLIBC_LOCALE_CODE

will always evaluate as 0.

To test this hypothesis, I actually build core-image-minimal with
an  explicit #error:

#if defined(__OPTION_EGLIBC_LOCALE_CODE) && __OPTION_EGLIBC_LOCALE_CODE
# error "I was wrong in my assumptions!!!"
# define HAVE_MBSTATE_T    1
# define HAVE_MBSRTOWCS    1
#endif

The image built fine, (Though I did not build/ran the glibc testsuite yet, nor did I try 
to build tiny-poky). 

I believe the purpose of this patching is simply to unconditionally prevent 
suppport for mutibyte character handling if __OPTION_EGLIBC_LOCALE_CODE=0 
If this is indeed the case, then the files posix/fnmatch.c and (possibly posix/fnmatch_loop.c
may need revised patching. ).

Juro


> Date: Wed, 19 Nov 2014 14:09:33 -0600
> From: peter.seebach at windriver.com
> To: jurobystricky at hotmail.com
> CC: openembedded-core at lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 1/1] eglibc-use-option-groups.patch: Several fixups
> 
> On Wed, 19 Nov 2014 17:59:49 +0000
> Juro Bystricky <jurobystricky at hotmail.com> wrote:
> 
> > 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.
> 
> If it's not conditional, the build fails when the feature's not included,
> because one of the test programs attempts to use it. It may be that something
> else ought to be conditional to make that work. So it might be that your
> suggested change to fnmatch would fix poky-tiny as well.
> 
> And you're right about the .out.
> 
> -s
> -- 
> Listen, get this.  Nobody with a good compiler needs to be justified.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20141120/023ec46c/attachment-0002.html>


More information about the Openembedded-core mailing list