configure: Ensure that user's LD setting is respected
[ghc.git] / aclocal.m4
index 0389474..11606c7 100644 (file)
@@ -2283,6 +2283,7 @@ AC_DEFUN([FIND_LD],[
       [enable_ld_override=yes])
 
     if test "x$enable_ld_override" = "xyes"; then
+        TmpLd="$LD" # In case the user set LD
         AC_CHECK_TARGET_TOOLS([TmpLd], [ld.lld ld.gold ld])
 
         out=`$TmpLd --version`