[OE-core] [PATCH v2 1/1] siteinfo.bbclass: Port over oe.dev logic for site files

Khem Raj raj.khem at gmail.com
Wed Jul 27 17:49:12 UTC 2011


On (25/07/11 11:57), Enrico Scholz wrote:
> Tom Rini <tom_rini-nmGgyN9QBj3QT0dZR+AlfA at public.gmane.org> writes:
> 
> > +python () {
> > +    sitedata = set(siteinfo_data(d))
> > +    if "endian-little" in sitedata:
> > +        d.setVar("SITEINFO_ENDIANESS", "le")
> > +    elif "endian-big" in sitedata:
> > +        d.setVar("SITEINFO_ENDIANESS", "be")
> 
> Assigning SITEINFO_ENDIANESS in this way seems to break build of cross
> packages (binutils, gcc).  E.g. for xscale (--> armv5te), these packages
> will be build for armv5teb. This happens because tune-xscale.inc uses an
> (unsafe)
> 
> | BASE_PACKAGE_ARCH = "${@['armv5teb', 'armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
> 
> statement. As there seems that something wents wrong when setting
> SITEINFO_ENDIANESS in an anonymous python function, 'armv5teb' will be
> assumed.

since siteinfo determines endianness based on HOST_OS this will always
be wrong for cross packages to use endianness information since it will
give back the endianness of the host system but we want the endianness
of the target system. This particularly is a problem for builds where
host != target since we are trying to use this information to construct
PACKAGE_ARCH for the cross recipes which is target dependent.

So either we need to break this link in cross.bbclass and set
BASE_PACKAGE_ARCH and PACKAGE_ARCH appropriately there.

I hope the ongoing tune file overhaul addresses this issue.

> 
> Using a more safe construct like
> 
> | BASE_PACKAGE_ARCH = "${@{'le' : 'armv5te', 'be' : 'armv5teb'}[ \
> |                        bb.data.getVar('SITEINFO_ENDIANESS', d, 1)]}"
> 
> reveals that SITEINFO_ENDIANESS is undefined when expression is evaluated.
> 
> I am using bitbake master (5c8eeefc79455f058dda8f04cf4c12dc5418e00f).
> 
> 
> 
> Enrico
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
-Khem




More information about the Openembedded-core mailing list