summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-06-17 08:57:56 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-06-17 08:57:57 -0500
commit38aea177d93556aada7c4c7aa530f0050715e293 (patch)
tree3bf862281674e5f828d87e566a4b1c60f952b4bd /configure
parentb7a3b1cde2127f70d9fc24b7c99fbbc3899afab5 (diff)
parent187f1bcb9ce8e3cd3f634dd5405f9e5ed02b38ce (diff)
downloadqemu-38aea177d93556aada7c4c7aa530f0050715e293.tar.gz
Merge remote-tracking branch 'pmaydell/configury.next' into staging
# By Paolo Bonzini (4) and others # Via Peter Maydell * pmaydell/configury.next: ppc: Remove CONFIG_FDT conditionals microblaze: Remove CONFIG_FDT conditionals arm: Remove CONFIG_FDT conditionals configure: Require libfdt for arm, ppc, microblaze softmmu targets configure: dtc: Probe for libfdt_env.h build: drop TARGET_TYPE main: use TARGET_ARCH only for the target-specific #define build: do not use TARGET_ARCH build: rename TARGET_ARCH2 to TARGET_NAME Add a stp file for usage from build directory Message-id: 1371221594-11556-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure60
1 files changed, 40 insertions, 20 deletions
diff --git a/configure b/configure
index 60b0811706..ad32f87b8e 100755
--- a/configure
+++ b/configure
@@ -2486,9 +2486,31 @@ fi
##########################################
# fdt probe
+# fdt support is mandatory for at least some target architectures,
+# so insist on it if we're building those system emulators.
+fdt_required=no
+for target in $target_list; do
+ case $target in
+ arm*-softmmu|ppc*-softmmu|microblaze*-softmmu)
+ fdt_required=yes
+ ;;
+ esac
+done
+
+if test "$fdt_required" = "yes"; then
+ if test "$fdt" = "no"; then
+ error_exit "fdt disabled but some requested targets require it." \
+ "You can turn off fdt only if you also disable all the system emulation" \
+ "targets which need it (by specifying a cut down --target-list)."
+ fi
+ fdt=yes
+fi
+
if test "$fdt" != "no" ; then
fdt_libs="-lfdt"
+ # explicitly check for libfdt_env.h as it is missing in some stable installs
cat > $TMPC << EOF
+#include <libfdt_env.h>
int main(void) { return 0; }
EOF
if compile_prog "" "$fdt_libs" ; then
@@ -4083,10 +4105,10 @@ fi
for target in $target_list; do
target_dir="$target"
config_target_mak=$target_dir/config-target.mak
-target_arch2=`echo $target | cut -d '-' -f 1`
+target_name=`echo $target | cut -d '-' -f 1`
target_bigendian="no"
-case "$target_arch2" in
+case "$target_name" in
armeb|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or32|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
target_bigendian=yes
;;
@@ -4096,17 +4118,17 @@ target_user_only="no"
target_linux_user="no"
target_bsd_user="no"
case "$target" in
- ${target_arch2}-softmmu)
+ ${target_name}-softmmu)
target_softmmu="yes"
;;
- ${target_arch2}-linux-user)
+ ${target_name}-linux-user)
if test "$linux" != "yes" ; then
error_exit "Target '$target' is only available on a Linux host"
fi
target_user_only="yes"
target_linux_user="yes"
;;
- ${target_arch2}-bsd-user)
+ ${target_name}-bsd-user)
if test "$bsd" != "yes" ; then
error_exit "Target '$target' is only available on a BSD host"
fi
@@ -4124,14 +4146,14 @@ echo "# Automatically generated by configure - do not modify" > $config_target_m
bflt="no"
target_nptl="no"
-interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
+interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_name/g"`
gdb_xml_files=""
-TARGET_ARCH="$target_arch2"
+TARGET_ARCH="$target_name"
TARGET_BASE_ARCH=""
TARGET_ABI_DIR=""
-case "$target_arch2" in
+case "$target_name" in
i386)
;;
x86_64)
@@ -4243,17 +4265,15 @@ upper() {
echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]'
}
-echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak
target_arch_name="`upper $TARGET_ARCH`"
echo "TARGET_$target_arch_name=y" >> $config_target_mak
-echo "TARGET_ARCH2=$target_arch2" >> $config_target_mak
-echo "TARGET_TYPE=TARGET_TYPE_`upper $target_arch2`" >> $config_target_mak
+echo "TARGET_NAME=$target_name" >> $config_target_mak
echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
if [ "$TARGET_ABI_DIR" = "" ]; then
TARGET_ABI_DIR=$TARGET_ARCH
fi
echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak
-case "$target_arch2" in
+case "$target_name" in
i386|x86_64)
if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_XEN=y" >> $config_target_mak
@@ -4264,17 +4284,17 @@ case "$target_arch2" in
;;
*)
esac
-case "$target_arch2" in
+case "$target_name" in
arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
# Make sure the target and host cpus are compatible
if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \
- \( "$target_arch2" = "$cpu" -o \
- \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \
- \( "$target_arch2" = "ppc64" -a "$cpu" = "ppc" \) -o \
- \( "$target_arch2" = "ppc" -a "$cpu" = "ppc64" \) -o \
- \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
- \( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \
- \( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then
+ \( "$target_name" = "$cpu" -o \
+ \( "$target_name" = "ppcemb" -a "$cpu" = "ppc" \) -o \
+ \( "$target_name" = "ppc64" -a "$cpu" = "ppc" \) -o \
+ \( "$target_name" = "ppc" -a "$cpu" = "ppc64" \) -o \
+ \( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
+ \( "$target_name" = "x86_64" -a "$cpu" = "i386" \) -o \
+ \( "$target_name" = "i386" -a "$cpu" = "x86_64" \) \) ; then
echo "CONFIG_KVM=y" >> $config_target_mak
if test "$vhost_net" = "yes" ; then
echo "CONFIG_VHOST_NET=y" >> $config_target_mak