The reason I am forwarding this patch for upstreaming consideration is to support my WinLua Toolchain project:
http://winlua.net[3]. The goal of the WinLua Toolchain is to provide a development environment for Lua on Windows and mitigate some of the pitfalls that have nothing to do with writing Lua scripts.
To that end, I have created a Windows installer that combines Lua, LuaRocks with llvm-mingw as the new "WinLua Compiler" (WLC). My package also contains a mingw32 `make` variant. With the aforementioned patch and WinLua Toolchain, Windows users can compile Lua almost exactly the same as on Linux.
I say almost because there seems to be a problem with the way the makefile calls make. The space in the path (from "Program Files (x86)") causes make to fail:
C:\Users\russh\lua\lua-5.4.0> make clean
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
make: *** [Makefile:55: clean] Error 1
So instead I need to call it like so: `make MAKE=make.exe mingw`. It's a minor problem, but I thought I'd mention it.
Conclusion:
The Makefile patch adds a linker library file to the mingw target. The patch enables a person to build Lua on Windows 10 using the llvm-mingw compiler that my WinLua toolchain is based on. I am hoping that WLC can become a standard tool for writing Lua modules and making C more accessible to people without all the Visual Studio stuff. I personally like Visual Studio, but I don't need 20GB of tools to build Lua or Lua C modules. I would be pleased if Lua could support my compiler toochain and - in time - maybe even provide a link to my download site.
If you managed to get this far, thanks for listening. And as always, thanks to the Lua team for the great language.
Regards,
Russ
[2] LuaSocket does not compile due to LUASOCKET_INET_PTON, that's for a different post.
[3] The current installer is functional but is a beta. I was trying to get something ready for a final release before revealing the website.
-- Roberto