Commit e73aae6715ffb30d89bd300effbf5e3472ec38a6

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent afc29f82

generate TARGET_<arch name> for config.h

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 3 additions and 17 deletions
configure
@@ -1892,43 +1892,37 @@ echo &quot;#define CONFIG_QEMU_PREFIX \&quot;$interp_prefix1\&quot;&quot; &gt;&gt; $config_h @@ -1892,43 +1892,37 @@ echo &quot;#define CONFIG_QEMU_PREFIX \&quot;$interp_prefix1\&quot;&quot; &gt;&gt; $config_h
1892 gdb_xml_files="" 1892 gdb_xml_files=""
1893 1893
1894 TARGET_ARCH="$target_arch2" 1894 TARGET_ARCH="$target_arch2"
  1895 +
1895 case "$target_arch2" in 1896 case "$target_arch2" in
1896 i386) 1897 i386)
1897 - echo "#define TARGET_I386 1" >> $config_h  
1898 target_phys_bits=32 1898 target_phys_bits=32
1899 ;; 1899 ;;
1900 x86_64) 1900 x86_64)
1901 echo "TARGET_BASE_ARCH=i386" >> $config_mak 1901 echo "TARGET_BASE_ARCH=i386" >> $config_mak
1902 echo "#define TARGET_I386 1" >> $config_h 1902 echo "#define TARGET_I386 1" >> $config_h
1903 - echo "#define TARGET_X86_64 1" >> $config_h  
1904 target_phys_bits=64 1903 target_phys_bits=64
1905 ;; 1904 ;;
1906 alpha) 1905 alpha)
1907 - echo "#define TARGET_ALPHA 1" >> $config_h  
1908 target_phys_bits=64 1906 target_phys_bits=64
1909 ;; 1907 ;;
1910 arm|armeb) 1908 arm|armeb)
1911 TARGET_ARCH=arm 1909 TARGET_ARCH=arm
1912 echo "TARGET_ARCH2=$target_arch2" >> $config_mak 1910 echo "TARGET_ARCH2=$target_arch2" >> $config_mak
1913 - echo "#define TARGET_ARM 1" >> $config_h  
1914 bflt="yes" 1911 bflt="yes"
1915 target_nptl="yes" 1912 target_nptl="yes"
1916 gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" 1913 gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
1917 target_phys_bits=32 1914 target_phys_bits=32
1918 ;; 1915 ;;
1919 cris) 1916 cris)
1920 - echo "#define TARGET_CRIS 1" >> $config_h  
1921 target_nptl="yes" 1917 target_nptl="yes"
1922 target_phys_bits=32 1918 target_phys_bits=32
1923 ;; 1919 ;;
1924 m68k) 1920 m68k)
1925 - echo "#define TARGET_M68K 1" >> $config_h  
1926 bflt="yes" 1921 bflt="yes"
1927 gdb_xml_files="cf-core.xml cf-fp.xml" 1922 gdb_xml_files="cf-core.xml cf-fp.xml"
1928 target_phys_bits=32 1923 target_phys_bits=32
1929 ;; 1924 ;;
1930 microblaze) 1925 microblaze)
1931 - echo "#define TARGET_MICROBLAZE 1" >> $config_h  
1932 bflt="yes" 1926 bflt="yes"
1933 target_nptl="yes" 1927 target_nptl="yes"
1934 target_phys_bits=32 1928 target_phys_bits=32
@@ -1936,7 +1930,6 @@ case &quot;$target_arch2&quot; in @@ -1936,7 +1930,6 @@ case &quot;$target_arch2&quot; in
1936 mips|mipsel) 1930 mips|mipsel)
1937 TARGET_ARCH=mips 1931 TARGET_ARCH=mips
1938 echo "TARGET_ARCH2=$target_arch2" >> $config_mak 1932 echo "TARGET_ARCH2=$target_arch2" >> $config_mak
1939 - echo "#define TARGET_MIPS 1" >> $config_h  
1940 echo "#define TARGET_ABI_MIPSO32 1" >> $config_h 1933 echo "#define TARGET_ABI_MIPSO32 1" >> $config_h
1941 target_nptl="yes" 1934 target_nptl="yes"
1942 target_phys_bits=64 1935 target_phys_bits=64
@@ -1954,12 +1947,10 @@ case &quot;$target_arch2&quot; in @@ -1954,12 +1947,10 @@ case &quot;$target_arch2&quot; in
1954 echo "TARGET_ARCH2=$target_arch2" >> $config_mak 1947 echo "TARGET_ARCH2=$target_arch2" >> $config_mak
1955 echo "TARGET_BASE_ARCH=mips" >> $config_mak 1948 echo "TARGET_BASE_ARCH=mips" >> $config_mak
1956 echo "#define TARGET_MIPS 1" >> $config_h 1949 echo "#define TARGET_MIPS 1" >> $config_h
1957 - echo "#define TARGET_MIPS64 1" >> $config_h  
1958 echo "#define TARGET_ABI_MIPSN64 1" >> $config_h 1950 echo "#define TARGET_ABI_MIPSN64 1" >> $config_h
1959 target_phys_bits=64 1951 target_phys_bits=64
1960 ;; 1952 ;;
1961 ppc) 1953 ppc)
1962 - echo "#define TARGET_PPC 1" >> $config_h  
1963 gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" 1954 gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
1964 target_phys_bits=32 1955 target_phys_bits=32
1965 ;; 1956 ;;
@@ -1967,7 +1958,6 @@ case &quot;$target_arch2&quot; in @@ -1967,7 +1958,6 @@ case &quot;$target_arch2&quot; in
1967 echo "TARGET_BASE_ARCH=ppc" >> $config_mak 1958 echo "TARGET_BASE_ARCH=ppc" >> $config_mak
1968 echo "TARGET_ABI_DIR=ppc" >> $config_mak 1959 echo "TARGET_ABI_DIR=ppc" >> $config_mak
1969 echo "#define TARGET_PPC 1" >> $config_h 1960 echo "#define TARGET_PPC 1" >> $config_h
1970 - echo "#define TARGET_PPCEMB 1" >> $config_h  
1971 gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" 1961 gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
1972 target_phys_bits=64 1962 target_phys_bits=64
1973 ;; 1963 ;;
@@ -1975,7 +1965,6 @@ case &quot;$target_arch2&quot; in @@ -1975,7 +1965,6 @@ case &quot;$target_arch2&quot; in
1975 echo "TARGET_BASE_ARCH=ppc" >> $config_mak 1965 echo "TARGET_BASE_ARCH=ppc" >> $config_mak
1976 echo "TARGET_ABI_DIR=ppc" >> $config_mak 1966 echo "TARGET_ABI_DIR=ppc" >> $config_mak
1977 echo "#define TARGET_PPC 1" >> $config_h 1967 echo "#define TARGET_PPC 1" >> $config_h
1978 - echo "#define TARGET_PPC64 1" >> $config_h  
1979 gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" 1968 gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
1980 target_phys_bits=64 1969 target_phys_bits=64
1981 ;; 1970 ;;
@@ -1985,7 +1974,6 @@ case &quot;$target_arch2&quot; in @@ -1985,7 +1974,6 @@ case &quot;$target_arch2&quot; in
1985 echo "TARGET_ABI_DIR=ppc" >> $config_mak 1974 echo "TARGET_ABI_DIR=ppc" >> $config_mak
1986 echo "TARGET_ARCH2=ppc64abi32" >> $config_mak 1975 echo "TARGET_ARCH2=ppc64abi32" >> $config_mak
1987 echo "#define TARGET_PPC 1" >> $config_h 1976 echo "#define TARGET_PPC 1" >> $config_h
1988 - echo "#define TARGET_PPC64 1" >> $config_h  
1989 echo "#define TARGET_ABI32 1" >> $config_h 1977 echo "#define TARGET_ABI32 1" >> $config_h
1990 gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" 1978 gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
1991 target_phys_bits=64 1979 target_phys_bits=64
@@ -1993,19 +1981,16 @@ case &quot;$target_arch2&quot; in @@ -1993,19 +1981,16 @@ case &quot;$target_arch2&quot; in
1993 sh4|sh4eb) 1981 sh4|sh4eb)
1994 TARGET_ARCH=sh4 1982 TARGET_ARCH=sh4
1995 echo "TARGET_ARCH2=$target_arch2" >> $config_mak 1983 echo "TARGET_ARCH2=$target_arch2" >> $config_mak
1996 - echo "#define TARGET_SH4 1" >> $config_h  
1997 bflt="yes" 1984 bflt="yes"
1998 target_nptl="yes" 1985 target_nptl="yes"
1999 target_phys_bits=32 1986 target_phys_bits=32
2000 ;; 1987 ;;
2001 sparc) 1988 sparc)
2002 - echo "#define TARGET_SPARC 1" >> $config_h  
2003 target_phys_bits=64 1989 target_phys_bits=64
2004 ;; 1990 ;;
2005 sparc64) 1991 sparc64)
2006 echo "TARGET_BASE_ARCH=sparc" >> $config_mak 1992 echo "TARGET_BASE_ARCH=sparc" >> $config_mak
2007 echo "#define TARGET_SPARC 1" >> $config_h 1993 echo "#define TARGET_SPARC 1" >> $config_h
2008 - echo "#define TARGET_SPARC64 1" >> $config_h  
2009 elfload32="yes" 1994 elfload32="yes"
2010 target_phys_bits=64 1995 target_phys_bits=64
2011 ;; 1996 ;;
@@ -2015,7 +2000,6 @@ case &quot;$target_arch2&quot; in @@ -2015,7 +2000,6 @@ case &quot;$target_arch2&quot; in
2015 echo "TARGET_ABI_DIR=sparc" >> $config_mak 2000 echo "TARGET_ABI_DIR=sparc" >> $config_mak
2016 echo "TARGET_ARCH2=$target_arch2" >> $config_mak 2001 echo "TARGET_ARCH2=$target_arch2" >> $config_mak
2017 echo "#define TARGET_SPARC 1" >> $config_h 2002 echo "#define TARGET_SPARC 1" >> $config_h
2018 - echo "#define TARGET_SPARC64 1" >> $config_h  
2019 echo "#define TARGET_ABI32 1" >> $config_h 2003 echo "#define TARGET_ABI32 1" >> $config_h
2020 target_phys_bits=64 2004 target_phys_bits=64
2021 ;; 2005 ;;
@@ -2026,6 +2010,8 @@ case &quot;$target_arch2&quot; in @@ -2026,6 +2010,8 @@ case &quot;$target_arch2&quot; in
2026 esac 2010 esac
2027 echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak 2011 echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak
2028 echo "#define TARGET_ARCH \"$TARGET_ARCH\"" >> $config_h 2012 echo "#define TARGET_ARCH \"$TARGET_ARCH\"" >> $config_h
  2013 +target_arch_name=`echo $TARGET_ARCH | tr '[:lower:]' '[:upper:]'`
  2014 +echo "#define TARGET_$target_arch_name 1" >> $config_h
2029 2015
2030 if [ $target_phys_bits -lt $hostlongbits ] ; then 2016 if [ $target_phys_bits -lt $hostlongbits ] ; then
2031 target_phys_bits=$hostlongbits 2017 target_phys_bits=$hostlongbits