From patchwork Fri Aug 3 12:51:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 10482 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 082E123F61 for ; Fri, 3 Aug 2012 12:51:36 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id BCC66A1878B for ; Fri, 3 Aug 2012 12:51:35 +0000 (UTC) Received: by ghbz12 with SMTP id z12so791563ghb.11 for ; Fri, 03 Aug 2012 05:51:35 -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=iJmvr1h3p8DdOraBB/1XO1j5LMvyqbPSjsQybHMDFFY=; b=mQE3bWLUW5oBpyO29KENcAWGQHumAwZX4Iay97sQKTc4vGjnp169Hk73hrvU9fG0TR KXPBbbaPKbZ1qM4ExAfzppv5J2jUQl4GmxEhs4J2AKQjksYpRQHzt0PIXToz14wB4MDP Ez+SZUJzlU2KWpp2gwlr3lvpKEKweZWTVxrsJwH8vh6A0TJhZUL0869l5Su9w72UxlAS Kjynl6DqikqBirjH5IcCOxsHOQ95g668j8AU3trIh8gxwJd+w5yy/r6xJ8RTF1IhJ5aD H62o8dGPYdDsBWqO1UhKU+SqVFGxgPdI3jcUInY5PodSWX2N50ggMLCW0CR4NLKJ/Utk e3Cw== Received: by 10.50.160.168 with SMTP id xl8mr3252837igb.25.1343998294771; Fri, 03 Aug 2012 05:51:34 -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.50.87.40 with SMTP id u8csp311949igz; Fri, 3 Aug 2012 05:51:33 -0700 (PDT) Received: by 10.14.177.3 with SMTP id c3mr1975423eem.30.1343998292922; Fri, 03 Aug 2012 05:51:32 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id l44si4185316eep.91.2012.08.03.05.51.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 03 Aug 2012 05:51:32 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1SxHLh-0003Li-5Y; Fri, 03 Aug 2012 13:51:25 +0100 From: Peter Maydell To: kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Avi Kivity , Marcelo Tosatti , Alexander Graf Subject: [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures Date: Fri, 3 Aug 2012 13:51:25 +0100 Message-Id: <1343998285-12848-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQmupz/pfGoOKpNIziPtLfzpQxpDMoJmgDFYfHzHILGKB1rFEShIZ5i+ubZhpkdZeKuVMmJJ 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 --- v1->v2 changes: conform to same indent rules as surrounding code configure | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 9f071b7..eafb81f 100755 --- a/configure +++ b/configure @@ -3485,15 +3485,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