[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/6] simplify TARGET_BASE_ARCH generation
From: |
quintela |
Subject: |
[Qemu-devel] [PATCH 1/6] simplify TARGET_BASE_ARCH generation |
Date: |
Wed, 15 Jul 2009 17:26:29 +0200 |
From: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
Makefile.target | 4 ----
configure | 33 ++++++++++++++++-----------------
2 files changed, 16 insertions(+), 21 deletions(-)
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 695faae..9342e5c 100755
--- a/configure
+++ b/configure
@@ -1886,14 +1886,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)
@@ -1931,16 +1931,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
;;
@@ -1949,25 +1947,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
@@ -1983,17 +1978,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
;;
@@ -2006,7 +1999,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
--
1.6.2.5
- [Qemu-devel] [RFC PATCH 0/6] Generate config_h from config.mak, quintela, 2009/07/15
- [Qemu-devel] [PATCH 2/6] simplify TARGET_ARCH2 generation, quintela, 2009/07/15
- [Qemu-devel] [PATCH 3/6] simplify TARGET_ABI_DIR generation, quintela, 2009/07/15
- [Qemu-devel] [PATCH 4/6] rename s/config_mak/config_host_mak/ and s/config_h/config_host_h/, quintela, 2009/07/15
- [Qemu-devel] [PATCH 5/6] Refactor config_softfloat selection in another list, quintela, 2009/07/15
- [Qemu-devel] [PATCH 6/6] Generate $target_dir/config.h from $target_dir/config.mak, quintela, 2009/07/15
- [Qemu-devel] [PATCH 1/6] simplify TARGET_BASE_ARCH generation,
quintela <=