]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
lua: always use host-lua for host-luainterpreter
authorPeter Korsgaard <peter@korsgaard.com>
Sat, 21 Oct 2017 20:54:57 +0000 (22:54 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 31 Mar 2018 19:01:03 +0000 (21:01 +0200)
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>
package/lua/lua.mk
package/luainterpreter/Config.in
package/luainterpreter/luainterpreter.mk
package/luarocks/luarocks.mk

index 0ac2e0e25d7aa9c681cb2d31b7f79ff8ccb366f5..851dc8f734a8d9f0d12f829b828cd144e4d29fff 100644 (file)
@@ -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
index e89a9b84d2d44465fc529c522f5f712052829e6d..7bc54d862fa76a4376f2d2f1907103ef72203997 100644 (file)
@@ -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"
index cb1d5dde18af01fe0a0374faccd6a218fada16b0..58d421b183e23832a2bd72538d7a9c2e68f9c0f4 100644 (file)
@@ -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
index 389d5218321897f3f4ef3e95189ff8c8e54e3c24..63d908a416fe6a07c90c231c3afcd51f00e1273a 100644 (file)
@@ -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