qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 6acff7d] simplify TARGET_BASE_ARCH generation


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 6acff7d] simplify TARGET_BASE_ARCH generation
Date: Thu, 16 Jul 2009 23:13:00 -0000

From: Juan Quintela <address@hidden>

Signed-off-by: Juan Quintela <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/Makefile.target b/Makefile.target
index 6883c44..7e69a64 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -1,10 +1,6 @@
 include config.mak
 include $(SRC_PATH)/rules.mak
 
-ifndef TARGET_BASE_ARCH
-TARGET_BASE_ARCH:=$(TARGET_ARCH)
-endif
-
 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
 CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
diff --git a/configure b/configure
index e3ddfbc..c3b2cff 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]