initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
Do not use a symlink for the binary, simply name it luajit
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: b/Makefile
|
||||
===================================================================
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -44,8 +44,7 @@
|
||||
INSTALL_MAN= $(INSTALL_SHARE)/man/man1
|
||||
INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
|
||||
|
||||
-INSTALL_TNAME= luajit-$(VERSION)
|
||||
-INSTALL_TSYMNAME= luajit
|
||||
+INSTALL_TNAME= luajit
|
||||
INSTALL_ANAME= libluajit-$(ABIVER).a
|
||||
INSTALL_SOSHORT1= libluajit-$(ABIVER).so
|
||||
INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
|
||||
@@ -60,7 +59,6 @@
|
||||
INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT1)
|
||||
INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT2)
|
||||
INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME)
|
||||
-INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME)
|
||||
INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
|
||||
|
||||
INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \
|
||||
@@ -0,0 +1,17 @@
|
||||
Install includes like lua's ones
|
||||
|
||||
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
||||
|
||||
Index: b/Makefile
|
||||
===================================================================
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -33,7 +33,7 @@
|
||||
INSTALL_BIN= $(DPREFIX)/bin
|
||||
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
|
||||
INSTALL_SHARE= $(DPREFIX)/share
|
||||
-INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
|
||||
+INSTALL_INC= $(DPREFIX)/include
|
||||
|
||||
INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION)
|
||||
INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
|
||||
@@ -0,0 +1,47 @@
|
||||
config BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_arm || BR2_armeb || BR2_aarch64
|
||||
default y if BR2_i386 || BR2_x86_64
|
||||
default y if (BR2_mips || BR2_mipsel) && !BR2_MIPS_SOFT_FLOAT \
|
||||
&& !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
|
||||
default y if BR2_powerpc
|
||||
# -m32 flag is used for 32bit builds and host-luajit has
|
||||
# limited architecture support
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
# Building for 64-bit target requires a 64-bit host
|
||||
depends on !BR2_ARCH_IS_64 || BR2_HOSTARCH = "x86_64"
|
||||
|
||||
config BR2_PACKAGE_LUAJIT
|
||||
bool "luajit"
|
||||
depends on !BR2_STATIC_LIBS # dlopen
|
||||
# Luajit is only available for some target architectures, and
|
||||
# has some complexity wrt 32/64. See luajit.mk for details.
|
||||
depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
|
||||
# luajit.mk uses the "-m32" compiler option to build 32bit
|
||||
# binaries, so check if that option is supported. See
|
||||
# luajit.mk for details.
|
||||
select BR2_PACKAGE_HAS_LUAINTERPRETER
|
||||
select BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
|
||||
select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64
|
||||
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.
|
||||
|
||||
https://luajit.org/luajit.html
|
||||
|
||||
if BR2_PACKAGE_LUAJIT
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LUAINTERPRETER
|
||||
default "luajit"
|
||||
|
||||
config BR2_PACKAGE_LUAJIT_COMPAT52
|
||||
bool "Lua 5.2 compatibility"
|
||||
help
|
||||
Compile with Lua 5.2 compatibility.
|
||||
|
||||
endif
|
||||
|
||||
comment "luajit needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally calculated
|
||||
sha256 b1b19f92451a661ba1167ee0b259299616cb3a1cdaf5ab05d7ccffaffeb4a0fb luajit-05f1984e1a862e4b3d3c3b370c773492e2edf84a.tar.gz
|
||||
|
||||
# Locally calculated
|
||||
sha256 43fc251179d900f9948e51dd3cc93733d1219f2db060faaa0c8100ad054f54d8 COPYRIGHT
|
||||
@@ -0,0 +1,80 @@
|
||||
################################################################################
|
||||
#
|
||||
# luajit
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LUAJIT_VERSION = 05f1984e1a862e4b3d3c3b370c773492e2edf84a
|
||||
LUAJIT_SITE = $(call github,LuaJIT,LuaJIT,$(LUAJIT_VERSION))
|
||||
LUAJIT_LICENSE = MIT
|
||||
LUAJIT_LICENSE_FILES = COPYRIGHT
|
||||
|
||||
LUAJIT_INSTALL_STAGING = YES
|
||||
|
||||
LUAJIT_PROVIDES = luainterpreter
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LUAJIT_COMPAT52),y)
|
||||
LUAJIT_XCFLAGS += -DLUAJIT_ENABLE_LUA52COMPAT
|
||||
endif
|
||||
|
||||
# The luajit build procedure requires the host compiler to have the
|
||||
# same bitness as the target compiler. Therefore, on a x86 build
|
||||
# machine, we can't build luajit for x86_64, which is checked in
|
||||
# Config.in. When the target is a 32 bits target, we pass -m32 to
|
||||
# ensure that even on 64 bits build machines, a compiler of the same
|
||||
# bitness is used. Of course, this assumes that the 32 bits multilib
|
||||
# libraries are installed.
|
||||
ifeq ($(BR2_ARCH_IS_64),y)
|
||||
LUAJIT_HOST_CC = $(HOSTCC)
|
||||
# There is no LUAJIT_ENABLE_GC64 option.
|
||||
else
|
||||
LUAJIT_HOST_CC = $(HOSTCC) -m32
|
||||
LUAJIT_XCFLAGS += -DLUAJIT_DISABLE_GC64
|
||||
endif
|
||||
|
||||
# We unfortunately can't use TARGET_CONFIGURE_OPTS, because the luajit
|
||||
# build system uses non conventional variable names.
|
||||
define LUAJIT_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) PREFIX="/usr" \
|
||||
STATIC_CC="$(TARGET_CC)" \
|
||||
DYNAMIC_CC="$(TARGET_CC) -fPIC" \
|
||||
TARGET_LD="$(TARGET_CC)" \
|
||||
TARGET_AR="$(TARGET_AR) rcus" \
|
||||
TARGET_STRIP=true \
|
||||
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
||||
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
HOST_CC="$(LUAJIT_HOST_CC)" \
|
||||
HOST_CFLAGS="$(HOST_CFLAGS)" \
|
||||
HOST_LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
BUILDMODE=dynamic \
|
||||
XCFLAGS="$(LUAJIT_XCFLAGS)" \
|
||||
-C $(@D) amalg
|
||||
endef
|
||||
|
||||
define LUAJIT_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) PREFIX="/usr" DESTDIR="$(STAGING_DIR)" LDCONFIG=true -C $(@D) install
|
||||
endef
|
||||
|
||||
define LUAJIT_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" LDCONFIG=true -C $(@D) install
|
||||
endef
|
||||
|
||||
define LUAJIT_INSTALL_SYMLINK
|
||||
ln -fs luajit $(TARGET_DIR)/usr/bin/lua
|
||||
endef
|
||||
LUAJIT_POST_INSTALL_TARGET_HOOKS += LUAJIT_INSTALL_SYMLINK
|
||||
|
||||
# host-efl package needs host-luajit to be linked dynamically.
|
||||
define HOST_LUAJIT_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) PREFIX="$(HOST_DIR)" BUILDMODE=dynamic \
|
||||
TARGET_LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
XCFLAGS="$(LUAJIT_XCFLAGS)" \
|
||||
-C $(@D) amalg
|
||||
endef
|
||||
|
||||
define HOST_LUAJIT_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) PREFIX="$(HOST_DIR)" LDCONFIG=true -C $(@D) install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user