[FFmpeg-devel] [PATCH] [RFC] use a wrapper script to call MS link.exe to avoid mixing with /usr/bin/link.exe

Steve Lhomme robux4 at gmail.com
Thu Jul 23 18:41:17 CEST 2015


--
favor link over link.exe in case some wrapper script already exists
fallback to "link" in the path if the one next to cl is not found
---
 configure       | 2 +-
 tools/mslink.sh | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 tools/mslink.sh

diff --git a/configure b/configure
index 16bf852..a1901af 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/tools/mslink.sh"
         nm_default="dumpbin -symbols"
         ar_default="lib"
         target_os_default="win32"
diff --git a/tools/mslink.sh b/tools/mslink.sh
new file mode 100644
index 0000000..6f0d98f
--- /dev/null
+++ b/tools/mslink.sh
@@ -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 $?
-- 
2.4.5



More information about the ffmpeg-devel mailing list