X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=configure;h=dde17e76d8a865123fc128a0dd94d9a483553464;hb=8b3856b1bc1c23969e5d8983f25cf85698a5c2b1;hp=f284d13ee3bbd4ec7ee7dc1c2fa521b7330c88be;hpb=a891c72976824993ecb4a8749d9f16dbeceaeeed;p=rust.git diff --git a/configure b/configure index f284d13ee3b..dde17e76d8a 100755 --- a/configure +++ b/configure @@ -1,5 +1,13 @@ #!/bin/sh +# /bin/sh on Solaris is not a POSIX compatible shell, but /usr/bin/bash is. +if [ `uname -s` = 'SunOS' -a "${POSIX_SHELL}" != "true" ]; then + POSIX_SHELL="true" + export POSIX_SHELL + exec /usr/bin/env bash $0 "$@" +fi +unset POSIX_SHELL # clear it so if we invoke other scripts, they run as bash as well + msg() { echo "configure: $*" } @@ -334,14 +342,6 @@ enable_if_not_disabled() { fi } -to_llvm_triple() { - case $1 in - i686-w64-mingw32) echo i686-pc-windows-gnu ;; - x86_64-w64-mingw32) echo x86_64-pc-windows-gnu ;; - *) echo $1 ;; - esac -} - to_gnu_triple() { case $1 in i686-pc-windows-gnu) echo i686-w64-mingw32 ;; @@ -424,6 +424,11 @@ case $CFG_OSTYPE in CFG_OSTYPE=apple-darwin ;; + SunOS) + CFG_OSTYPE=sun-solaris + CFG_CPUTYPE=$(isainfo -n) + ;; + MINGW*) # msys' `uname` does not print gcc configuration, but prints msys # configuration. so we cannot believe `uname -m`: @@ -646,12 +651,6 @@ valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples" valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples" valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH" -# Temporarily support old triples until buildbots get updated -CFG_BUILD=$(to_llvm_triple $CFG_BUILD) -putvar CFG_BUILD # Yes, this creates a duplicate entry, but the last one wins. -CFG_HOST=$(to_llvm_triple $CFG_HOST) -CFG_TARGET=$(to_llvm_triple $CFG_TARGET) - # On Windows this determines root of the subtree for target libraries. # Host runtime libs always go to 'bin'. valopt libdir "${CFG_PREFIX}/lib" "install libraries" @@ -1178,7 +1177,7 @@ do ;; - *-musl) + x86_64-*-musl) if [ ! -f $CFG_MUSL_ROOT/lib/libc.a ] then err "musl libc $CFG_MUSL_ROOT/lib/libc.a not found" @@ -1306,6 +1305,12 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake putvar CFG_DISABLE_JEMALLOC ;; + *-emscripten) + step_msg "targeting emscripten, disabling jemalloc" + CFG_DISABLE_JEMALLOC=1 + putvar CFG_DISABLE_JEMALLOC + ;; + *) ;; esac @@ -1409,6 +1414,7 @@ do make_dir $h/test/debuginfo-gdb make_dir $h/test/debuginfo-lldb make_dir $h/test/codegen + make_dir $h/test/codegen-units make_dir $h/test/rustdoc done