From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2] uninative: rebuild uninative for gcc 4.8 and 4.9
Date: Tue, 8 Nov 2016 10:11:44 +0200 [thread overview]
Message-ID: <1478592704-10596-1-git-send-email-ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <CAJTo0LbZ=dQWK7XyUOz5My8iKje8DYgCMmkLPCTXeEicWoj9xg@mail.gmail.com>
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@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
next prev parent reply other threads:[~2016-11-08 8:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 7:10 [PATCH v2] uninative: rebuild uninative for gcc 4.8 and 4.9 Ed Bartosh
2016-10-31 20:11 ` Burton, Ross
2016-11-08 8:11 ` Ed Bartosh [this message]
2016-12-05 10:56 ` Burton, Ross
2016-12-13 17:05 ` [PATCH] populate_sdk_ext: get NATIVELSBSTRING variable Ed Bartosh
2016-12-13 19:44 ` Paul Eggleton
2016-12-13 23:55 ` [PATCH v3] uninative: rebuild uninative for gcc 4.8 and 4.9 Ed Bartosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478592704-10596-1-git-send-email-ed.bartosh@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox