Commit 0938cda5d0015d36e9b1a65a5b523fdcaaf1b6a8
1 parent
99aa9e4c
configure cleanup
(Stuart Brady) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4194 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
103 additions
and
82 deletions
configure
| ... | ... | @@ -575,7 +575,14 @@ fi |
| 575 | 575 | else |
| 576 | 576 | |
| 577 | 577 | # if cross compiling, cannot launch a program, so make a static guess |
| 578 | -if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "mips64" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then | |
| 578 | +if test "$cpu" = "armv4b" \ | |
| 579 | + -o "$cpu" = "m68k" \ | |
| 580 | + -o "$cpu" = "mips" \ | |
| 581 | + -o "$cpu" = "mips64" \ | |
| 582 | + -o "$cpu" = "powerpc" \ | |
| 583 | + -o "$cpu" = "s390" \ | |
| 584 | + -o "$cpu" = "sparc" \ | |
| 585 | + -o "$cpu" = "sparc64"; then | |
| 579 | 586 | bigendian="yes" |
| 580 | 587 | fi |
| 581 | 588 | |
| ... | ... | @@ -583,7 +590,10 @@ fi |
| 583 | 590 | |
| 584 | 591 | # host long bits test |
| 585 | 592 | hostlongbits="32" |
| 586 | -if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then | |
| 593 | +if test "$cpu" = "x86_64" \ | |
| 594 | + -o "$cpu" = "alpha" \ | |
| 595 | + -o "$cpu" = "ia64" \ | |
| 596 | + -o "$cpu" = "sparc64"; then | |
| 587 | 597 | hostlongbits="64" |
| 588 | 598 | fi |
| 589 | 599 | |
| ... | ... | @@ -843,42 +853,42 @@ if test "$cpu" = "i386" ; then |
| 843 | 853 | elif test "$cpu" = "x86_64" ; then |
| 844 | 854 | echo "ARCH=x86_64" >> $config_mak |
| 845 | 855 | echo "#define HOST_X86_64 1" >> $config_h |
| 856 | +elif test "$cpu" = "alpha" ; then | |
| 857 | + echo "ARCH=alpha" >> $config_mak | |
| 858 | + echo "#define HOST_ALPHA 1" >> $config_h | |
| 846 | 859 | elif test "$cpu" = "armv4b" ; then |
| 847 | 860 | echo "ARCH=arm" >> $config_mak |
| 848 | 861 | echo "#define HOST_ARM 1" >> $config_h |
| 849 | 862 | elif test "$cpu" = "armv4l" ; then |
| 850 | 863 | echo "ARCH=arm" >> $config_mak |
| 851 | 864 | echo "#define HOST_ARM 1" >> $config_h |
| 852 | -elif test "$cpu" = "powerpc" ; then | |
| 853 | - echo "ARCH=ppc" >> $config_mak | |
| 854 | - echo "#define HOST_PPC 1" >> $config_h | |
| 865 | +elif test "$cpu" = "cris" ; then | |
| 866 | + echo "ARCH=cris" >> $config_mak | |
| 867 | + echo "#define HOST_CRIS 1" >> $config_h | |
| 868 | +elif test "$cpu" = "ia64" ; then | |
| 869 | + echo "ARCH=ia64" >> $config_mak | |
| 870 | + echo "#define HOST_IA64 1" >> $config_h | |
| 871 | +elif test "$cpu" = "m68k" ; then | |
| 872 | + echo "ARCH=m68k" >> $config_mak | |
| 873 | + echo "#define HOST_M68K 1" >> $config_h | |
| 855 | 874 | elif test "$cpu" = "mips" ; then |
| 856 | 875 | echo "ARCH=mips" >> $config_mak |
| 857 | 876 | echo "#define HOST_MIPS 1" >> $config_h |
| 858 | 877 | elif test "$cpu" = "mips64" ; then |
| 859 | 878 | echo "ARCH=mips64" >> $config_mak |
| 860 | 879 | echo "#define HOST_MIPS64 1" >> $config_h |
| 861 | -elif test "$cpu" = "cris" ; then | |
| 862 | - echo "ARCH=cris" >> $config_mak | |
| 863 | - echo "#define HOST_CRIS 1" >> $config_h | |
| 880 | +elif test "$cpu" = "powerpc" ; then | |
| 881 | + echo "ARCH=ppc" >> $config_mak | |
| 882 | + echo "#define HOST_PPC 1" >> $config_h | |
| 864 | 883 | elif test "$cpu" = "s390" ; then |
| 865 | 884 | echo "ARCH=s390" >> $config_mak |
| 866 | 885 | echo "#define HOST_S390 1" >> $config_h |
| 867 | -elif test "$cpu" = "alpha" ; then | |
| 868 | - echo "ARCH=alpha" >> $config_mak | |
| 869 | - echo "#define HOST_ALPHA 1" >> $config_h | |
| 870 | 886 | elif test "$cpu" = "sparc" ; then |
| 871 | 887 | echo "ARCH=sparc" >> $config_mak |
| 872 | 888 | echo "#define HOST_SPARC 1" >> $config_h |
| 873 | 889 | elif test "$cpu" = "sparc64" ; then |
| 874 | 890 | echo "ARCH=sparc64" >> $config_mak |
| 875 | 891 | echo "#define HOST_SPARC64 1" >> $config_h |
| 876 | -elif test "$cpu" = "ia64" ; then | |
| 877 | - echo "ARCH=ia64" >> $config_mak | |
| 878 | - echo "#define HOST_IA64 1" >> $config_h | |
| 879 | -elif test "$cpu" = "m68k" ; then | |
| 880 | - echo "ARCH=m68k" >> $config_mak | |
| 881 | - echo "#define HOST_M68K 1" >> $config_h | |
| 882 | 892 | else |
| 883 | 893 | echo "Unsupported CPU = $cpu" |
| 884 | 894 | exit 1 |
| ... | ... | @@ -1049,18 +1059,18 @@ config_h=$target_dir/config.h |
| 1049 | 1059 | target_cpu=`echo $target | cut -d '-' -f 1` |
| 1050 | 1060 | target_bigendian="no" |
| 1051 | 1061 | [ "$target_cpu" = "armeb" ] && target_bigendian=yes |
| 1052 | -[ "$target_cpu" = "sparc" ] && target_bigendian=yes | |
| 1053 | -[ "$target_cpu" = "sparc64" ] && target_bigendian=yes | |
| 1054 | -[ "$target_cpu" = "sparc32plus" ] && target_bigendian=yes | |
| 1062 | +[ "$target_cpu" = "m68k" ] && target_bigendian=yes | |
| 1063 | +[ "$target_cpu" = "mips" ] && target_bigendian=yes | |
| 1064 | +[ "$target_cpu" = "mipsn32" ] && target_bigendian=yes | |
| 1065 | +[ "$target_cpu" = "mips64" ] && target_bigendian=yes | |
| 1055 | 1066 | [ "$target_cpu" = "ppc" ] && target_bigendian=yes |
| 1056 | 1067 | [ "$target_cpu" = "ppcemb" ] && target_bigendian=yes |
| 1057 | 1068 | [ "$target_cpu" = "ppc64" ] && target_bigendian=yes |
| 1058 | 1069 | [ "$target_cpu" = "ppc64abi32" ] && target_bigendian=yes |
| 1059 | -[ "$target_cpu" = "mips" ] && target_bigendian=yes | |
| 1060 | -[ "$target_cpu" = "mipsn32" ] && target_bigendian=yes | |
| 1061 | -[ "$target_cpu" = "mips64" ] && target_bigendian=yes | |
| 1062 | 1070 | [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes |
| 1063 | -[ "$target_cpu" = "m68k" ] && target_bigendian=yes | |
| 1071 | +[ "$target_cpu" = "sparc" ] && target_bigendian=yes | |
| 1072 | +[ "$target_cpu" = "sparc64" ] && target_bigendian=yes | |
| 1073 | +[ "$target_cpu" = "sparc32plus" ] && target_bigendian=yes | |
| 1064 | 1074 | target_softmmu="no" |
| 1065 | 1075 | target_user_only="no" |
| 1066 | 1076 | target_linux_user="no" |
| ... | ... | @@ -1129,6 +1139,18 @@ if test "$target_cpu" = "i386" ; then |
| 1129 | 1139 | if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "i386" ; then |
| 1130 | 1140 | echo "#define USE_KQEMU 1" >> $config_h |
| 1131 | 1141 | fi |
| 1142 | +elif test "$target_cpu" = "x86_64" ; then | |
| 1143 | + echo "TARGET_ARCH=x86_64" >> $config_mak | |
| 1144 | + echo "#define TARGET_ARCH \"x86_64\"" >> $config_h | |
| 1145 | + echo "#define TARGET_I386 1" >> $config_h | |
| 1146 | + echo "#define TARGET_X86_64 1" >> $config_h | |
| 1147 | + if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" ; then | |
| 1148 | + echo "#define USE_KQEMU 1" >> $config_h | |
| 1149 | + fi | |
| 1150 | +elif test "$target_cpu" = "alpha" ; then | |
| 1151 | + echo "TARGET_ARCH=alpha" >> $config_mak | |
| 1152 | + echo "#define TARGET_ARCH \"alpha\"" >> $config_h | |
| 1153 | + echo "#define TARGET_ALPHA 1" >> $config_h | |
| 1132 | 1154 | elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then |
| 1133 | 1155 | echo "TARGET_ARCH=arm" >> $config_mak |
| 1134 | 1156 | echo "CONFIG_NO_DYNGEN_OP=yes" >> $config_mak |
| ... | ... | @@ -1136,24 +1158,33 @@ elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then |
| 1136 | 1158 | echo "#define TARGET_ARM 1" >> $config_h |
| 1137 | 1159 | echo "#define CONFIG_NO_DYNGEN_OP 1" >> $config_h |
| 1138 | 1160 | bflt="yes" |
| 1139 | -elif test "$target_cpu" = "sparc" ; then | |
| 1140 | - echo "TARGET_ARCH=sparc" >> $config_mak | |
| 1141 | - echo "#define TARGET_ARCH \"sparc\"" >> $config_h | |
| 1142 | - echo "#define TARGET_SPARC 1" >> $config_h | |
| 1143 | -elif test "$target_cpu" = "sparc64" ; then | |
| 1144 | - echo "TARGET_ARCH=sparc64" >> $config_mak | |
| 1145 | - echo "#define TARGET_ARCH \"sparc64\"" >> $config_h | |
| 1146 | - echo "#define TARGET_SPARC 1" >> $config_h | |
| 1147 | - echo "#define TARGET_SPARC64 1" >> $config_h | |
| 1148 | - elfload32="yes" | |
| 1149 | -elif test "$target_cpu" = "sparc32plus" ; then | |
| 1150 | - echo "TARGET_ARCH=sparc64" >> $config_mak | |
| 1151 | - echo "TARGET_ABI_DIR=sparc" >> $config_mak | |
| 1152 | - echo "TARGET_ARCH2=sparc32plus" >> $config_mak | |
| 1153 | - echo "#define TARGET_ARCH \"sparc64\"" >> $config_h | |
| 1154 | - echo "#define TARGET_SPARC 1" >> $config_h | |
| 1155 | - echo "#define TARGET_SPARC64 1" >> $config_h | |
| 1156 | - echo "#define TARGET_ABI32 1" >> $config_h | |
| 1161 | +elif test "$target_cpu" = "cris" ; then | |
| 1162 | + echo "TARGET_ARCH=cris" >> $config_mak | |
| 1163 | + echo "#define TARGET_ARCH \"cris\"" >> $config_h | |
| 1164 | + echo "#define TARGET_CRIS 1" >> $config_h | |
| 1165 | + echo "CONFIG_SOFTFLOAT=yes" >> $config_mak | |
| 1166 | + echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | |
| 1167 | +elif test "$target_cpu" = "m68k" ; then | |
| 1168 | + echo "TARGET_ARCH=m68k" >> $config_mak | |
| 1169 | + echo "#define TARGET_ARCH \"m68k\"" >> $config_h | |
| 1170 | + echo "#define TARGET_M68K 1" >> $config_h | |
| 1171 | + bflt="yes" | |
| 1172 | +elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then | |
| 1173 | + echo "TARGET_ARCH=mips" >> $config_mak | |
| 1174 | + echo "#define TARGET_ARCH \"mips\"" >> $config_h | |
| 1175 | + echo "#define TARGET_MIPS 1" >> $config_h | |
| 1176 | + echo "#define TARGET_ABI_MIPSO32 1" >> $config_h | |
| 1177 | +elif test "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" ; then | |
| 1178 | + echo "TARGET_ARCH=mipsn32" >> $config_mak | |
| 1179 | + echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h | |
| 1180 | + echo "#define TARGET_MIPS 1" >> $config_h | |
| 1181 | + echo "#define TARGET_ABI_MIPSN32 1" >> $config_h | |
| 1182 | +elif test "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el" ; then | |
| 1183 | + echo "TARGET_ARCH=mips64" >> $config_mak | |
| 1184 | + echo "#define TARGET_ARCH \"mips64\"" >> $config_h | |
| 1185 | + echo "#define TARGET_MIPS 1" >> $config_h | |
| 1186 | + echo "#define TARGET_MIPS64 1" >> $config_h | |
| 1187 | + echo "#define TARGET_ABI_MIPSN64 1" >> $config_h | |
| 1157 | 1188 | elif test "$target_cpu" = "ppc" ; then |
| 1158 | 1189 | echo "TARGET_ARCH=ppc" >> $config_mak |
| 1159 | 1190 | echo "#define TARGET_ARCH \"ppc\"" >> $config_h |
| ... | ... | @@ -1178,50 +1209,29 @@ elif test "$target_cpu" = "ppc64abi32" ; then |
| 1178 | 1209 | echo "#define TARGET_PPC 1" >> $config_h |
| 1179 | 1210 | echo "#define TARGET_PPC64 1" >> $config_h |
| 1180 | 1211 | echo "#define TARGET_ABI32 1" >> $config_h |
| 1181 | -elif test "$target_cpu" = "x86_64" ; then | |
| 1182 | - echo "TARGET_ARCH=x86_64" >> $config_mak | |
| 1183 | - echo "#define TARGET_ARCH \"x86_64\"" >> $config_h | |
| 1184 | - echo "#define TARGET_I386 1" >> $config_h | |
| 1185 | - echo "#define TARGET_X86_64 1" >> $config_h | |
| 1186 | - if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" ; then | |
| 1187 | - echo "#define USE_KQEMU 1" >> $config_h | |
| 1188 | - fi | |
| 1189 | -elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then | |
| 1190 | - echo "TARGET_ARCH=mips" >> $config_mak | |
| 1191 | - echo "#define TARGET_ARCH \"mips\"" >> $config_h | |
| 1192 | - echo "#define TARGET_MIPS 1" >> $config_h | |
| 1193 | - echo "#define TARGET_ABI_MIPSO32 1" >> $config_h | |
| 1194 | -elif test "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" ; then | |
| 1195 | - echo "TARGET_ARCH=mipsn32" >> $config_mak | |
| 1196 | - echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h | |
| 1197 | - echo "#define TARGET_MIPS 1" >> $config_h | |
| 1198 | - echo "#define TARGET_ABI_MIPSN32 1" >> $config_h | |
| 1199 | -elif test "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el" ; then | |
| 1200 | - echo "TARGET_ARCH=mips64" >> $config_mak | |
| 1201 | - echo "#define TARGET_ARCH \"mips64\"" >> $config_h | |
| 1202 | - echo "#define TARGET_MIPS 1" >> $config_h | |
| 1203 | - echo "#define TARGET_MIPS64 1" >> $config_h | |
| 1204 | - echo "#define TARGET_ABI_MIPSN64 1" >> $config_h | |
| 1205 | -elif test "$target_cpu" = "cris" ; then | |
| 1206 | - echo "TARGET_ARCH=cris" >> $config_mak | |
| 1207 | - echo "#define TARGET_ARCH \"cris\"" >> $config_h | |
| 1208 | - echo "#define TARGET_CRIS 1" >> $config_h | |
| 1209 | - echo "CONFIG_SOFTFLOAT=yes" >> $config_mak | |
| 1210 | - echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | |
| 1211 | 1212 | elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then |
| 1212 | 1213 | echo "TARGET_ARCH=sh4" >> $config_mak |
| 1213 | 1214 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h |
| 1214 | 1215 | echo "#define TARGET_SH4 1" >> $config_h |
| 1215 | 1216 | bflt="yes" |
| 1216 | -elif test "$target_cpu" = "m68k" ; then | |
| 1217 | - echo "TARGET_ARCH=m68k" >> $config_mak | |
| 1218 | - echo "#define TARGET_ARCH \"m68k\"" >> $config_h | |
| 1219 | - echo "#define TARGET_M68K 1" >> $config_h | |
| 1220 | - bflt="yes" | |
| 1221 | -elif test "$target_cpu" = "alpha" ; then | |
| 1222 | - echo "TARGET_ARCH=alpha" >> $config_mak | |
| 1223 | - echo "#define TARGET_ARCH \"alpha\"" >> $config_h | |
| 1224 | - echo "#define TARGET_ALPHA 1" >> $config_h | |
| 1217 | +elif test "$target_cpu" = "sparc" ; then | |
| 1218 | + echo "TARGET_ARCH=sparc" >> $config_mak | |
| 1219 | + echo "#define TARGET_ARCH \"sparc\"" >> $config_h | |
| 1220 | + echo "#define TARGET_SPARC 1" >> $config_h | |
| 1221 | +elif test "$target_cpu" = "sparc64" ; then | |
| 1222 | + echo "TARGET_ARCH=sparc64" >> $config_mak | |
| 1223 | + echo "#define TARGET_ARCH \"sparc64\"" >> $config_h | |
| 1224 | + echo "#define TARGET_SPARC 1" >> $config_h | |
| 1225 | + echo "#define TARGET_SPARC64 1" >> $config_h | |
| 1226 | + elfload32="yes" | |
| 1227 | +elif test "$target_cpu" = "sparc32plus" ; then | |
| 1228 | + echo "TARGET_ARCH=sparc64" >> $config_mak | |
| 1229 | + echo "TARGET_ABI_DIR=sparc" >> $config_mak | |
| 1230 | + echo "TARGET_ARCH2=sparc32plus" >> $config_mak | |
| 1231 | + echo "#define TARGET_ARCH \"sparc64\"" >> $config_h | |
| 1232 | + echo "#define TARGET_SPARC 1" >> $config_h | |
| 1233 | + echo "#define TARGET_SPARC64 1" >> $config_h | |
| 1234 | + echo "#define TARGET_ABI32 1" >> $config_h | |
| 1225 | 1235 | else |
| 1226 | 1236 | echo "Unsupported target CPU" |
| 1227 | 1237 | exit 1 |
| ... | ... | @@ -1247,7 +1257,18 @@ if test "$target_darwin_user" = "yes" ; then |
| 1247 | 1257 | echo "#define CONFIG_DARWIN_USER 1" >> $config_h |
| 1248 | 1258 | fi |
| 1249 | 1259 | |
| 1250 | -if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64" -o "$target_cpu" = "sparc32plus" -o "$target_cpu" = "m68k" -o "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" -o "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" -o "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el"; then | |
| 1260 | +if test "$target_cpu" = "arm" \ | |
| 1261 | + -o "$target_cpu" = "armeb" \ | |
| 1262 | + -o "$target_cpu" = "m68k" \ | |
| 1263 | + -o "$target_cpu" = "mips" \ | |
| 1264 | + -o "$target_cpu" = "mipsel" \ | |
| 1265 | + -o "$target_cpu" = "mipsn32" \ | |
| 1266 | + -o "$target_cpu" = "mipsn32el" \ | |
| 1267 | + -o "$target_cpu" = "mips64" \ | |
| 1268 | + -o "$target_cpu" = "mips64el" \ | |
| 1269 | + -o "$target_cpu" = "sparc" \ | |
| 1270 | + -o "$target_cpu" = "sparc64" \ | |
| 1271 | + -o "$target_cpu" = "sparc32plus"; then | |
| 1251 | 1272 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
| 1252 | 1273 | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h |
| 1253 | 1274 | fi | ... | ... |