qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 08/13] configure already knows what TARGET_BASE_ARCH


From: quintela
Subject: [Qemu-devel] [PATCH 08/13] configure already knows what TARGET_BASE_ARCH we need, no need to put the logic in Makefile.target
Date: Wed, 1 Jul 2009 18:58:34 +0200

From: Juan Quintela <address@hidden>


Signed-off-by: Juan Quintela <address@hidden>
---
 Makefile.target |   22 ++--------------------
 configure       |    8 ++++++++
 2 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index c33f371..4622561 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -1,28 +1,10 @@
 include config.mak
 include $(SRC_PATH)/rules.mak

+ifndef TARGET_BASE_ARCH
 TARGET_BASE_ARCH:=$(TARGET_ARCH)
-ifeq ($(TARGET_ARCH), x86_64)
-TARGET_BASE_ARCH:=i386
-endif
-ifeq ($(TARGET_ARCH), mipsn32)
-TARGET_BASE_ARCH:=mips
-endif
-ifeq ($(TARGET_ARCH), mips64)
-TARGET_BASE_ARCH:=mips
-endif
-ifeq ($(TARGET_ARCH), ppc64)
-TARGET_BASE_ARCH:=ppc
-endif
-ifeq ($(TARGET_ARCH), ppc64h)
-TARGET_BASE_ARCH:=ppc
-endif
-ifeq ($(TARGET_ARCH), ppcemb)
-TARGET_BASE_ARCH:=ppc
-endif
-ifeq ($(TARGET_ARCH), sparc64)
-TARGET_BASE_ARCH:=sparc
 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 eb9d73a..a9ce35f 100755
--- a/configure
+++ b/configure
@@ -2000,6 +2000,7 @@ case "$target_cpu" in
   ;;
   x86_64)
     echo "TARGET_ARCH=x86_64" >> $config_mak
+    echo "TARGET_BASE_ARCH=i386" >> $config_mak
     echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
     echo "#define TARGET_I386 1" >> $config_h
     echo "#define TARGET_X86_64 1" >> $config_h
@@ -2067,6 +2068,7 @@ case "$target_cpu" in
   ;;
   mipsn32|mipsn32el)
     echo "TARGET_ARCH=mipsn32" >> $config_mak
+    echo "TARGET_BASE_ARCH=mips" >> $config_mak
     echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h
     echo "#define TARGET_MIPS 1" >> $config_h
     echo "#define TARGET_ABI_MIPSN32 1" >> $config_h
@@ -2074,6 +2076,7 @@ case "$target_cpu" in
   ;;
   mips64|mips64el)
     echo "TARGET_ARCH=mips64" >> $config_mak
+    echo "TARGET_BASE_ARCH=mips" >> $config_mak
     echo "#define TARGET_ARCH \"mips64\"" >> $config_h
     echo "#define TARGET_MIPS 1" >> $config_h
     echo "#define TARGET_MIPS64 1" >> $config_h
@@ -2089,6 +2092,7 @@ case "$target_cpu" in
   ;;
   ppcemb)
     echo "TARGET_ARCH=ppcemb" >> $config_mak
+    echo "TARGET_BASE_ARCH=ppc" >> $config_mak
     echo "TARGET_ABI_DIR=ppc" >> $config_mak
     echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
     echo "#define TARGET_PPC 1" >> $config_h
@@ -2103,6 +2107,7 @@ case "$target_cpu" in
   ;;
   ppc64)
     echo "TARGET_ARCH=ppc64" >> $config_mak
+    echo "TARGET_BASE_ARCH=ppc" >> $config_mak
     echo "TARGET_ABI_DIR=ppc" >> $config_mak
     echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
     echo "#define TARGET_PPC 1" >> $config_h
@@ -2112,6 +2117,7 @@ case "$target_cpu" in
   ;;
   ppc64abi32)
     echo "TARGET_ARCH=ppc64" >> $config_mak
+    echo "TARGET_BASE_ARCH=ppc" >> $config_mak
     echo "TARGET_ABI_DIR=ppc" >> $config_mak
     echo "TARGET_ARCH2=ppc64abi32" >> $config_mak
     echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
@@ -2137,6 +2143,7 @@ case "$target_cpu" in
   ;;
   sparc64)
     echo "TARGET_ARCH=sparc64" >> $config_mak
+    echo "TARGET_BASE_ARCH=sparc" >> $config_mak
     echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
     echo "#define TARGET_SPARC 1" >> $config_h
     echo "#define TARGET_SPARC64 1" >> $config_h
@@ -2145,6 +2152,7 @@ case "$target_cpu" in
   ;;
   sparc32plus)
     echo "TARGET_ARCH=sparc64" >> $config_mak
+    echo "TARGET_BASE_ARCH=sparc" >> $config_mak
     echo "TARGET_ABI_DIR=sparc" >> $config_mak
     echo "TARGET_ARCH2=sparc32plus" >> $config_mak
     echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
-- 
1.6.2.2





reply via email to

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