summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-17 09:51:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-17 10:01:30 +0100
commit3ad8107fa0244b8d0f03400bcd82349f97f347f4 (patch)
tree42b4396a7540116f659491a954b8a71e08a448a3 /meta
parent7324d7deb18b81943100bc35301b0c4aa22dc404 (diff)
downloadopenembedded-core-3ad8107fa0244b8d0f03400bcd82349f97f347f4.tar.gz
openembedded-core-3ad8107fa0244b8d0f03400bcd82349f97f347f4.tar.bz2
openembedded-core-3ad8107fa0244b8d0f03400bcd82349f97f347f4.zip
qemu-targets.inc: Update to handle mingw/darwin
For non-linux targets, don't return linux-user qemu targets. This change also improves readability of the functions through better variable names. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu-targets.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc
index 9f009bf888..5c3565544e 100644
--- a/meta/recipes-devtools/qemu/qemu-targets.inc
+++ b/meta/recipes-devtools/qemu/qemu-targets.inc
@@ -5,14 +5,18 @@
def get_qemu_target_list(d):
import bb
archs = d.getVar('QEMU_TARGETS', True).split()
- targets = ""
+ tos = d.getVar('HOST_OS', True)
+ softmmuonly = ""
for arch in ['mips64', 'mips64el', 'ppcemb']:
if arch in archs:
- targets += arch + "-softmmu,"
+ softmmuonly += arch + "-softmmu,"
archs.remove(arch)
+ linuxuseronly = ""
for arch in ['armeb', 'alpha', 'ppc64abi32', 'sparc32plus']:
if arch in archs:
- targets += arch + "-linux-user,"
+ linuxuseronly += arch + "-linux-user,"
archs.remove(arch)
- return targets + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+ if 'linux' not in tos:
+ return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+ return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')