diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2011-12-02 16:04:17 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2011-12-02 19:05:49 -0800 |
| commit | 9acc2bfcad8d80ec32a065446512fd5df1e250bf (patch) | |
| tree | d85d051717c98456a11c99bce4d9f1ceed3c5e4c | |
| parent | 292663b8ef3f688e90bd5a8bd49f46288639b158 (diff) | |
add --host-triple
| -rwxr-xr-x | configure | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/configure b/configure index cbdfb2c43fb..27542a91b31 100755 --- a/configure +++ b/configure @@ -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" |
