Revision 1ad2134f configure

b/configure
1724 1724
echo "TOOLS=$tools" >> $config_mak
1725 1725

  
1726 1726
test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h
1727
config_host_mak=${config_mak}
1727 1728

  
1728 1729
for target in $target_list; do
1729 1730
target_dir="$target"
......
1844 1845
      echo "CONFIG_XEN=yes" >> $config_mak
1845 1846
      echo "#define CONFIG_XEN 1" >> $config_h
1846 1847
    fi
1848
    target_phys_bits=32
1847 1849
  ;;
1848 1850
  x86_64)
1849 1851
    echo "TARGET_ARCH=x86_64" >> $config_mak
......
1865 1867
      echo "CONFIG_XEN=yes" >> $config_mak
1866 1868
      echo "#define CONFIG_XEN 1" >> $config_h
1867 1869
    fi
1870
    target_phys_bits=64
1868 1871
  ;;
1869 1872
  alpha)
1870 1873
    echo "TARGET_ARCH=alpha" >> $config_mak
1871 1874
    echo "#define TARGET_ARCH \"alpha\"" >> $config_h
1872 1875
    echo "#define TARGET_ALPHA 1" >> $config_h
1876
    target_phys_bits=64
1873 1877
  ;;
1874 1878
  arm|armeb)
1875 1879
    echo "TARGET_ARCH=arm" >> $config_mak
......
1878 1882
    bflt="yes"
1879 1883
    target_nptl="yes"
1880 1884
    gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
1885
    target_phys_bits=32
1881 1886
  ;;
1882 1887
  cris)
1883 1888
    echo "TARGET_ARCH=cris" >> $config_mak
1884 1889
    echo "#define TARGET_ARCH \"cris\"" >> $config_h
1885 1890
    echo "#define TARGET_CRIS 1" >> $config_h
1886 1891
    target_nptl="yes"
1892
    target_phys_bits=32
1887 1893
  ;;
1888 1894
  m68k)
1889 1895
    echo "TARGET_ARCH=m68k" >> $config_mak
......
1891 1897
    echo "#define TARGET_M68K 1" >> $config_h
1892 1898
    bflt="yes"
1893 1899
    gdb_xml_files="cf-core.xml cf-fp.xml"
1900
    target_phys_bits=32
1894 1901
  ;;
1895 1902
  mips|mipsel)
1896 1903
    echo "TARGET_ARCH=mips" >> $config_mak
1897 1904
    echo "#define TARGET_ARCH \"mips\"" >> $config_h
1898 1905
    echo "#define TARGET_MIPS 1" >> $config_h
1899 1906
    echo "#define TARGET_ABI_MIPSO32 1" >> $config_h
1907
    target_phys_bits=64
1900 1908
  ;;
1901 1909
  mipsn32|mipsn32el)
1902 1910
    echo "TARGET_ARCH=mipsn32" >> $config_mak
1903 1911
    echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h
1904 1912
    echo "#define TARGET_MIPS 1" >> $config_h
1905 1913
    echo "#define TARGET_ABI_MIPSN32 1" >> $config_h
1914
    target_phys_bits=64
1906 1915
  ;;
1907 1916
  mips64|mips64el)
1908 1917
    echo "TARGET_ARCH=mips64" >> $config_mak
......
1910 1919
    echo "#define TARGET_MIPS 1" >> $config_h
1911 1920
    echo "#define TARGET_MIPS64 1" >> $config_h
1912 1921
    echo "#define TARGET_ABI_MIPSN64 1" >> $config_h
1922
    target_phys_bits=64
1913 1923
  ;;
1914 1924
  ppc)
1915 1925
    echo "TARGET_ARCH=ppc" >> $config_mak
1916 1926
    echo "#define TARGET_ARCH \"ppc\"" >> $config_h
1917 1927
    echo "#define TARGET_PPC 1" >> $config_h
1918 1928
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
1929
    target_phys_bits=32
1919 1930
  ;;
1920 1931
  ppcemb)
1921 1932
    echo "TARGET_ARCH=ppcemb" >> $config_mak
......
1929 1940
      echo "#define CONFIG_KVM 1" >> $config_h
1930 1941
    fi
1931 1942
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
1943
    target_phys_bits=64
1932 1944
  ;;
1933 1945
  ppc64)
1934 1946
    echo "TARGET_ARCH=ppc64" >> $config_mak
......
1937 1949
    echo "#define TARGET_PPC 1" >> $config_h
1938 1950
    echo "#define TARGET_PPC64 1" >> $config_h
1939 1951
    gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
1952
    target_phys_bits=64
1940 1953
  ;;
1941 1954
  ppc64abi32)
1942 1955
    echo "TARGET_ARCH=ppc64" >> $config_mak
......
1947 1960
    echo "#define TARGET_PPC64 1" >> $config_h
1948 1961
    echo "#define TARGET_ABI32 1" >> $config_h
1949 1962
    gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
1963
    target_phys_bits=64
1950 1964
  ;;
1951 1965
  sh4|sh4eb)
1952 1966
    echo "TARGET_ARCH=sh4" >> $config_mak
......
1954 1968
    echo "#define TARGET_SH4 1" >> $config_h
1955 1969
    bflt="yes"
1956 1970
    target_nptl="yes"
1971
    target_phys_bits=32
1957 1972
  ;;
1958 1973
  sparc)
1959 1974
    echo "TARGET_ARCH=sparc" >> $config_mak
1960 1975
    echo "#define TARGET_ARCH \"sparc\"" >> $config_h
1961 1976
    echo "#define TARGET_SPARC 1" >> $config_h
1977
    target_phys_bits=64
1962 1978
  ;;
1963 1979
  sparc64)
1964 1980
    echo "TARGET_ARCH=sparc64" >> $config_mak
......
1966 1982
    echo "#define TARGET_SPARC 1" >> $config_h
1967 1983
    echo "#define TARGET_SPARC64 1" >> $config_h
1968 1984
    elfload32="yes"
1985
    target_phys_bits=64
1969 1986
  ;;
1970 1987
  sparc32plus)
1971 1988
    echo "TARGET_ARCH=sparc64" >> $config_mak
......
1975 1992
    echo "#define TARGET_SPARC 1" >> $config_h
1976 1993
    echo "#define TARGET_SPARC64 1" >> $config_h
1977 1994
    echo "#define TARGET_ABI32 1" >> $config_h
1995
    target_phys_bits=64
1978 1996
  ;;
1979 1997
  *)
1980 1998
    echo "Unsupported target CPU"
1981 1999
    exit 1
1982 2000
  ;;
1983 2001
esac
2002
if [ $target_phys_bits -lt $hostlongbits ] ; then
2003
  target_phys_bits=$hostlongbits
2004
fi
2005
echo "HWLIB=../libhw$target_phys_bits/libqemuhw$target_phys_bits.a" >> $config_mak
2006
echo "#define TARGET_PHYS_ADDR_BITS $target_phys_bits" >> $config_h
2007
echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak
1984 2008
if test "$target_bigendian" = "yes" ; then
1985 2009
  echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak
1986 2010
  echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h
......
2065 2089
        ln -s $source_path/$f $f
2066 2090
    done
2067 2091
fi
2092

  
2093
for hwlib in 32 64; do
2094
  d=libhw$hwlib
2095
  mkdir -p $d
2096
  rm -f $d/Makefile
2097
  ln -s $source_path/Makefile.hw $d/Makefile
2098
  echo "HWLIB=libqemuhw$hwlib.a" > $d/config.mak
2099
  echo "CPPFLAGS=-DTARGET_PHYS_ADDR_BITS=$hwlib" >> $d/config.mak
2100
done

Also available in: Unified diff