Hi,
I am interested in getting swupdate to get its Lua support from LuaJIT. I'm not
doing this for performance reasons or anything, but to avoid including multiple
versions of Lua on an embedded system since another package on the system
requires LuaJIT.
Anyway, most of the problems in achieving this task are caused by the
limitations in the swupdate build system which I have been able to fix.
I've put together a small patch that simplifies the way swupdate links against
Lua (and potentially other packages that use pkg-config in the future) so that
it only needs the pkg-config package name to get the correct compiler/linker
flags for a specified package.
First, I changed the CONFIG_LUAVERSION to CONFIG_LUAPKG since we don't care
about the version anymore but we care about the pkg-config package name of the
Lua implementation. This change will require people to update their defconfigs
if they've set a custom Lua version in the past. Hopefully this won't be too
much of a problem.
Next, I've added a new step to pkg_check_modules that provides the libraries
returned by pkg-config in the format that swupdate's LDLIBS expects.
Finally, I've updated the Lua section of Makefile.flags so it can make use of
the new configuration value and pkg_check_modules variable.
Obviously, with a Lua API less than 5.2, custom handlers cannot be used but the
other 2 use cases work fine and if we add some lua-compat-5.3
<
https://github.com/keplerproject/lua-compat-5.3/tree/master/c-api> files to
the swupdate build we can even get custom handlers to work with Lua 5.1
implementations as well but that's for a future patch set.
--
Jordan
Jordan Yelloz (3):
Kconfig: removed LUAVERSION, added LUAPKG
Makefile.flags: added $(PKG)_LDLIBS to pkg_check_modules
Makefile.flags: simplified Lua build support.
Kconfig | 10 ++++------
Makefile.flags | 5 +++--
2 files changed, 7 insertions(+), 8 deletions(-)
--
2.9.3