From patchwork Wed Jul 18 11:10:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 10114 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0BD7123E56 for ; Wed, 18 Jul 2012 11:10:54 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id C5D84A18765 for ; Wed, 18 Jul 2012 11:10:53 +0000 (UTC) Received: by yhpp61 with SMTP id p61so1518922yhp.11 for ; Wed, 18 Jul 2012 04:10:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=kH92FuiWUwRtGf19DEGPaDwHVb2BKI4+3pObGJ61Y/c=; b=Zo8VaF/fFRmcEgwUjJvdYnFA9nzXNzB8N8lFEF/lhtheNG9TOkSBndOnEQH7nlIrrS 3eWdKvN25hD134EHleI8KbMVVS8DM3VaE5kLG+OiquZVATehupfe1e0imsT+fSPxfwNQ +LIgHF4Cr/uMQraNnFQYddbupGK1gMBGd5H+r+GtVwAHT4QrKjQlo+7NStKXHSBmPXSN qe9q/60KMjaUeEjGfafqJwKqVOrj9v6a+AIjecvor2Wq1R1p0TIpGq8pJ21b4Cvh4IwM cock+kZzsqbtMoN7qF3z0tfbgzU+mhdfEgWuJPNQveKuO/XDaQOspHy7fuD2bBqTNwKA JHiA== Received: by 10.50.46.232 with SMTP id y8mr1439371igm.57.1342609853073; Wed, 18 Jul 2012 04:10:53 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp30278ibb; Wed, 18 Jul 2012 04:10:51 -0700 (PDT) Received: by 10.180.88.102 with SMTP id bf6mr5666685wib.4.1342609851207; Wed, 18 Jul 2012 04:10:51 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id s2si37457079wiz.17.2012.07.18.04.10.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jul 2012 04:10:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1SrS9Z-0003Hx-LB; Wed, 18 Jul 2012 12:10:49 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH] configure: Don't implicitly hardcode list of KVM architectures Date: Wed, 18 Jul 2012 12:10:49 +0100 Message-Id: <1342609849-12618-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQnahNDqAZDZiLsbEW+KGgjdkrjMLWPxZKZGmldLMbKvKzSOUwCTKnpFcKYAvj+R2qJb5tYf The code creating the symlink from linux-headers/asm to the architecture specific linux-headers/asm-$arch directory was implicitly hardcoding a list of KVM supporting architectures. Add a default case for the common "Linux architecture name and QEMU CPU name match" case, so future architectures will only need to add code if they've managed to get mismatched names. Signed-off-by: Peter Maydell --- This means there's now only one place where configure has a list of KVM enabled targets (the check where we set CONFIG_KVM). I think we have to have one list, but we don't need to have more than one... NB: this patch means we'll now set up an asm/ link for s390 as well as s390x. That should be harmless (s390 can't be trying to include any headers from asm/ or it wouldn't build). configure | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 0a3896e..c8d2895 100755 --- a/configure +++ b/configure @@ -3482,15 +3482,23 @@ if test "$linux" = "yes" ; then mkdir -p linux-headers case "$cpu" in i386|x86_64) - symlink "$source_path/linux-headers/asm-x86" linux-headers/asm + linux_arch=x86 ;; ppcemb|ppc|ppc64) - symlink "$source_path/linux-headers/asm-powerpc" linux-headers/asm + linux_arch=powerpc ;; s390x) - symlink "$source_path/linux-headers/asm-s390" linux-headers/asm + linux_arch=s390 + ;; + *) + # For most CPUs the kernel architecture name and QEMU CPU name match. + linux_arch="$cpu" ;; esac + # For non-KVM architectures we will not have asm headers. + if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then + symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm + fi fi for target in $target_list; do