[yocto] [auh][PATCH 12/21] Add support for compiling against non-default C libraries
Alexander Kanavin
alexander.kanavin at linux.intel.com
Thu Dec 21 08:27:20 PST 2017
Particularly, musl is a notorious source of failures and so it's
very useful to do at least one build against it by default.
Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
---
README | 4 +++-
modules/utils/bitbake.py | 7 ++++++-
upgradehelper.py | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/README b/README
index 20b2e5d..fabde5c 100644
--- a/README
+++ b/README
@@ -65,7 +65,9 @@ clean_sstate=yes
clean_tmp=yes
# machines to test build with
-machines=qemux86 qemux86-64 qemuarm qemumips qemuppc
+# append _libc-name to test with alternative C library implementations
+# e.g. qemux86_musl
+machines=qemux86 qemux86_musl qemux86-64 qemuarm qemumips qemuppc
# optional features
buildhistory=no
diff --git a/modules/utils/bitbake.py b/modules/utils/bitbake.py
index 8b7c5ed..2ae3a1c 100644
--- a/modules/utils/bitbake.py
+++ b/modules/utils/bitbake.py
@@ -121,7 +121,12 @@ class Bitbake(object):
return self._cmd(recipe, "-c cleansstate")
def complete(self, recipe, machine):
- return self._cmd(recipe, env_var="MACHINE=" + machine)
+ if "_" in machine:
+ machine, libc = machine.split("_")
+ env = "MACHINE={} TCLIBC={}".format(machine, libc)
+ else:
+ env = "MACHINE={}".format(machine)
+ return self._cmd(recipe, env_var=env)
def dependency_graph(self, package_list):
return self._cmd(package_list, "-g")
diff --git a/upgradehelper.py b/upgradehelper.py
index 4623199..a33a3bf 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -171,7 +171,7 @@ class Updater(object):
self.git = Git(os.path.dirname(os.getenv('PATH', False).split(':')[0]))
self.poky_git = None
self.opts['machines'] = settings.get('machines',
- 'qemux86 qemux86-64 qemuarm qemumips qemuppc').split()
+ 'qemux86 qemux86-64 qemuarm qemumips qemuppc qemux86_musl').split()
self.opts['send_email'] = self.args.send_emails
self.opts['author'] = "Upgrade Helper <%s>" % \
--
2.15.1
More information about the yocto
mailing list