Commit f93e17f0 authored by Francois Perrad's avatar Francois Perrad Committed by Thomas Petazzoni
Browse files
parent 1d4104f0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -245,7 +245,8 @@ endmenu
menu "Interpreter languages and scripting"
source "package/haserl/Config.in"
source "package/lua/Config.in"
if BR2_PACKAGE_LUA
source "package/luajit/Config.in"
if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
menu "LUA libraries/modules"
source "package/cgilua/Config.in"
source "package/copas/Config.in"
+12 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_LUAJIT
	bool "luajit"
	# Luajit is only available for some target architectures, and
	# has some complexity wrt 32/64. See luajit.mk for details.
	depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb
	help
	  LuaJIT implements the full set of language features defined
	  by Lua 5.1. The virtual machine (VM) is API- and
	  ABI-compatible to the standard Lua interpreter and can be
	  deployed as a drop-in replacement.

	  http://luajit.org/
+22 −0
Original line number Diff line number Diff line
Adjust installation location to /usr

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: b/src/luaconf.h
===================================================================
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -22,9 +22,9 @@
 #define LUA_CPATH_DEFAULT \
   ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
 #else
-#define LUA_ROOT	"/usr/local/"
-#define LUA_LDIR	LUA_ROOT "share/lua/5.1/"
-#define LUA_CDIR	LUA_ROOT "lib/lua/5.1/"
+#define LUA_ROOT	"/usr/"
+#define LUA_LDIR	LUA_ROOT "share/lua/"
+#define LUA_CDIR	LUA_ROOT "lib/lua/"
 #ifdef LUA_XROOT
 #define LUA_JDIR	LUA_XROOT "share/luajit-2.0.0-beta10/"
 #define LUA_XPATH \
+17 −0
Original line number Diff line number Diff line
Compile the luajit binary dynamically against the luajit library

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: b/src/Makefile
===================================================================
--- a/src/Makefile
+++ b/src/Makefile
@@ -629,7 +629,7 @@
 
 $(LUAJIT_T): $(TARGET_O) $(LUAJIT_O) $(TARGET_DEP)
 	$(E) "LINK      $@"
-	$(Q)$(TARGET_LD) $(TARGET_ALDFLAGS) -o $@ $(LUAJIT_O) $(TARGET_O) $(TARGET_ALIBS)
+	$(Q)$(TARGET_LD) $(TARGET_ALDFLAGS) -o $@ $(LUAJIT_O) -lluajit -L. $(TARGET_ALIBS)
 	$(Q)$(TARGET_STRIP) $@
 	$(E) "OK        Successfully built LuaJIT"
 
+23 −0
Original line number Diff line number Diff line
Don't strip the library and binary

This allows Buildroot to do it if needed, but only if needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: b/src/Makefile
===================================================================
--- a/src/Makefile
+++ b/src/Makefile
@@ -625,12 +625,10 @@
 $(LUAJIT_SO): $(LJVMCORE_O)
 	$(E) "DYNLINK   $@"
 	$(Q)$(TARGET_LD) $(TARGET_ASHLDFLAGS) -o $@ $(LJVMCORE_DYNO) $(TARGET_ALIBS)
-	$(Q)$(TARGET_STRIP) $@
 
 $(LUAJIT_T): $(TARGET_O) $(LUAJIT_O) $(TARGET_DEP)
 	$(E) "LINK      $@"
 	$(Q)$(TARGET_LD) $(TARGET_ALDFLAGS) -o $@ $(LUAJIT_O) -lluajit -L. $(TARGET_ALIBS)
-	$(Q)$(TARGET_STRIP) $@
 	$(E) "OK        Successfully built LuaJIT"
 
 ##############################################################################
Loading