generate TARGET_<arch name> for config.h

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Juan Quintela 2009-07-16 18:34:14 +02:00 committed by Anthony Liguori
parent afc29f8259
commit e73aae6715
1 changed files with 3 additions and 17 deletions

20
configure vendored
View File

@ -1892,43 +1892,37 @@ echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
gdb_xml_files="" gdb_xml_files=""
TARGET_ARCH="$target_arch2" TARGET_ARCH="$target_arch2"
case "$target_arch2" in case "$target_arch2" in
i386) i386)
echo "#define TARGET_I386 1" >> $config_h
target_phys_bits=32 target_phys_bits=32
;; ;;
x86_64) x86_64)
echo "TARGET_BASE_ARCH=i386" >> $config_mak echo "TARGET_BASE_ARCH=i386" >> $config_mak
echo "#define TARGET_I386 1" >> $config_h echo "#define TARGET_I386 1" >> $config_h
echo "#define TARGET_X86_64 1" >> $config_h
target_phys_bits=64 target_phys_bits=64
;; ;;
alpha) alpha)
echo "#define TARGET_ALPHA 1" >> $config_h
target_phys_bits=64 target_phys_bits=64
;; ;;
arm|armeb) arm|armeb)
TARGET_ARCH=arm TARGET_ARCH=arm
echo "TARGET_ARCH2=$target_arch2" >> $config_mak echo "TARGET_ARCH2=$target_arch2" >> $config_mak
echo "#define TARGET_ARM 1" >> $config_h
bflt="yes" bflt="yes"
target_nptl="yes" target_nptl="yes"
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
target_phys_bits=32 target_phys_bits=32
;; ;;
cris) cris)
echo "#define TARGET_CRIS 1" >> $config_h
target_nptl="yes" target_nptl="yes"
target_phys_bits=32 target_phys_bits=32
;; ;;
m68k) m68k)
echo "#define TARGET_M68K 1" >> $config_h
bflt="yes" bflt="yes"
gdb_xml_files="cf-core.xml cf-fp.xml" gdb_xml_files="cf-core.xml cf-fp.xml"
target_phys_bits=32 target_phys_bits=32
;; ;;
microblaze) microblaze)
echo "#define TARGET_MICROBLAZE 1" >> $config_h
bflt="yes" bflt="yes"
target_nptl="yes" target_nptl="yes"
target_phys_bits=32 target_phys_bits=32
@ -1936,7 +1930,6 @@ case "$target_arch2" in
mips|mipsel) mips|mipsel)
TARGET_ARCH=mips TARGET_ARCH=mips
echo "TARGET_ARCH2=$target_arch2" >> $config_mak echo "TARGET_ARCH2=$target_arch2" >> $config_mak
echo "#define TARGET_MIPS 1" >> $config_h
echo "#define TARGET_ABI_MIPSO32 1" >> $config_h echo "#define TARGET_ABI_MIPSO32 1" >> $config_h
target_nptl="yes" target_nptl="yes"
target_phys_bits=64 target_phys_bits=64
@ -1954,12 +1947,10 @@ case "$target_arch2" in
echo "TARGET_ARCH2=$target_arch2" >> $config_mak echo "TARGET_ARCH2=$target_arch2" >> $config_mak
echo "TARGET_BASE_ARCH=mips" >> $config_mak echo "TARGET_BASE_ARCH=mips" >> $config_mak
echo "#define TARGET_MIPS 1" >> $config_h echo "#define TARGET_MIPS 1" >> $config_h
echo "#define TARGET_MIPS64 1" >> $config_h
echo "#define TARGET_ABI_MIPSN64 1" >> $config_h echo "#define TARGET_ABI_MIPSN64 1" >> $config_h
target_phys_bits=64 target_phys_bits=64
;; ;;
ppc) ppc)
echo "#define TARGET_PPC 1" >> $config_h
gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
target_phys_bits=32 target_phys_bits=32
;; ;;
@ -1967,7 +1958,6 @@ case "$target_arch2" in
echo "TARGET_BASE_ARCH=ppc" >> $config_mak echo "TARGET_BASE_ARCH=ppc" >> $config_mak
echo "TARGET_ABI_DIR=ppc" >> $config_mak echo "TARGET_ABI_DIR=ppc" >> $config_mak
echo "#define TARGET_PPC 1" >> $config_h echo "#define TARGET_PPC 1" >> $config_h
echo "#define TARGET_PPCEMB 1" >> $config_h
gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
target_phys_bits=64 target_phys_bits=64
;; ;;
@ -1975,7 +1965,6 @@ case "$target_arch2" in
echo "TARGET_BASE_ARCH=ppc" >> $config_mak echo "TARGET_BASE_ARCH=ppc" >> $config_mak
echo "TARGET_ABI_DIR=ppc" >> $config_mak echo "TARGET_ABI_DIR=ppc" >> $config_mak
echo "#define TARGET_PPC 1" >> $config_h echo "#define TARGET_PPC 1" >> $config_h
echo "#define TARGET_PPC64 1" >> $config_h
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
target_phys_bits=64 target_phys_bits=64
;; ;;
@ -1985,7 +1974,6 @@ case "$target_arch2" in
echo "TARGET_ABI_DIR=ppc" >> $config_mak echo "TARGET_ABI_DIR=ppc" >> $config_mak
echo "TARGET_ARCH2=ppc64abi32" >> $config_mak echo "TARGET_ARCH2=ppc64abi32" >> $config_mak
echo "#define TARGET_PPC 1" >> $config_h echo "#define TARGET_PPC 1" >> $config_h
echo "#define TARGET_PPC64 1" >> $config_h
echo "#define TARGET_ABI32 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" gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
target_phys_bits=64 target_phys_bits=64
@ -1993,19 +1981,16 @@ case "$target_arch2" in
sh4|sh4eb) sh4|sh4eb)
TARGET_ARCH=sh4 TARGET_ARCH=sh4
echo "TARGET_ARCH2=$target_arch2" >> $config_mak echo "TARGET_ARCH2=$target_arch2" >> $config_mak
echo "#define TARGET_SH4 1" >> $config_h
bflt="yes" bflt="yes"
target_nptl="yes" target_nptl="yes"
target_phys_bits=32 target_phys_bits=32
;; ;;
sparc) sparc)
echo "#define TARGET_SPARC 1" >> $config_h
target_phys_bits=64 target_phys_bits=64
;; ;;
sparc64) sparc64)
echo "TARGET_BASE_ARCH=sparc" >> $config_mak echo "TARGET_BASE_ARCH=sparc" >> $config_mak
echo "#define TARGET_SPARC 1" >> $config_h echo "#define TARGET_SPARC 1" >> $config_h
echo "#define TARGET_SPARC64 1" >> $config_h
elfload32="yes" elfload32="yes"
target_phys_bits=64 target_phys_bits=64
;; ;;
@ -2015,7 +2000,6 @@ case "$target_arch2" in
echo "TARGET_ABI_DIR=sparc" >> $config_mak echo "TARGET_ABI_DIR=sparc" >> $config_mak
echo "TARGET_ARCH2=$target_arch2" >> $config_mak echo "TARGET_ARCH2=$target_arch2" >> $config_mak
echo "#define TARGET_SPARC 1" >> $config_h echo "#define TARGET_SPARC 1" >> $config_h
echo "#define TARGET_SPARC64 1" >> $config_h
echo "#define TARGET_ABI32 1" >> $config_h echo "#define TARGET_ABI32 1" >> $config_h
target_phys_bits=64 target_phys_bits=64
;; ;;
@ -2026,6 +2010,8 @@ case "$target_arch2" in
esac esac
echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak
echo "#define TARGET_ARCH \"$TARGET_ARCH\"" >> $config_h 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_phys_bits -lt $hostlongbits ] ; then if [ $target_phys_bits -lt $hostlongbits ] ; then
target_phys_bits=$hostlongbits target_phys_bits=$hostlongbits