From c9edbe4af901e9bc9f05a62319637f9760df9a4a Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Fri, 24 Jul 2015 09:38:04 +0200 Subject: [PATCH] use a wrapper script to call MS link.exe to avoid mixing with /usr/bin/link.exe MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fallback to "link" in the path if the one next to cl is not found. Signed-off-by: Martin Storsjö --- compat/windows/mslink | 9 +++++++++ configure | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 compat/windows/mslink diff --git a/compat/windows/mslink b/compat/windows/mslink new file mode 100755 index 0000000000..07b2b3e378 --- /dev/null +++ b/compat/windows/mslink @@ -0,0 +1,9 @@ +#!/bin/sh + +LINK_EXE_PATH=$(dirname "$(command -v cl)")/link +if [ -x "$LINK_EXE_PATH" ]; then + "$LINK_EXE_PATH" $@ +else + link $@ +fi +exit $? diff --git a/configure b/configure index ac2a71d591..5ef2e0d6ff 100755 --- a/configure +++ b/configure @@ -2633,7 +2633,7 @@ case "$toolchain" in else cc_default="c99wrap cl" fi - ld_default="link" + ld_default="$source_path/compat/windows/mslink" nm_default="dumpbin -symbols" ar_default="lib" target_os_default="win32" -- 2.11.0