[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/26] configure already knows what TARGET_BASE_ARCH
From: |
quintela |
Subject: |
[Qemu-devel] [PATCH 08/26] configure already knows what TARGET_BASE_ARCH we need, no need to put the logic in Makefile.target |
Date: |
Mon, 13 Jul 2009 17:53:47 +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 3a3e1db..9f55041 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 a55dbc5..02a5338 100755
--- a/configure
+++ b/configure
@@ -1996,6 +1996,7 @@ case "$target_arch2" 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
@@ -2064,6 +2065,7 @@ case "$target_arch2" 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
@@ -2071,6 +2073,7 @@ case "$target_arch2" 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
@@ -2086,6 +2089,7 @@ case "$target_arch2" 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
@@ -2100,6 +2104,7 @@ case "$target_arch2" 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
@@ -2109,6 +2114,7 @@ case "$target_arch2" 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
@@ -2134,6 +2140,7 @@ case "$target_arch2" 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
@@ -2142,6 +2149,7 @@ case "$target_arch2" 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.5
- [Qemu-devel] [PATCH 00/26] More Build System cleanups (v3), quintela, 2009/07/13
- [Qemu-devel] [PATCH 02/26] fix sparc not solaris build, quintela, 2009/07/13
- [Qemu-devel] [PATCH 03/26] Remove duplicated definition, quintela, 2009/07/13
- [Qemu-devel] [PATCH 04/26] use block-nested-y for files inside block/, quintela, 2009/07/13
- [Qemu-devel] [PATCH 01/26] fix XEN Build, quintela, 2009/07/13
- [Qemu-devel] [PATCH 07/26] already defined several lines before in block-obj-y, quintela, 2009/07/13
- [Qemu-devel] [PATCH 08/26] configure already knows what TARGET_BASE_ARCH we need, no need to put the logic in Makefile.target,
quintela <=
- [Qemu-devel] [PATCH 06/26] Remove unused Makefile variable, quintela, 2009/07/13
- [Qemu-devel] [PATCH 05/26] use nwfpe-obj-y for consistence, quintela, 2009/07/13
- [Qemu-devel] [PATCH 10/26] change ifdefs by obj-$(TARGET_BASE_ARCH), quintela, 2009/07/13
- [Qemu-devel] [PATCH 13/26] configure kqemu in a single place, quintela, 2009/07/13
- [Qemu-devel] [PATCH 09/26] TARGET_ARCH2 is already known at configure time., quintela, 2009/07/13
- [Qemu-devel] [PATCH 11/26] configure xen in a single place, quintela, 2009/07/13
- [Qemu-devel] [PATCH 14/26] BASE_LDFLAGS is not used anywhere else, quintela, 2009/07/13
- [Qemu-devel] [PATCH 15/26] TARGET_ARCH == TARGET_BASE_ARCH in m68k and arm, quintela, 2009/07/13
- [Qemu-devel] [PATCH 12/26] configure kvm in a single place, quintela, 2009/07/13
- [Qemu-devel] [PATCH 16/26] Refactor a single rule to generate all qemu-* executables, quintela, 2009/07/13