From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 2FCA965E03 for ; Sun, 17 Aug 2014 08:51:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id s7H8p3j1018943 for ; Sun, 17 Aug 2014 09:51:03 +0100 Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5n3B2cHho90T for ; Sun, 17 Aug 2014 09:51:03 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id s7H8p1ws018940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Sun, 17 Aug 2014 09:51:02 +0100 Message-ID: <1408265461.24858.1.camel@ted> From: Richard Purdie To: openembedded-core Date: Sun, 17 Aug 2014 09:51:01 +0100 X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Subject: [PATCH] qemu-targets.inc: Update to handle mingw/darwin X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 08:51:04 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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 diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc index 9f009bf..5c35655 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(',')