qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 09/13] TARGET_ARCH2 is already known at configure ti


From: quintela
Subject: [Qemu-devel] [PATCH 09/13] TARGET_ARCH2 is already known at configure time and it is called target_cpu Remove re-construction in Makefile.target
Date: Wed, 1 Jul 2009 18:58:35 +0200

From: Juan Quintela <address@hidden>


Signed-off-by: Juan Quintela <address@hidden>
---
 Makefile.target |   33 ++++-----------------------------
 configure       |    9 +++++++--
 2 files changed, 11 insertions(+), 31 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 4622561..81d0c54 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -11,44 +11,19 @@ CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT 
$@ -MP -DNEED_CPU_H
 #CFLAGS+=-Werror
 LIBS=
 # user emulator name
-ifndef TARGET_ARCH2
-TARGET_ARCH2=$(TARGET_ARCH)
-endif
-ifeq ($(TARGET_ARCH),arm)
-  ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
-    TARGET_ARCH2=armeb
-  endif
-endif
-ifeq ($(TARGET_ARCH),sh4)
-  ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
-    TARGET_ARCH2=sh4eb
-  endif
-endif
-ifeq ($(TARGET_ARCH),mips)
-  ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
-    TARGET_ARCH2=mipsel
-  endif
-endif
-ifeq ($(TARGET_ARCH),mipsn32)
-  ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
-    TARGET_ARCH2=mipsn32el
-  endif
-endif
-ifeq ($(TARGET_ARCH),mips64)
-  ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
-    TARGET_ARCH2=mips64el
-  endif
+ifndef TARGET_CPU
+TARGET_CPU=$(TARGET_ARCH)
 endif

 ifdef CONFIG_USER_ONLY
 # user emulator name
-QEMU_PROG=qemu-$(TARGET_ARCH2)
+QEMU_PROG=qemu-$(TARGET_CPU)
 else
 # system emulator name
 ifeq ($(TARGET_ARCH), i386)
 QEMU_PROG=qemu$(EXESUF)
 else
-QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
+QEMU_PROG=qemu-system-$(TARGET_CPU)$(EXESUF)
 endif
 endif

diff --git a/configure b/configure
index a9ce35f..5b35b69 100755
--- a/configure
+++ b/configure
@@ -2029,6 +2029,7 @@ case "$target_cpu" in
   ;;
   arm|armeb)
     echo "TARGET_ARCH=arm" >> $config_mak
+    echo "TARGET_CPU=$target_cpu" >> $config_mak
     echo "#define TARGET_ARCH \"arm\"" >> $config_h
     echo "#define TARGET_ARM 1" >> $config_h
     bflt="yes"
@@ -2061,6 +2062,7 @@ case "$target_cpu" in
   ;;
  mips|mipsel)
     echo "TARGET_ARCH=mips" >> $config_mak
+    echo "TARGET_CPU=$target_cpu" >> $config_mak
     echo "#define TARGET_ARCH \"mips\"" >> $config_h
     echo "#define TARGET_MIPS 1" >> $config_h
     echo "#define TARGET_ABI_MIPSO32 1" >> $config_h
@@ -2068,6 +2070,7 @@ case "$target_cpu" in
   ;;
   mipsn32|mipsn32el)
     echo "TARGET_ARCH=mipsn32" >> $config_mak
+    echo "TARGET_CPU=$target_cpu" >> $config_mak
     echo "TARGET_BASE_ARCH=mips" >> $config_mak
     echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h
     echo "#define TARGET_MIPS 1" >> $config_h
@@ -2076,6 +2079,7 @@ case "$target_cpu" in
   ;;
   mips64|mips64el)
     echo "TARGET_ARCH=mips64" >> $config_mak
+    echo "TARGET_CPU=$target_cpu" >> $config_mak
     echo "TARGET_BASE_ARCH=mips" >> $config_mak
     echo "#define TARGET_ARCH \"mips64\"" >> $config_h
     echo "#define TARGET_MIPS 1" >> $config_h
@@ -2119,7 +2123,7 @@ case "$target_cpu" in
     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 "TARGET_CPU=ppc64abi32" >> $config_mak
     echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
     echo "#define TARGET_PPC 1" >> $config_h
     echo "#define TARGET_PPC64 1" >> $config_h
@@ -2129,6 +2133,7 @@ case "$target_cpu" in
   ;;
   sh4|sh4eb)
     echo "TARGET_ARCH=sh4" >> $config_mak
+    echo "TARGET_CPU=$target_cpu" >> $config_mak
     echo "#define TARGET_ARCH \"sh4\"" >> $config_h
     echo "#define TARGET_SH4 1" >> $config_h
     bflt="yes"
@@ -2154,7 +2159,7 @@ case "$target_cpu" in
     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 "TARGET_CPU=sparc32plus" >> $config_mak
     echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
     echo "#define TARGET_SPARC 1" >> $config_h
     echo "#define TARGET_SPARC64 1" >> $config_h
-- 
1.6.2.2





reply via email to

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