From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxHLo-0002Su-E7 for qemu-devel@nongnu.org; Fri, 03 Aug 2012 08:51:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxHLn-0006Dt-Er for qemu-devel@nongnu.org; Fri, 03 Aug 2012 08:51:32 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:47901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxHLn-0006Dk-7P for qemu-devel@nongnu.org; Fri, 03 Aug 2012 08:51:31 -0400 From: Peter Maydell Date: Fri, 3 Aug 2012 13:51:25 +0100 Message-Id: <1343998285-12848-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: Alexander Graf , Avi Kivity , Marcelo Tosatti , =?UTF-8?q?Andreas=20F=C3=A4rber?= , patches@linaro.org 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 -- 1.7.9.5