Browse Source

lua: always use host-lua for host-luainterpreter

Similar to how we do for openssl.

host-luainterpreter is only used by the luarocks infrastructure, and there
is afaik no specific reason why the host lua variant must match the target one.

Luajit only supports a limited number of architectures, so building it for
the host limits the architectures Buildroot can be used on (E.G. powerpc64
autobuilders).

To fix this, always use host-lua.  Slightly rework lua.mk to ensure
host-lua-5.1 is used when luajit is selected, and drop the logic for using
host-luajit.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Peter Korsgaard 7 years ago
parent
commit
0bd23f0603

+ 3 - 3
package/lua/lua.mk

@@ -16,10 +16,10 @@ endif
 LUA_SITE = http://www.lua.org/ftp
 LUA_INSTALL_STAGING = YES
 LUA_LICENSE = MIT
-ifeq ($(BR2_PACKAGE_LUA_5_1),y)
-LUA_LICENSE_FILES = COPYRIGHT
-else
+ifeq ($(BR2_PACKAGE_LUA_5_2)$(BR2_PACKAGE_LUA_5_3),y)
 LUA_LICENSE_FILES = doc/readme.html
+else
+LUA_LICENSE_FILES = COPYRIGHT
 endif
 
 LUA_PROVIDES = luainterpreter

+ 4 - 0
package/luainterpreter/Config.in

@@ -7,3 +7,7 @@ config BR2_PACKAGE_PROVIDES_LUAINTERPRETER
 
 config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION
 	string
+
+config BR2_PACKAGE_PROVIDES_HOST_LUAINTERPRETER
+	string
+	default "host-lua"

+ 1 - 1
package/luainterpreter/luainterpreter.mk

@@ -20,4 +20,4 @@ endif
 $(eval $(virtual-package))
 $(eval $(host-virtual-package))
 
-LUA_RUN = $(HOST_DIR)/bin/$(call qstrip,$(BR2_PACKAGE_PROVIDES_LUAINTERPRETER))
+LUA_RUN = $(HOST_DIR)/bin/lua

+ 0 - 4
package/luarocks/luarocks.mk

@@ -23,10 +23,6 @@ HOST_LUAROCKS_CONF_OPTS = \
 	--sysconfdir=$(LUAROCKS_CONFIG_DIR) \
 	--with-lua=$(HOST_DIR)
 
-ifeq ($(BR2_PACKAGE_LUAJIT),y)
-HOST_LUAROCKS_CONF_OPTS += --lua-suffix=jit
-endif
-
 define HOST_LUAROCKS_CONFIGURE_CMDS
 	cd $(@D) && ./configure $(HOST_LUAROCKS_CONF_OPTS)
 endef