[OE-core] [PATCH v2] uninative: rebuild uninative for gcc 4.8 and 4.9

Burton, Ross ross.burton at intel.com
Mon Dec 5 10:56:31 UTC 2016


This fails on the AB when generating a eSDK, eg
http://errors.yoctoproject.org/Errors/Details/110635/

I suspect the cause is that the sstate is generated using the (eg)
universal-4.9 name, but populate_sdk_ext still uses just "universal" when
creating a mirror of the sstate archive.

Ross

On 8 November 2016 at 08:11, Ed Bartosh <ed.bartosh at linux.intel.com> wrote:

> Some c++ libraries fail to build if uninative is built
> with gcc 5.x and host gcc version is either 4.8 or 4.9.
>
> The issue should be solved by making separate uninative sstate
> directory structure sstate-cache/universal-<gcc version> for host gcc
> versions 4.8 and 4.9. This causes rebuilds of uninative if host gcc
> is either 4.8 or 4.9 and it doesn't match gcc version used to build
> uninative.
>
> [YOCTO #10441]
>
> Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
> ---
>  meta/classes/uninative.bbclass | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.
> bbclass
> index 89cec07..3862b31 100644
> --- a/meta/classes/uninative.bbclass
> +++ b/meta/classes/uninative.bbclass
> @@ -95,11 +95,25 @@ python uninative_event_enable() {
>      enable_uninative(d)
>  }
>
> +def gcc_version(d):
> +    compiler = d.getVar("BUILD_CC", True)
> +    retval, output = oe.utils.getstatusoutput("%s --version" % compiler)
> +    if retval:
> +        bb.fatal("Error running %s --version: %s" % (compiler, output))
> +
> +    import re
> +    match = re.match(".* (\d\.\d)\.\d.*", output.split('\n')[0])
> +    if not match:
> +        bb.fatal("Can't get compiler version from %s --version output" %
> compiler)
> +
> +    version = match.group(1)
> +    return "-%s" % version if version in ("4.8", "4.9") else ""
> +
>  def enable_uninative(d):
>      loader = d.getVar("UNINATIVE_LOADER", True)
>      if os.path.exists(loader):
>          bb.debug(2, "Enabling uninative")
> -        d.setVar("NATIVELSBSTRING", "universal")
> +        d.setVar("NATIVELSBSTRING", "universal%s" % gcc_version(d))
>          d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
>          d.prependVar("PATH", "${STAGING_DIR}-uninative/${
> BUILD_ARCH}-linux${bindir_native}:")
>
> --
> 2.1.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20161205/3af87aa0/attachment-0002.html>


More information about the Openembedded-core mailing list