[vlc-devel] [PATCH] contrib: lua: respect LDFLAGS under mingw
Steve Lhomme
robux4 at ycbcr.xyz
Mon May 18 16:29:13 CEST 2020
---
contrib/src/lua/lua-mingw-ldflags.patch | 15 +++++++++++++++
contrib/src/lua/rules.mak | 1 +
2 files changed, 16 insertions(+)
create mode 100644 contrib/src/lua/lua-mingw-ldflags.patch
diff --git a/contrib/src/lua/lua-mingw-ldflags.patch b/contrib/src/lua/lua-mingw-ldflags.patch
new file mode 100644
index 000000000000..fe60a4fa01ba
--- /dev/null
+++ b/contrib/src/lua/lua-mingw-ldflags.patch
@@ -0,0 +1,15 @@
+--- lua/src/Makefile.mingw 2020-04-30 14:53:15.640930300 +0200
++++ lua/src/Makefile 2020-04-30 17:10:09.130313700 +0200
+@@ -109,9 +109,9 @@ macosx:
+
+ mingw:
+ $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" "LUA_A_LINK=lua51.lib" \
+- "AR=$(CC) -shared -Wl,--out-implib,lua51.lib -o" "RANLIB=x86_64-w64-mingw32-strip --strip-unneeded" \
+- "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe
+- $(MAKE) "LUAC_T=luac.exe" luac.exe
++ "AR=$(CC) -shared -Wl,--out-implib,lua51.lib $(LDFLAGS) -o" "RANLIB=x86_64-w64-mingw32-strip --strip-unneeded" \
++ "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s $(LDFLAGS)" lua.exe
++ $(MAKE) "LUAC_T=luac.exe" "MYLDFLAGS=$(LDFLAGS)" luac.exe
+
+ posix:
+ $(MAKE) all MYCFLAGS=-DLUA_USE_POSIX
diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index f9315e15941f..e8da7b09a7b9 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -70,6 +70,7 @@ endif
-e 's%= *ranlib%= $(RANLIB)%' \
-e 's%AR= *ar%AR= $(AR)%' \
Makefile
+ $(APPLY) $(SRC)/lua/lua-mingw-ldflags.patch
$(MOVE)
.lua: lua
--
2.26.2
More information about the vlc-devel
mailing list