lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 15/05/2020 01:23, Luiz Henrique de Figueiredo wrote:
It could also generate 32 bit binaries, but a switch (-m32) must be
added to both compilation and linking commands. If there is a /quick/
way to do this, I could do that too (I've got no time to hack through
the makefile myself).

Use MYCFLAGS=-m32 MYLDFLAGS=-m32 when invoking make.
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org



That didn't work smoothly, sadly.
The compilation step did work, but the linking of the DLL didn't.

By a quick look at the makefile in src dir it seems that the MYLDFLAGS doesn't change the DLL generation command.

I had to manually add the -m32 flag to the target:

mingw:
	$(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \
	"AR=$(CC) -shared -m32 -o" "RANLIB=strip --strip-unneeded" \
	"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
	$(MAKE) "LUAC_T=luac.exe" luac.exe


Anyway, after that change everything was ok and the compilation and tests were all successful without warnings.
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org