diff -rN -u old-ghc/aclocal.m4 new-ghc/aclocal.m4
|
old
|
new
|
|
| 1235 | 1235 | esac |
| 1236 | 1236 | ]) |
| 1237 | 1237 | |
| | 1238 | # GHC_CONVERT_CPU(cpu, target_var) |
| | 1239 | # -------------------------------- |
| | 1240 | # converts cpu from gnu to ghc naming, and assigns the result to $target_var |
| | 1241 | AC_DEFUN([GHC_CONVERT_CPU],[ |
| | 1242 | case "$1" in |
| | 1243 | alpha*) |
| | 1244 | $2="alpha" |
| | 1245 | ;; |
| | 1246 | arm*) |
| | 1247 | $2="arm" |
| | 1248 | ;; |
| | 1249 | hppa1.1*) |
| | 1250 | $2="hppa1_1" |
| | 1251 | ;; |
| | 1252 | hppa*) |
| | 1253 | $2="hppa" |
| | 1254 | ;; |
| | 1255 | i386) |
| | 1256 | $2="i386" |
| | 1257 | ;; |
| | 1258 | ia64) |
| | 1259 | $2="ia64" |
| | 1260 | ;; |
| | 1261 | m68k*) |
| | 1262 | $2="m68k" |
| | 1263 | ;; |
| | 1264 | mipseb*) |
| | 1265 | $2="mipseb" |
| | 1266 | ;; |
| | 1267 | mipsel*) |
| | 1268 | $2="mipsel" |
| | 1269 | ;; |
| | 1270 | mips*) |
| | 1271 | $2="mips" |
| | 1272 | ;; |
| | 1273 | powerpc64*) |
| | 1274 | $2="powerpc64" |
| | 1275 | ;; |
| | 1276 | powerpc*) |
| | 1277 | $2="powerpc" |
| | 1278 | ;; |
| | 1279 | rs6000) |
| | 1280 | $2="rs6000" |
| | 1281 | ;; |
| | 1282 | s390*) |
| | 1283 | $2="s390" |
| | 1284 | ;; |
| | 1285 | sparc64*) |
| | 1286 | $2="sparc64" |
| | 1287 | ;; |
| | 1288 | sparc*) |
| | 1289 | $2="sparc" |
| | 1290 | ;; |
| | 1291 | vax) |
| | 1292 | $2="vax" |
| | 1293 | ;; |
| | 1294 | x86_64) |
| | 1295 | $2="x86_64" |
| | 1296 | ;; |
| | 1297 | *) |
| | 1298 | echo "Unknown CPU $1" |
| | 1299 | exit 1 |
| | 1300 | ;; |
| | 1301 | esac |
| | 1302 | ]) |
| | 1303 | |
| | 1304 | # GHC_CONVERT_VENDOR(vendor, target_var) |
| | 1305 | # -------------------------------- |
| | 1306 | # converts vendor from gnu to ghc naming, and assigns the result to $target_var |
| | 1307 | AC_DEFUN([GHC_CONVERT_VENDOR],[ |
| | 1308 | $2="$1" |
| | 1309 | ]) |
| | 1310 | |
| | 1311 | # GHC_CONVERT_OS(os, target_var) |
| | 1312 | # -------------------------------- |
| | 1313 | # converts os from gnu to ghc naming, and assigns the result to $target_var |
| | 1314 | AC_DEFUN([GHC_CONVERT_OS],[ |
| | 1315 | case "$1" in |
| | 1316 | linux-*|linux) |
| | 1317 | $2="linux" |
| | 1318 | ;; |
| | 1319 | # As far as I'm aware, none of these have relevant variants |
| | 1320 | freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku) |
| | 1321 | $2="$1" |
| | 1322 | ;; |
| | 1323 | *) |
| | 1324 | echo "Unknown OS $1" |
| | 1325 | exit 1 |
| | 1326 | ;; |
| | 1327 | esac |
| | 1328 | ]) |
| | 1329 | |
| 1238 | 1330 | # LocalWords: fi |
diff -rN -u old-ghc/configure.ac new-ghc/configure.ac
|
old
|
new
|
|
| 208 | 208 | --host=HOST cross-compile to build programs to run on HOST [guessed] |
| 209 | 209 | --target=TARGET configure for building compilers for TARGET [guessed]]])dnl |
| 210 | 210 | |
| 211 | | if test "$build" = "" |
| | 211 | if test "${WithGhc}" != "" |
| | 212 | then |
| | 213 | bootstrap_host=`"${WithGhc}" +RTS --info | grep '^ ,("Host platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` |
| | 214 | bootstrap_target=`"${WithGhc}" +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` |
| | 215 | if test "$bootstrap_host" != "$bootstrap_target" |
| | 216 | then |
| | 217 | echo "Bootstrapping GHC is a cross compiler. This probably isn't going to work" |
| | 218 | fi |
| | 219 | fi |
| | 220 | |
| | 221 | # We have to run these unconditionally, but we may discard their |
| | 222 | # results in the following code |
| | 223 | AC_CANONICAL_BUILD |
| | 224 | AC_CANONICAL_HOST |
| | 225 | AC_CANONICAL_TARGET |
| | 226 | |
| | 227 | # If no argument was given for a configuration variable, then discard |
| | 228 | # the guessed canonical system and use the configuration of the |
| | 229 | # bootstrapping ghc. If an argument was given, map it from gnu format |
| | 230 | # to ghc format. |
| | 231 | |
| | 232 | if test "$build_alias" = "" |
| 212 | 233 | then |
| 213 | 234 | if test "${WithGhc}" != "" |
| 214 | 235 | then |
| 215 | | build=`"${WithGhc}" +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` |
| | 236 | build=$bootstrap_target |
| 216 | 237 | echo "Build platform inferred as: $build" |
| 217 | 238 | else |
| 218 | 239 | echo "Can't work out build platform" |
| 219 | 240 | exit 1 |
| 220 | 241 | fi |
| | 242 | |
| | 243 | BuildArch=`echo "$build" | sed 's/-.*//'` |
| | 244 | BuildVendor=`echo "$build" | sed -e 's/.*-\(.*\)-.*/\1/'` |
| | 245 | BuildOS=`echo "$build" | sed 's/.*-//'` |
| | 246 | else |
| | 247 | GHC_CONVERT_CPU([$build_cpu], [BuildArch]) |
| | 248 | GHC_CONVERT_VENDOR([$build_vendor], [BuildVendor]) |
| | 249 | GHC_CONVERT_OS([$build_os], [BuildOS]) |
| 221 | 250 | fi |
| 222 | 251 | |
| 223 | | if test "$host" = "" |
| | 252 | if test "$host_alias" = "" |
| 224 | 253 | then |
| 225 | 254 | if test "${WithGhc}" != "" |
| 226 | 255 | then |
| 227 | | host=`"${WithGhc}" +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` |
| | 256 | host=$bootstrap_target |
| 228 | 257 | echo "Host platform inferred as: $host" |
| 229 | 258 | else |
| 230 | 259 | echo "Can't work out host platform" |
| 231 | 260 | exit 1 |
| 232 | 261 | fi |
| | 262 | |
| | 263 | HostArch=`echo "$host" | sed 's/-.*//'` |
| | 264 | HostVendor=`echo "$host" | sed -e 's/.*-\(.*\)-.*/\1/'` |
| | 265 | HostOS=`echo "$host" | sed 's/.*-//'` |
| | 266 | else |
| | 267 | GHC_CONVERT_CPU([$host_cpu], [HostArch]) |
| | 268 | GHC_CONVERT_VENDOR([$host_vendor], [HostVendor]) |
| | 269 | GHC_CONVERT_OS([$host_os], [HostOS]) |
| 233 | 270 | fi |
| 234 | 271 | |
| 235 | | if test "$target" = "" |
| | 272 | if test "$target_alias" = "" |
| 236 | 273 | then |
| 237 | 274 | if test "${WithGhc}" != "" |
| 238 | 275 | then |
| 239 | | target=`"${WithGhc}" +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` |
| | 276 | target=$bootstrap_target |
| 240 | 277 | echo "Target platform inferred as: $target" |
| 241 | 278 | else |
| 242 | 279 | echo "Can't work out target platform" |
| 243 | 280 | exit 1 |
| 244 | 281 | fi |
| | 282 | |
| | 283 | TargetArch=`echo "$target" | sed 's/-.*//'` |
| | 284 | TargetVendor=`echo "$target" | sed -e 's/.*-\(.*\)-.*/\1/'` |
| | 285 | TargetOS=`echo "$target" | sed 's/.*-//'` |
| | 286 | else |
| | 287 | GHC_CONVERT_CPU([$target_cpu], [TargetArch]) |
| | 288 | GHC_CONVERT_VENDOR([$target_vendor], [TargetVendor]) |
| | 289 | GHC_CONVERT_OS([$target_os], [TargetOS]) |
| 245 | 290 | fi |
| 246 | 291 | |
| 247 | 292 | exeext='' |
| … |
… |
|
| 305 | 350 | esac |
| 306 | 351 | } |
| 307 | 352 | |
| 308 | | BuildPlatform=$build |
| 309 | | BuildArch=`echo "$build" | sed 's/-.*//'` |
| 310 | | BuildVendor=`echo "$build" | sed -e 's/.*-\(.*\)-.*/\1/'` |
| 311 | | BuildOS=`echo "$build" | sed 's/.*-//'` |
| | 353 | BuildPlatform="$BuildArch-$BuildVendor-$BuildOS" |
| 312 | 354 | BuildPlatform_CPP=`echo "$BuildPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'` |
| 313 | 355 | BuildArch_CPP=` echo "$BuildArch" | sed -e 's/\./_/g' -e 's/-/_/g'` |
| 314 | 356 | BuildVendor_CPP=` echo "$BuildVendor" | sed -e 's/\./_/g' -e 's/-/_/g'` |
| … |
… |
|
| 318 | 360 | checkVendor "$BuildVendor" |
| 319 | 361 | checkOS "$BuildOS" |
| 320 | 362 | |
| 321 | | HostPlatform=$host |
| 322 | | HostArch=`echo "$host" | sed 's/-.*//'` |
| 323 | | HostVendor=`echo "$host" | sed -e 's/.*-\(.*\)-.*/\1/'` |
| 324 | | HostOS=`echo "$host" | sed 's/.*-//'` |
| | 363 | HostPlatform="$HostArch-$HostVendor-$HostOS" |
| 325 | 364 | HostPlatform_CPP=`echo "$HostPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'` |
| 326 | 365 | HostArch_CPP=` echo "$HostArch" | sed -e 's/\./_/g' -e 's/-/_/g'` |
| 327 | 366 | HostVendor_CPP=` echo "$HostVendor" | sed -e 's/\./_/g' -e 's/-/_/g'` |
| … |
… |
|
| 331 | 370 | checkVendor "$HostVendor" |
| 332 | 371 | checkOS "$HostOS" |
| 333 | 372 | |
| 334 | | TargetPlatform=$target |
| 335 | | TargetArch=`echo "$target" | sed 's/-.*//'` |
| 336 | | TargetVendor=`echo "$target" | sed -e 's/.*-\(.*\)-.*/\1/'` |
| 337 | | TargetOS=`echo "$target" | sed 's/.*-//'` |
| | 373 | TargetPlatform="$TargetArch-$TargetVendor-$TargetOS" |
| 338 | 374 | TargetPlatform_CPP=`echo "$TargetPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'` |
| 339 | 375 | TargetArch_CPP=` echo "$TargetArch" | sed -e 's/\./_/g' -e 's/-/_/g'` |
| 340 | 376 | TargetVendor_CPP=` echo "$TargetVendor" | sed -e 's/\./_/g' -e 's/-/_/g'` |