Commit afc29f82591985e0a739f3eed04eeb65e0548ff6
Committed by
Anthony Liguori
1 parent
938b1edd
generate TARGET_ARCH 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
2 additions
and
18 deletions
configure
@@ -1894,26 +1894,22 @@ gdb_xml_files="" | @@ -1894,26 +1894,22 @@ gdb_xml_files="" | ||
1894 | TARGET_ARCH="$target_arch2" | 1894 | TARGET_ARCH="$target_arch2" |
1895 | case "$target_arch2" in | 1895 | case "$target_arch2" in |
1896 | i386) | 1896 | i386) |
1897 | - echo "#define TARGET_ARCH \"i386\"" >> $config_h | ||
1898 | echo "#define TARGET_I386 1" >> $config_h | 1897 | echo "#define TARGET_I386 1" >> $config_h |
1899 | target_phys_bits=32 | 1898 | target_phys_bits=32 |
1900 | ;; | 1899 | ;; |
1901 | x86_64) | 1900 | x86_64) |
1902 | echo "TARGET_BASE_ARCH=i386" >> $config_mak | 1901 | echo "TARGET_BASE_ARCH=i386" >> $config_mak |
1903 | - echo "#define TARGET_ARCH \"x86_64\"" >> $config_h | ||
1904 | echo "#define TARGET_I386 1" >> $config_h | 1902 | echo "#define TARGET_I386 1" >> $config_h |
1905 | echo "#define TARGET_X86_64 1" >> $config_h | 1903 | echo "#define TARGET_X86_64 1" >> $config_h |
1906 | target_phys_bits=64 | 1904 | target_phys_bits=64 |
1907 | ;; | 1905 | ;; |
1908 | alpha) | 1906 | alpha) |
1909 | - echo "#define TARGET_ARCH \"alpha\"" >> $config_h | ||
1910 | echo "#define TARGET_ALPHA 1" >> $config_h | 1907 | echo "#define TARGET_ALPHA 1" >> $config_h |
1911 | target_phys_bits=64 | 1908 | target_phys_bits=64 |
1912 | ;; | 1909 | ;; |
1913 | arm|armeb) | 1910 | arm|armeb) |
1914 | TARGET_ARCH=arm | 1911 | TARGET_ARCH=arm |
1915 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak | 1912 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak |
1916 | - echo "#define TARGET_ARCH \"arm\"" >> $config_h | ||
1917 | echo "#define TARGET_ARM 1" >> $config_h | 1913 | echo "#define TARGET_ARM 1" >> $config_h |
1918 | bflt="yes" | 1914 | bflt="yes" |
1919 | target_nptl="yes" | 1915 | target_nptl="yes" |
@@ -1921,20 +1917,17 @@ case "$target_arch2" in | @@ -1921,20 +1917,17 @@ case "$target_arch2" in | ||
1921 | target_phys_bits=32 | 1917 | target_phys_bits=32 |
1922 | ;; | 1918 | ;; |
1923 | cris) | 1919 | cris) |
1924 | - echo "#define TARGET_ARCH \"cris\"" >> $config_h | ||
1925 | echo "#define TARGET_CRIS 1" >> $config_h | 1920 | echo "#define TARGET_CRIS 1" >> $config_h |
1926 | target_nptl="yes" | 1921 | target_nptl="yes" |
1927 | target_phys_bits=32 | 1922 | target_phys_bits=32 |
1928 | ;; | 1923 | ;; |
1929 | m68k) | 1924 | m68k) |
1930 | - echo "#define TARGET_ARCH \"m68k\"" >> $config_h | ||
1931 | echo "#define TARGET_M68K 1" >> $config_h | 1925 | echo "#define TARGET_M68K 1" >> $config_h |
1932 | bflt="yes" | 1926 | bflt="yes" |
1933 | gdb_xml_files="cf-core.xml cf-fp.xml" | 1927 | gdb_xml_files="cf-core.xml cf-fp.xml" |
1934 | target_phys_bits=32 | 1928 | target_phys_bits=32 |
1935 | ;; | 1929 | ;; |
1936 | microblaze) | 1930 | microblaze) |
1937 | - echo "#define TARGET_ARCH \"microblaze\"" >> $config_h | ||
1938 | echo "#define TARGET_MICROBLAZE 1" >> $config_h | 1931 | echo "#define TARGET_MICROBLAZE 1" >> $config_h |
1939 | bflt="yes" | 1932 | bflt="yes" |
1940 | target_nptl="yes" | 1933 | target_nptl="yes" |
@@ -1943,7 +1936,6 @@ case "$target_arch2" in | @@ -1943,7 +1936,6 @@ case "$target_arch2" in | ||
1943 | mips|mipsel) | 1936 | mips|mipsel) |
1944 | TARGET_ARCH=mips | 1937 | TARGET_ARCH=mips |
1945 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak | 1938 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak |
1946 | - echo "#define TARGET_ARCH \"mips\"" >> $config_h | ||
1947 | echo "#define TARGET_MIPS 1" >> $config_h | 1939 | echo "#define TARGET_MIPS 1" >> $config_h |
1948 | echo "#define TARGET_ABI_MIPSO32 1" >> $config_h | 1940 | echo "#define TARGET_ABI_MIPSO32 1" >> $config_h |
1949 | target_nptl="yes" | 1941 | target_nptl="yes" |
@@ -1953,7 +1945,6 @@ case "$target_arch2" in | @@ -1953,7 +1945,6 @@ case "$target_arch2" in | ||
1953 | TARGET_ARCH=mipsn32 | 1945 | TARGET_ARCH=mipsn32 |
1954 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak | 1946 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak |
1955 | echo "TARGET_BASE_ARCH=mips" >> $config_mak | 1947 | echo "TARGET_BASE_ARCH=mips" >> $config_mak |
1956 | - echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h | ||
1957 | echo "#define TARGET_MIPS 1" >> $config_h | 1948 | echo "#define TARGET_MIPS 1" >> $config_h |
1958 | echo "#define TARGET_ABI_MIPSN32 1" >> $config_h | 1949 | echo "#define TARGET_ABI_MIPSN32 1" >> $config_h |
1959 | target_phys_bits=64 | 1950 | target_phys_bits=64 |
@@ -1962,14 +1953,12 @@ case "$target_arch2" in | @@ -1962,14 +1953,12 @@ case "$target_arch2" in | ||
1962 | TARGET_ARCH=mips64 | 1953 | TARGET_ARCH=mips64 |
1963 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak | 1954 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak |
1964 | echo "TARGET_BASE_ARCH=mips" >> $config_mak | 1955 | echo "TARGET_BASE_ARCH=mips" >> $config_mak |
1965 | - echo "#define TARGET_ARCH \"mips64\"" >> $config_h | ||
1966 | echo "#define TARGET_MIPS 1" >> $config_h | 1956 | echo "#define TARGET_MIPS 1" >> $config_h |
1967 | echo "#define TARGET_MIPS64 1" >> $config_h | 1957 | echo "#define TARGET_MIPS64 1" >> $config_h |
1968 | echo "#define TARGET_ABI_MIPSN64 1" >> $config_h | 1958 | echo "#define TARGET_ABI_MIPSN64 1" >> $config_h |
1969 | target_phys_bits=64 | 1959 | target_phys_bits=64 |
1970 | ;; | 1960 | ;; |
1971 | ppc) | 1961 | ppc) |
1972 | - echo "#define TARGET_ARCH \"ppc\"" >> $config_h | ||
1973 | echo "#define TARGET_PPC 1" >> $config_h | 1962 | echo "#define TARGET_PPC 1" >> $config_h |
1974 | gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" | 1963 | gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" |
1975 | target_phys_bits=32 | 1964 | target_phys_bits=32 |
@@ -1977,7 +1966,6 @@ case "$target_arch2" in | @@ -1977,7 +1966,6 @@ case "$target_arch2" in | ||
1977 | ppcemb) | 1966 | ppcemb) |
1978 | echo "TARGET_BASE_ARCH=ppc" >> $config_mak | 1967 | echo "TARGET_BASE_ARCH=ppc" >> $config_mak |
1979 | echo "TARGET_ABI_DIR=ppc" >> $config_mak | 1968 | echo "TARGET_ABI_DIR=ppc" >> $config_mak |
1980 | - echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h | ||
1981 | echo "#define TARGET_PPC 1" >> $config_h | 1969 | echo "#define TARGET_PPC 1" >> $config_h |
1982 | echo "#define TARGET_PPCEMB 1" >> $config_h | 1970 | echo "#define TARGET_PPCEMB 1" >> $config_h |
1983 | gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" | 1971 | gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" |
@@ -1986,7 +1974,6 @@ case "$target_arch2" in | @@ -1986,7 +1974,6 @@ case "$target_arch2" in | ||
1986 | ppc64) | 1974 | ppc64) |
1987 | echo "TARGET_BASE_ARCH=ppc" >> $config_mak | 1975 | echo "TARGET_BASE_ARCH=ppc" >> $config_mak |
1988 | echo "TARGET_ABI_DIR=ppc" >> $config_mak | 1976 | echo "TARGET_ABI_DIR=ppc" >> $config_mak |
1989 | - echo "#define TARGET_ARCH \"ppc64\"" >> $config_h | ||
1990 | echo "#define TARGET_PPC 1" >> $config_h | 1977 | echo "#define TARGET_PPC 1" >> $config_h |
1991 | echo "#define TARGET_PPC64 1" >> $config_h | 1978 | echo "#define TARGET_PPC64 1" >> $config_h |
1992 | gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" | 1979 | gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" |
@@ -1997,7 +1984,6 @@ case "$target_arch2" in | @@ -1997,7 +1984,6 @@ case "$target_arch2" in | ||
1997 | echo "TARGET_BASE_ARCH=ppc" >> $config_mak | 1984 | echo "TARGET_BASE_ARCH=ppc" >> $config_mak |
1998 | echo "TARGET_ABI_DIR=ppc" >> $config_mak | 1985 | echo "TARGET_ABI_DIR=ppc" >> $config_mak |
1999 | echo "TARGET_ARCH2=ppc64abi32" >> $config_mak | 1986 | echo "TARGET_ARCH2=ppc64abi32" >> $config_mak |
2000 | - echo "#define TARGET_ARCH \"ppc64\"" >> $config_h | ||
2001 | echo "#define TARGET_PPC 1" >> $config_h | 1987 | echo "#define TARGET_PPC 1" >> $config_h |
2002 | echo "#define TARGET_PPC64 1" >> $config_h | 1988 | echo "#define TARGET_PPC64 1" >> $config_h |
2003 | echo "#define TARGET_ABI32 1" >> $config_h | 1989 | echo "#define TARGET_ABI32 1" >> $config_h |
@@ -2007,20 +1993,17 @@ case "$target_arch2" in | @@ -2007,20 +1993,17 @@ case "$target_arch2" in | ||
2007 | sh4|sh4eb) | 1993 | sh4|sh4eb) |
2008 | TARGET_ARCH=sh4 | 1994 | TARGET_ARCH=sh4 |
2009 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak | 1995 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak |
2010 | - echo "#define TARGET_ARCH \"sh4\"" >> $config_h | ||
2011 | echo "#define TARGET_SH4 1" >> $config_h | 1996 | echo "#define TARGET_SH4 1" >> $config_h |
2012 | bflt="yes" | 1997 | bflt="yes" |
2013 | target_nptl="yes" | 1998 | target_nptl="yes" |
2014 | target_phys_bits=32 | 1999 | target_phys_bits=32 |
2015 | ;; | 2000 | ;; |
2016 | sparc) | 2001 | sparc) |
2017 | - echo "#define TARGET_ARCH \"sparc\"" >> $config_h | ||
2018 | echo "#define TARGET_SPARC 1" >> $config_h | 2002 | echo "#define TARGET_SPARC 1" >> $config_h |
2019 | target_phys_bits=64 | 2003 | target_phys_bits=64 |
2020 | ;; | 2004 | ;; |
2021 | sparc64) | 2005 | sparc64) |
2022 | echo "TARGET_BASE_ARCH=sparc" >> $config_mak | 2006 | echo "TARGET_BASE_ARCH=sparc" >> $config_mak |
2023 | - echo "#define TARGET_ARCH \"sparc64\"" >> $config_h | ||
2024 | echo "#define TARGET_SPARC 1" >> $config_h | 2007 | echo "#define TARGET_SPARC 1" >> $config_h |
2025 | echo "#define TARGET_SPARC64 1" >> $config_h | 2008 | echo "#define TARGET_SPARC64 1" >> $config_h |
2026 | elfload32="yes" | 2009 | elfload32="yes" |
@@ -2031,7 +2014,6 @@ case "$target_arch2" in | @@ -2031,7 +2014,6 @@ case "$target_arch2" in | ||
2031 | echo "TARGET_BASE_ARCH=sparc" >> $config_mak | 2014 | echo "TARGET_BASE_ARCH=sparc" >> $config_mak |
2032 | echo "TARGET_ABI_DIR=sparc" >> $config_mak | 2015 | echo "TARGET_ABI_DIR=sparc" >> $config_mak |
2033 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak | 2016 | echo "TARGET_ARCH2=$target_arch2" >> $config_mak |
2034 | - echo "#define TARGET_ARCH \"sparc64\"" >> $config_h | ||
2035 | echo "#define TARGET_SPARC 1" >> $config_h | 2017 | echo "#define TARGET_SPARC 1" >> $config_h |
2036 | echo "#define TARGET_SPARC64 1" >> $config_h | 2018 | echo "#define TARGET_SPARC64 1" >> $config_h |
2037 | echo "#define TARGET_ABI32 1" >> $config_h | 2019 | echo "#define TARGET_ABI32 1" >> $config_h |
@@ -2043,6 +2025,8 @@ case "$target_arch2" in | @@ -2043,6 +2025,8 @@ case "$target_arch2" in | ||
2043 | ;; | 2025 | ;; |
2044 | esac | 2026 | esac |
2045 | echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak | 2027 | echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak |
2028 | +echo "#define TARGET_ARCH \"$TARGET_ARCH\"" >> $config_h | ||
2029 | + | ||
2046 | if [ $target_phys_bits -lt $hostlongbits ] ; then | 2030 | if [ $target_phys_bits -lt $hostlongbits ] ; then |
2047 | target_phys_bits=$hostlongbits | 2031 | target_phys_bits=$hostlongbits |
2048 | fi | 2032 | fi |