make/autoconf/toolchain.m4
changeset 53460 65c813da7c65
parent 53110 50677f43ac3d
child 53643 1126811a5124
--- a/make/autoconf/toolchain.m4	Thu Jan 24 01:01:11 2019 +0100
+++ b/make/autoconf/toolchain.m4	Wed Jan 23 14:10:31 2019 -0800
@@ -715,12 +715,18 @@
       AC_MSG_RESULT([yes])
     fi
     LDCXX="$LD"
+    # jaotc being a windows program expects the linker to be supplied with exe suffix.
+    LD_JAOTC="$LD$EXE_SUFFIX"
   else
     # All other toolchains use the compiler to link.
     LD="$CC"
     LDCXX="$CXX"
+    # jaotc expects 'ld' as the linker rather than the compiler.
+    BASIC_CHECK_TOOLS([LD_JAOTC], ld)
+    BASIC_FIXUP_EXECUTABLE(LD_JAOTC)
   fi
   AC_SUBST(LD)
+  AC_SUBST(LD_JAOTC)
   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
   AC_SUBST(LDCXX)