From e6aafbb2424e013870852b0c7f1c64d1d8c4b516 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 28 May 2014 15:12:55 +0000 Subject: [PATCH] Don't hard-code ld when extracting host linker version, use ${LD} if it is set. llvm-svn: 209742 --- llvm/autoconf/m4/link_options.m4 | 2 +- llvm/configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/autoconf/m4/link_options.m4 b/llvm/autoconf/m4/link_options.m4 index b58d61745f97..abf6596f7c6f 100644 --- a/llvm/autoconf/m4/link_options.m4 +++ b/llvm/autoconf/m4/link_options.m4 @@ -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 diff --git a/llvm/configure b/llvm/configure index e1959dfee6c0..8c6270dd89fd 100755 --- a/llvm/configure +++ b/llvm/configure @@ -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