X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=configure;h=1c63f74db3b9b03b0a233d0dc29f87966c805eef;hb=ed121aa89780d1495e6a6a215b8e0cf7894a2d24;hp=8caf6abed781bfca5dbcca56c5edc5d86b55e774;hpb=8ca0acc25adb00d29e52b015bded4b2872a1170c;p=rust.git diff --git a/configure b/configure index 8caf6abed78..1c63f74db3b 100755 --- a/configure +++ b/configure @@ -632,18 +632,9 @@ 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 we just store the libraries in the bin directory because -# there's no rpath. This is where the build system itself puts libraries; -# --libdir is used to configure the installation directory. -# FIXME: This needs to parameterized over target triples. Do it in platform.mk -if [ "$CFG_OSTYPE" = "pc-windows-gnu" ] || [ "$CFG_OSTYPE" = "pc-windows-msvc" ] -then - CFG_LIBDIR_RELATIVE=bin -else - CFG_LIBDIR_RELATIVE=lib -fi - -valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries (do not set it on windows platform)" +# 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" case "$CFG_LIBDIR" in "$CFG_PREFIX"/*) CAT_INC=2;; @@ -654,11 +645,6 @@ esac CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-` -if ( [ "$CFG_OSTYPE" = "pc-windows-gnu" ] || [ "$CFG_OSTYPE" = "pc-windows-msvc" ] ) \ - && [ "$CFG_LIBDIR_RELATIVE" != "bin" ]; then - err "libdir on windows should be set to 'bin'" -fi - if [ $HELP -eq 1 ] then echo @@ -1067,12 +1053,13 @@ fi # point in the script; after this point, script logic should inspect # $CFG_USING_CLANG rather than $CFG_ENABLE_CLANG. -# Set CFG_{CC,CXX,CPP,CFLAGS,CXXFLAGS} +# Set CFG_{CC,CXX,CPP,CFLAGS,CXXFLAGS,LDFLAGS} envopt CC envopt CXX envopt CPP envopt CFLAGS envopt CXXFLAGS +envopt LDFLAGS # stdc++ name in use # used to manage non-standard name (on OpenBSD for example) @@ -1681,9 +1668,9 @@ do CXX=$LLVM_CXX CC=$LLVM_CC - CFLAGS=$LLVM_CFLAGS - CXXFLAGS=$LLVM_CXXFLAGS - LDFLAGS=$LLVM_LDFLAGS + CFLAGS="$CFLAGS $LLVM_CFLAGS" + CXXFLAGS="$CXXFLAGS $LLVM_CXXFLAGS" + LDFLAGS="$LDFLAGS $LLVM_LDFLAGS" if [ -z "$CFG_DISABLE_LIBCPP" ] && [ -n "$CFG_USING_CLANG" ]; then LLVM_OPTS="$LLVM_OPTS --enable-libcpp"