add --host-triple

This commit is contained in:
Niko Matsakis 2011-12-02 16:04:17 -08:00
parent 292663b8ef
commit 9acc2bfcad
1 changed files with 11 additions and 1 deletions

12
configure vendored
View File

@ -220,7 +220,7 @@ case $CFG_CPUTYPE in
err "unknown CPU type: $CFG_CPUTYPE"
esac
CFG_HOST_TRIPLE="${CFG_CPUTYPE}-${CFG_OSTYPE}"
DEFAULT_HOST_TRIPLE="${CFG_CPUTYPE}-${CFG_OSTYPE}"
CFG_SELF=$(echo $0 | tr '\\' '/')
CFG_SRC_DIR=${CFG_SELF%${CFG_SELF##*/}}
@ -256,6 +256,7 @@ opt mingw-cross 0 "cross-compile for win32 using mingw"
opt clang 0 "prefer gcc to clang for building the runtime"
valopt prefix "/usr/local" "set installation prefix"
valopt llvm-root "" "set LLVM root"
valopt host-triple "$DEFAULT_HOST_TRIPLE" "primary LLVM host triple"
valopt target-triples "" "LLVM target triples (defaults to host if unset)"
if [ $HELP -eq 1 ]
@ -341,6 +342,15 @@ else
CFG_TARGET_TRIPLES="$(echo $CFG_TARGET_TRIPLES | tr ',' ' ')"
fi
case $CFG_TARGET_TRIPLES in
(*$CFG_HOST_TRIPLE*) ;;
(*) err "Host triple is not among the target triples." ;;
esac
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
then
err "either clang or gcc is required"
fi
step_msg "making directories"