From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: [Qemu-devel] [PATCH] configure: Don't implicitly hardcode list of KVM architectures
Date: Wed, 18 Jul 2012 12:10:49 +0100 [thread overview]
Message-ID: <1342609849-12618-1-git-send-email-peter.maydell@linaro.org> (raw)
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 <peter.maydell@linaro.org>
---
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
--
1.7.5.4
next reply other threads:[~2012-07-18 11:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 11:10 Peter Maydell [this message]
2012-08-02 15:41 ` [Qemu-devel] [PATCH] configure: Don't implicitly hardcode list of KVM architectures Peter Maydell
2012-08-02 15:46 ` Andreas Färber
2012-08-02 15:53 ` Alexander Graf
2012-08-02 20:31 ` Marcelo Tosatti
2012-08-02 16:01 ` Andreas Färber
2012-08-02 16:22 ` Peter Maydell
2012-08-02 16:29 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342609849-12618-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).