diff mbox

[FFmpeg-devel] configure: Add .exe suffix to some Windows executable names

Message ID CAB0OVGq=3oSgzR8Ary2oLRbbBknn9J-WHE97fWbGmTZWrafDVw@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos April 19, 2019, 2:18 p.m. UTC
Hi!

Attached patch is necessary for msvc compilation on wsl.

Please comment, Carl Eugen

Comments

Carl Eugen Hoyos April 19, 2019, 10:15 p.m. UTC | #1
2019-04-19 16:18 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:

> Attached patch is necessary for msvc compilation on wsl.

Patch applied, in-tree msvc compilation with wsl works for
all targets.

Carl Eugen
diff mbox

Patch

From 1a6921f6b1f4655a59263ba22aa9e3210143c49b Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Fri, 19 Apr 2019 16:16:19 +0200
Subject: [PATCH] configure: Add .exe suffix to some Windows executable names.

Allows msvc compilation from wsl.
---
 compat/windows/mslink |    2 +-
 configure             |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/compat/windows/mslink b/compat/windows/mslink
index 07b2b3e..6cab090 100755
--- a/compat/windows/mslink
+++ b/compat/windows/mslink
@@ -4,6 +4,6 @@  LINK_EXE_PATH=$(dirname "$(command -v cl)")/link
 if [ -x "$LINK_EXE_PATH" ]; then
     "$LINK_EXE_PATH" $@
 else
-    link $@
+    link.exe $@
 fi
 exit $?
diff --git a/configure b/configure
index e10e2c2..55f92c6 100755
--- a/configure
+++ b/configure
@@ -4114,14 +4114,14 @@  case "$toolchain" in
         # versions that require the converter (MSVC 2010 and 2012).
         cl_major_ver=$(cl 2>&1 | sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p')
         if [ -z "$cl_major_ver" ] || [ $cl_major_ver -ge 18 ]; then
-            cc_default="cl"
-            cxx_default="cl"
+            cc_default="cl.exe"
+            cxx_default="cl.exe"
         else
             die "Unsupported MSVC version (2013 or newer required)"
         fi
         ld_default="$source_path/compat/windows/mslink"
-        nm_default="dumpbin -symbols"
-        ar_default="lib"
+        nm_default="dumpbin.exe -symbols"
+        ar_default="lib.exe"
         case "$arch" in
         aarch64|arm64)
             as_default="armasm64"
-- 
1.7.10.4