summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-07-16 18:34:15 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-16 17:28:57 -0500
commit6acff7da2b1a22789f23771c411586e4620049df (patch)
tree73f740092dac43724bcfb5828e1ca6343d004c0d /configure
parente73aae6715ffb30d89bd300effbf5e3472ec38a6 (diff)
simplify TARGET_BASE_ARCH generation
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure33
1 files changed, 16 insertions, 17 deletions
diff --git a/configure b/configure
index e3ddfbc3b..c3b2cff07 100755
--- a/configure
+++ b/configure
@@ -1892,14 +1892,14 @@ echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
gdb_xml_files=""
TARGET_ARCH="$target_arch2"
+TARGET_BASE_ARCH=""
case "$target_arch2" in
i386)
target_phys_bits=32
;;
x86_64)
- echo "TARGET_BASE_ARCH=i386" >> $config_mak
- echo "#define TARGET_I386 1" >> $config_h
+ TARGET_BASE_ARCH=i386
target_phys_bits=64
;;
alpha)
@@ -1937,16 +1937,14 @@ case "$target_arch2" in
mipsn32|mipsn32el)
TARGET_ARCH=mipsn32
echo "TARGET_ARCH2=$target_arch2" >> $config_mak
- echo "TARGET_BASE_ARCH=mips" >> $config_mak
- echo "#define TARGET_MIPS 1" >> $config_h
+ TARGET_BASE_ARCH=mips
echo "#define TARGET_ABI_MIPSN32 1" >> $config_h
target_phys_bits=64
;;
mips64|mips64el)
TARGET_ARCH=mips64
echo "TARGET_ARCH2=$target_arch2" >> $config_mak
- echo "TARGET_BASE_ARCH=mips" >> $config_mak
- echo "#define TARGET_MIPS 1" >> $config_h
+ TARGET_BASE_ARCH=mips
echo "#define TARGET_ABI_MIPSN64 1" >> $config_h
target_phys_bits=64
;;
@@ -1955,25 +1953,22 @@ case "$target_arch2" in
target_phys_bits=32
;;
ppcemb)
- echo "TARGET_BASE_ARCH=ppc" >> $config_mak
+ TARGET_BASE_ARCH=ppc
echo "TARGET_ABI_DIR=ppc" >> $config_mak
- echo "#define TARGET_PPC 1" >> $config_h
gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
target_phys_bits=64
;;
ppc64)
- echo "TARGET_BASE_ARCH=ppc" >> $config_mak
+ TARGET_BASE_ARCH=ppc
echo "TARGET_ABI_DIR=ppc" >> $config_mak
- echo "#define TARGET_PPC 1" >> $config_h
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
target_phys_bits=64
;;
ppc64abi32)
TARGET_ARCH=ppc64
- echo "TARGET_BASE_ARCH=ppc" >> $config_mak
+ TARGET_BASE_ARCH=ppc
echo "TARGET_ABI_DIR=ppc" >> $config_mak
echo "TARGET_ARCH2=ppc64abi32" >> $config_mak
- echo "#define TARGET_PPC 1" >> $config_h
echo "#define TARGET_ABI32 1" >> $config_h
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
target_phys_bits=64
@@ -1989,17 +1984,15 @@ case "$target_arch2" in
target_phys_bits=64
;;
sparc64)
- echo "TARGET_BASE_ARCH=sparc" >> $config_mak
- echo "#define TARGET_SPARC 1" >> $config_h
+ TARGET_BASE_ARCH=sparc
elfload32="yes"
target_phys_bits=64
;;
sparc32plus)
TARGET_ARCH=sparc64
- echo "TARGET_BASE_ARCH=sparc" >> $config_mak
+ TARGET_BASE_ARCH=sparc
echo "TARGET_ABI_DIR=sparc" >> $config_mak
echo "TARGET_ARCH2=$target_arch2" >> $config_mak
- echo "#define TARGET_SPARC 1" >> $config_h
echo "#define TARGET_ABI32 1" >> $config_h
target_phys_bits=64
;;
@@ -2012,7 +2005,13 @@ echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak
echo "#define TARGET_ARCH \"$TARGET_ARCH\"" >> $config_h
target_arch_name=`echo $TARGET_ARCH | tr '[:lower:]' '[:upper:]'`
echo "#define TARGET_$target_arch_name 1" >> $config_h
-
+if [ "$TARGET_BASE_ARCH" = "" ]; then
+ TARGET_BASE_ARCH=$TARGET_ARCH
+else
+ target_base_arch_name=`echo $TARGET_BASE_ARCH | tr '[:lower:]' '[:upper:]'`
+ echo "#define TARGET_$target_base_arch_name 1" >> $config_h
+fi
+echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_mak
if [ $target_phys_bits -lt $hostlongbits ] ; then
target_phys_bits=$hostlongbits
fi