Don't hard-code ld when extracting host linker version, use ${LD} if
authorJoerg Sonnenberger <joerg@bec.de>
Wed, 28 May 2014 15:12:55 +0000 (15:12 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Wed, 28 May 2014 15:12:55 +0000 (15:12 +0000)
it is set.

llvm-svn: 209742

llvm/autoconf/m4/link_options.m4
llvm/configure

index b58d617..abf6596 100644 (file)
@@ -6,7 +6,7 @@
 AC_DEFUN([AC_LINK_GET_VERSION],
   [AC_CACHE_CHECK([for linker version],[llvm_cv_link_version],
   [
-   version_string="$(ld -v 2>&1 | head -1)"
+   version_string="$(${LD:-ld} -v 2>&1 | head -1)"
 
    # Check for ld64.
    if (echo "$version_string" | grep -q "ld64"); then
index e1959df..8c6270d 100755 (executable)
@@ -7612,7 +7612,7 @@ if test "${llvm_cv_link_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-   version_string="$(ld -v 2>&1 | head -1)"
+   version_string="$(${LD:-ld} -v 2>&1 | head -1)"
 
    # Check for ld64.
    if (echo "$version_string" | grep -q "ld64"); then