diff options
author | Alyssa Milburn | 2013-04-23 14:07:54 -0700 |
---|---|---|
committer | Alyssa Milburn | 2013-04-23 14:07:54 -0700 |
commit | baea3be7a4481ad78dea1da1495fc623c77c7fa5 (patch) | |
tree | 7dce121212f094339991650d71838d0458ca5108 | |
parent | 2e231150eba5e57f1f542f6a3938c9256995be70 (diff) | |
parent | ab50935afcecc343a4b770f8248d0dc71485145d (diff) | |
download | scummvm-rg350-baea3be7a4481ad78dea1da1495fc623c77c7fa5.tar.gz scummvm-rg350-baea3be7a4481ad78dea1da1495fc623c77c7fa5.tar.bz2 scummvm-rg350-baea3be7a4481ad78dea1da1495fc623c77c7fa5.zip |
Merge pull request #321 from fingolfin/configure-fix-nolink
CONFIGURE: Do not pass LDFLAGS to compiler when -c is specified
-rwxr-xr-x | configure | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -230,7 +230,11 @@ cc_check_no_clean() { echo >> "$TMPLOG" echo "$CXX $LDFLAGS $CXXFLAGS $TMPC -o $TMPO$HOSTEXEEXT $@" >> "$TMPLOG" rm -f "$TMPO$HOSTEXEEXT" - ( $CXX $LDFLAGS $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1 + if test "-c" = "$*" ; then + ( $CXX $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1 + else + ( $CXX $LDFLAGS $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1 + fi TMPR="$?" echo "return code: $TMPR" >> "$TMPLOG" echo >> "$TMPLOG" @@ -1566,7 +1570,7 @@ EOF if test -n "$_host"; then # In cross-compiling mode, we cannot run the result - eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO.o -c tmp_cxx_compiler.cpp" 2> /dev/null && cc_check_clean tmp_cxx_compiler.cpp + eval "$1 $CXXFLAGS -o $TMPO.o -c tmp_cxx_compiler.cpp" 2> /dev/null && cc_check_clean tmp_cxx_compiler.cpp else eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO$HOSTEXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "$TMPO$HOSTEXEEXT 2> /dev/null" && cc_check_clean tmp_cxx_compiler.cpp fi |