You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "jturnsek (via GitHub)" <gi...@apache.org> on 2023/03/12 21:04:13 UTC
[GitHub] [nuttx-apps] jturnsek opened a new pull request, #1658: Initial LuaJIT interpreter load
jturnsek opened a new pull request, #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658
## Summary
LuaJIT is Lua interpreter and Just-In-Time compiler. Originally it is not supporting Thumb instruction set (which all Cortex M processors are using), thus this PR is introducing ARMv7-M instruction set for LuaJIT. Because LuaJIT relies heavily on double precision floating point numbers, DFP unit is required. It has also Soft FPU configuration, but it was not tested on Cortex M devices.
Original LuaJIT uses MMU for machine code and Lua object memory allocation, but with NuttX configuration I have introduced two MM heap regions: one in ITCM for hotloop traces allocation, and one in RAM for Lua object allocation. All allocations are done with fixed size chunks, because LuaJIT is using its own heap allocation algorithm. MCode allocations are 8KB and object allocations are 32KB long. DTCM is used for standard data and heap.
## Impact
## Testing
LuaJIT was tested on imxrt1064-evk board with the following configuration:
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="imxrt1064-evk"
CONFIG_ARCH_BOARD_IMXRT1064_EVK=y
CONFIG_ARCH_CHIP="imxrt"
CONFIG_ARCH_CHIP_IMXRT=y
CONFIG_ARCH_CHIP_MIMXRT1064DVL6A=y
CONFIG_ARCH_FLOAT_H=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARMV7M_BASEPRI_WAR=y
CONFIG_ARMV7M_DCACHE=y
CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
CONFIG_ARMV7M_DTCM=y
CONFIG_ARMV7M_ICACHE=y
CONFIG_ARMV7M_ITCM=y
CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BOARD_LOOPSPERMSEC=104926
CONFIG_BUILTIN=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_GPIO=y
CONFIG_DEV_GPIO_NSIGNALS=20
CONFIG_FS_LITTLEFS=y
CONFIG_FS_PROCFS=y
CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_IMXRT_DTCM=256
CONFIG_IMXRT_FLEXSPI1=y
CONFIG_IMXRT_LPUART1=y
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INIT_STACKSIZE=4096
CONFIG_INTELHEX_BINARY=y
CONFIG_INTERPRETERS_LUAJIT=y
CONFIG_LIBC_DLFCN=y
CONFIG_LIBC_EXECFUNCS=y
CONFIG_LIBC_LOCALE=y
CONFIG_LPUART1_BAUD=9600
CONFIG_LPUART1_SERIAL_CONSOLE=y
CONFIG_MTD=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_NSH_VARS=y
CONFIG_PIPES=y
CONFIG_PRIORITY_INHERITANCE=y
CONFIG_RAM_SIZE=262144
CONFIG_RAM_START=0x20000000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_READLINE_TABCOMPLETION=y
CONFIG_SERIAL_TERMIOS=y
CONFIG_SIG_DEFAULT=y
CONFIG_SIG_SIGALRM_ACTION=y
CONFIG_SIG_SIGPIPE_ACTION=y
CONFIG_SIG_SIGPROF_ACTION=y
CONFIG_SIG_SIGUSR1_ACTION=y
CONFIG_SIG_SIGUSR2_ACTION=y
CONFIG_START_DAY=14
CONFIG_START_MONTH=3
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_POPEN=y
CONFIG_SYSTEM_SYSTEM=y
CONFIG_SYSTEM_VI=y
CONFIG_TTY_SIGINT=y
CONFIG_TTY_SIGTSTP=y
WARNING: Original linker script flash.ld was changed to use dtcm, instead of sram. Following memory allocation was used: 128KB ITCM, 256KB DTCM, 640KB OCRAM.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1133484255
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
Review Comment:
__ARM_ARCH_7M__ is the main define to bring ARMv7-M stuff into LuaJIT. I am afraid it is crucial. Without it, LuaJIT woul compile with ARM instruction set, instead of Thumb. I know NuttX can run on high end CPUs with ARM instruction set, but all those CPUs support also Thumb mode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1135061748
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
Review Comment:
> can we sort file name to help verify with the package
What do you mean by that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1135061748
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
Review Comment:
> can we sort file name to help verify with the package
What do you mean by that? Single file per line, alphabeticaly arranged?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1135066496
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
Review Comment:
single or multiple file per line is fine, but the file name is alphabeticaly arranged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#issuecomment-1465911105
> could you provide a patch to make both side happy?
What was wrong with plain old #define UNUSED(x) ((void)(x))?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1135067250
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
+LIB_VMDEFP= $(LIB_VMDEF)
+
+ALL_T= $(MINILUA_BIN) $(MINILUA_BIN)
+ALL_HDRGEN= $(LUAJIT_UNPACK)/src/lj_bcdef.h $(LUAJIT_UNPACK)/src/lj_ffdef.h $(LUAJIT_UNPACK)/src/lj_libdef.h $(LUAJIT_UNPACK)/src/lj_recdef.h $(LUAJIT_UNPACK)/src/lj_folddef.h
+ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) $(LIB_VMDEFP)
+
+HOST_OBJS = $(MINILUA_O) $(BUILDVM_O)
+
+LJLIB_O= $(LUAJIT_UNPACK)/src/lib_base.o $(LUAJIT_UNPACK)/src/lib_math.o $(LUAJIT_UNPACK)/src/lib_bit.o $(LUAJIT_UNPACK)/src/lib_string.o $(LUAJIT_UNPACK)/src/lib_table.o $(LUAJIT_UNPACK)/src/lib_io.o $(LUAJIT_UNPACK)/src/lib_os.o $(LUAJIT_UNPACK)/src/lib_package.o $(LUAJIT_UNPACK)/src/lib_debug.o $(LUAJIT_UNPACK)/src/lib_jit.o $(LUAJIT_UNPACK)/src/lib_ffi.o $(LUAJIT_UNPACK)/src/lib_buffer.o
+
+LJLIB_C= $(LJLIB_O:.o=.c)
+
+.NOTPARALLEL:
+
+$(MINILUA_BIN): $(MINILUA_O)
+ @echo "HOSTLINK $@"
+ $(Q) $(HOSTCC) -m32 -o $@ $(MINILUA_O) $(HOSTLDFLAGS)
+
+$(LUAJIT_UNPACK)/src/host/buildvm_arch.h: $(DASM_DASC) $(MINILUA_BIN) $(LUAJIT_UNPACK)/src/lj_arch.h $(LUAJIT_UNPACK)/src/lua.h $(LUAJIT_UNPACK)/src/luaconf.h
+ @echo "DYNASM $@"
+ $(Q)$(MINILUA_BIN) $(LUAJIT_UNPACK)/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ $(DASM_DASC)
+
+$(BUILDVM_BIN): $(BUILDVM_O)
+ @echo "HOSTLINK $@"
+ $(Q)$(HOSTCC) -m32 -o $@ $(BUILDVM_O)
+
+$(LJVM_S): $(BUILDVM_BIN)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m elfasm -o $@
+
+$(LUAJIT_UNPACK)/src/lj_bcdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m bcdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_ffdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m ffdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_libdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m libdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_recdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m recdef -o $@ $(LJLIB_C)
+
+$(LIB_VMDEF): $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m vmdef -o $(LIB_VMDEFP) $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_folddef.h: $(BUILDVM_BIN) $(LUAJIT_UNPACK)/src/lj_opt_fold.c
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m folddef -o $@ $(LUAJIT_UNPACK)/src/lj_opt_fold.c
+
+$(HOST_OBJS): %.o: %.c
+ @echo "CC: $<"
+ $(Q) $(HOSTCC) -m32 -c $(HOSTCFLAGS) $< -o $@
Review Comment:
Ok, it's fine if host LuaJIT tool require 32bit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1133484255
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
Review Comment:
__ARM_ARCH_7M__ is the main define to bring ARMv7-M stuff into LuaJIT. I am afraid it is crucial. Without it, LuaJIT would compile with ARM instruction set, instead of Thumb. I know NuttX can run on high end CPUs with ARM instruction set, but all those CPUs support also Thumb mode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1135032230
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
Review Comment:
I am not so sure if it is wise to change it to thumb, because ARMv7-M is an architecture supporting thumb formatting. While other architectures like ARMv4, v5, v6 are also supporting Thumb, but not all of the instructions. LuaJIT is using a substantial part of Thumb2 instruction set, thus older architectures would not work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1134367551
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
+LIB_VMDEFP= $(LIB_VMDEF)
+
+ALL_T= $(MINILUA_BIN) $(MINILUA_BIN)
+ALL_HDRGEN= $(LUAJIT_UNPACK)/src/lj_bcdef.h $(LUAJIT_UNPACK)/src/lj_ffdef.h $(LUAJIT_UNPACK)/src/lj_libdef.h $(LUAJIT_UNPACK)/src/lj_recdef.h $(LUAJIT_UNPACK)/src/lj_folddef.h
+ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) $(LIB_VMDEFP)
+
+HOST_OBJS = $(MINILUA_O) $(BUILDVM_O)
+
+LJLIB_O= $(LUAJIT_UNPACK)/src/lib_base.o $(LUAJIT_UNPACK)/src/lib_math.o $(LUAJIT_UNPACK)/src/lib_bit.o $(LUAJIT_UNPACK)/src/lib_string.o $(LUAJIT_UNPACK)/src/lib_table.o $(LUAJIT_UNPACK)/src/lib_io.o $(LUAJIT_UNPACK)/src/lib_os.o $(LUAJIT_UNPACK)/src/lib_package.o $(LUAJIT_UNPACK)/src/lib_debug.o $(LUAJIT_UNPACK)/src/lib_jit.o $(LUAJIT_UNPACK)/src/lib_ffi.o $(LUAJIT_UNPACK)/src/lib_buffer.o
+
+LJLIB_C= $(LJLIB_O:.o=.c)
+
+.NOTPARALLEL:
+
+$(MINILUA_BIN): $(MINILUA_O)
+ @echo "HOSTLINK $@"
+ $(Q) $(HOSTCC) -m32 -o $@ $(MINILUA_O) $(HOSTLDFLAGS)
+
+$(LUAJIT_UNPACK)/src/host/buildvm_arch.h: $(DASM_DASC) $(MINILUA_BIN) $(LUAJIT_UNPACK)/src/lj_arch.h $(LUAJIT_UNPACK)/src/lua.h $(LUAJIT_UNPACK)/src/luaconf.h
+ @echo "DYNASM $@"
+ $(Q)$(MINILUA_BIN) $(LUAJIT_UNPACK)/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ $(DASM_DASC)
+
+$(BUILDVM_BIN): $(BUILDVM_O)
+ @echo "HOSTLINK $@"
+ $(Q)$(HOSTCC) -m32 -o $@ $(BUILDVM_O)
+
+$(LJVM_S): $(BUILDVM_BIN)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m elfasm -o $@
+
+$(LUAJIT_UNPACK)/src/lj_bcdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m bcdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_ffdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m ffdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_libdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m libdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_recdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m recdef -o $@ $(LJLIB_C)
+
+$(LIB_VMDEF): $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m vmdef -o $(LIB_VMDEFP) $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_folddef.h: $(BUILDVM_BIN) $(LUAJIT_UNPACK)/src/lj_opt_fold.c
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m folddef -o $@ $(LUAJIT_UNPACK)/src/lj_opt_fold.c
Review Comment:
let's use $(ECHO_BEGIN) and $(ECHO_END) from https://github.com/apache/nuttx/pull/8378 for all host rules
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
Review Comment:
can we sort file name to help verify with the package
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
Review Comment:
```suggestion
CFLAGS += -DLUA_ROOT=CONFIG_LIBC_HOMEDIR
```
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
+LIB_VMDEFP= $(LIB_VMDEF)
Review Comment:
```suggestion
LIB_VMDEFP = $(LIB_VMDEF)
```
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
Review Comment:
```suggestion
LJVM_S = $(LUAJIT_UNPACK)/src/lj_vm.S
```
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
+LIB_VMDEFP= $(LIB_VMDEF)
+
+ALL_T= $(MINILUA_BIN) $(MINILUA_BIN)
+ALL_HDRGEN= $(LUAJIT_UNPACK)/src/lj_bcdef.h $(LUAJIT_UNPACK)/src/lj_ffdef.h $(LUAJIT_UNPACK)/src/lj_libdef.h $(LUAJIT_UNPACK)/src/lj_recdef.h $(LUAJIT_UNPACK)/src/lj_folddef.h
Review Comment:
add space before =
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(Q) echo "Downloading $(LUAJIT_TARBALL)"
+ $(Q) curl -O -L $(LUAJIT_URL)
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS=
+DASM_FLAGS+= -D ENDIAN_LE
+DASM_FLAGS+= -D JIT
+DASM_FLAGS+= -D FFI
+DASM_FLAGS+= -D DUALNUM
+DASM_FLAGS+= -D FPU
+DASM_FLAGS+= -D HFABI
+DASM_FLAGS+= -D NO_UNWIND
+DASM_FLAGS+= -D VER=70
+DASM_ARCH= armv7m
+
+MINILUA_O= $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O= $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
Review Comment:
let's sort the argument
```suggestion
HOSTCFLAGS += -DLJ_ABI_SOFTFP=0 -DLJ_ARCH_HASFPU=1 -DLUAJIT_DISABLE_PROFILE -DLUAJIT_NO_UNWIND -DLUAJIT_TARGET=LUAJIT_ARCH_arm -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host
```
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
+LIB_VMDEFP= $(LIB_VMDEF)
+
+ALL_T= $(MINILUA_BIN) $(MINILUA_BIN)
+ALL_HDRGEN= $(LUAJIT_UNPACK)/src/lj_bcdef.h $(LUAJIT_UNPACK)/src/lj_ffdef.h $(LUAJIT_UNPACK)/src/lj_libdef.h $(LUAJIT_UNPACK)/src/lj_recdef.h $(LUAJIT_UNPACK)/src/lj_folddef.h
+ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) $(LIB_VMDEFP)
+
+HOST_OBJS = $(MINILUA_O) $(BUILDVM_O)
+
+LJLIB_O= $(LUAJIT_UNPACK)/src/lib_base.o $(LUAJIT_UNPACK)/src/lib_math.o $(LUAJIT_UNPACK)/src/lib_bit.o $(LUAJIT_UNPACK)/src/lib_string.o $(LUAJIT_UNPACK)/src/lib_table.o $(LUAJIT_UNPACK)/src/lib_io.o $(LUAJIT_UNPACK)/src/lib_os.o $(LUAJIT_UNPACK)/src/lib_package.o $(LUAJIT_UNPACK)/src/lib_debug.o $(LUAJIT_UNPACK)/src/lib_jit.o $(LUAJIT_UNPACK)/src/lib_ffi.o $(LUAJIT_UNPACK)/src/lib_buffer.o
+
+LJLIB_C= $(LJLIB_O:.o=.c)
+
+.NOTPARALLEL:
+
+$(MINILUA_BIN): $(MINILUA_O)
+ @echo "HOSTLINK $@"
+ $(Q) $(HOSTCC) -m32 -o $@ $(MINILUA_O) $(HOSTLDFLAGS)
+
+$(LUAJIT_UNPACK)/src/host/buildvm_arch.h: $(DASM_DASC) $(MINILUA_BIN) $(LUAJIT_UNPACK)/src/lj_arch.h $(LUAJIT_UNPACK)/src/lua.h $(LUAJIT_UNPACK)/src/luaconf.h
+ @echo "DYNASM $@"
+ $(Q)$(MINILUA_BIN) $(LUAJIT_UNPACK)/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ $(DASM_DASC)
+
+$(BUILDVM_BIN): $(BUILDVM_O)
+ @echo "HOSTLINK $@"
+ $(Q)$(HOSTCC) -m32 -o $@ $(BUILDVM_O)
+
+$(LJVM_S): $(BUILDVM_BIN)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m elfasm -o $@
+
+$(LUAJIT_UNPACK)/src/lj_bcdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m bcdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_ffdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m ffdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_libdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m libdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_recdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m recdef -o $@ $(LJLIB_C)
+
+$(LIB_VMDEF): $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
Review Comment:
```suggestion
@echo "BUILDVM $@"
```
remove all extra space before $@
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
Review Comment:
```suggestion
BUILDVM_O += $(LUAJIT_UNPACK)/src/host/buildvm.o
BUILDVM_O += $(LUAJIT_UNPACK)/src/host/buildvm_asm.o
```
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
+LIB_VMDEFP= $(LIB_VMDEF)
+
+ALL_T= $(MINILUA_BIN) $(MINILUA_BIN)
+ALL_HDRGEN= $(LUAJIT_UNPACK)/src/lj_bcdef.h $(LUAJIT_UNPACK)/src/lj_ffdef.h $(LUAJIT_UNPACK)/src/lj_libdef.h $(LUAJIT_UNPACK)/src/lj_recdef.h $(LUAJIT_UNPACK)/src/lj_folddef.h
+ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) $(LIB_VMDEFP)
+
+HOST_OBJS = $(MINILUA_O) $(BUILDVM_O)
+
+LJLIB_O= $(LUAJIT_UNPACK)/src/lib_base.o $(LUAJIT_UNPACK)/src/lib_math.o $(LUAJIT_UNPACK)/src/lib_bit.o $(LUAJIT_UNPACK)/src/lib_string.o $(LUAJIT_UNPACK)/src/lib_table.o $(LUAJIT_UNPACK)/src/lib_io.o $(LUAJIT_UNPACK)/src/lib_os.o $(LUAJIT_UNPACK)/src/lib_package.o $(LUAJIT_UNPACK)/src/lib_debug.o $(LUAJIT_UNPACK)/src/lib_jit.o $(LUAJIT_UNPACK)/src/lib_ffi.o $(LUAJIT_UNPACK)/src/lib_buffer.o
+
+LJLIB_C= $(LJLIB_O:.o=.c)
+
+.NOTPARALLEL:
+
+$(MINILUA_BIN): $(MINILUA_O)
+ @echo "HOSTLINK $@"
+ $(Q) $(HOSTCC) -m32 -o $@ $(MINILUA_O) $(HOSTLDFLAGS)
+
+$(LUAJIT_UNPACK)/src/host/buildvm_arch.h: $(DASM_DASC) $(MINILUA_BIN) $(LUAJIT_UNPACK)/src/lj_arch.h $(LUAJIT_UNPACK)/src/lua.h $(LUAJIT_UNPACK)/src/luaconf.h
+ @echo "DYNASM $@"
+ $(Q)$(MINILUA_BIN) $(LUAJIT_UNPACK)/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ $(DASM_DASC)
+
+$(BUILDVM_BIN): $(BUILDVM_O)
+ @echo "HOSTLINK $@"
+ $(Q)$(HOSTCC) -m32 -o $@ $(BUILDVM_O)
+
+$(LJVM_S): $(BUILDVM_BIN)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m elfasm -o $@
+
+$(LUAJIT_UNPACK)/src/lj_bcdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m bcdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_ffdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m ffdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_libdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m libdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_recdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m recdef -o $@ $(LJLIB_C)
+
+$(LIB_VMDEF): $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m vmdef -o $(LIB_VMDEFP) $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_folddef.h: $(BUILDVM_BIN) $(LUAJIT_UNPACK)/src/lj_opt_fold.c
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m folddef -o $@ $(LUAJIT_UNPACK)/src/lj_opt_fold.c
+
+$(HOST_OBJS): %.o: %.c
+ @echo "CC: $<"
+ $(Q) $(HOSTCC) -m32 -c $(HOSTCFLAGS) $< -o $@
Review Comment:
remove -m32?
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
Review Comment:
```suggestion
DASM_DASC = $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
```
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
+LIB_VMDEFP= $(LIB_VMDEF)
+
+ALL_T= $(MINILUA_BIN) $(MINILUA_BIN)
+ALL_HDRGEN= $(LUAJIT_UNPACK)/src/lj_bcdef.h $(LUAJIT_UNPACK)/src/lj_ffdef.h $(LUAJIT_UNPACK)/src/lj_libdef.h $(LUAJIT_UNPACK)/src/lj_recdef.h $(LUAJIT_UNPACK)/src/lj_folddef.h
+ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) $(LIB_VMDEFP)
+
+HOST_OBJS = $(MINILUA_O) $(BUILDVM_O)
+
+LJLIB_O= $(LUAJIT_UNPACK)/src/lib_base.o $(LUAJIT_UNPACK)/src/lib_math.o $(LUAJIT_UNPACK)/src/lib_bit.o $(LUAJIT_UNPACK)/src/lib_string.o $(LUAJIT_UNPACK)/src/lib_table.o $(LUAJIT_UNPACK)/src/lib_io.o $(LUAJIT_UNPACK)/src/lib_os.o $(LUAJIT_UNPACK)/src/lib_package.o $(LUAJIT_UNPACK)/src/lib_debug.o $(LUAJIT_UNPACK)/src/lib_jit.o $(LUAJIT_UNPACK)/src/lib_ffi.o $(LUAJIT_UNPACK)/src/lib_buffer.o
Review Comment:
```suggestion
LJLIB_O += $(LUAJIT_UNPACK)/src/lib_base.o
LJLIB_O += $(LUAJIT_UNPACK)/src/lib_math.o
```
```
and sort by file name
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
Review Comment:
```suggestion
LIB_VMDEF = $(LUAJIT_UNPACK)/src/jit/vmdef.lua
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1135044057
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,170 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+DASM_ARCH = armv7m
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
+HOSTLDFLAGS += -lm
+
+MINILUA_BIN = $(LUAJIT_UNPACK)/src/host/minilua
+BUILDVM_BIN = $(LUAJIT_UNPACK)/src/host/buildvm
+
+LJVM_S= $(LUAJIT_UNPACK)/src/lj_vm.S
+
+LIB_VMDEF= $(LUAJIT_UNPACK)/src/jit/vmdef.lua
+LIB_VMDEFP= $(LIB_VMDEF)
+
+ALL_T= $(MINILUA_BIN) $(MINILUA_BIN)
+ALL_HDRGEN= $(LUAJIT_UNPACK)/src/lj_bcdef.h $(LUAJIT_UNPACK)/src/lj_ffdef.h $(LUAJIT_UNPACK)/src/lj_libdef.h $(LUAJIT_UNPACK)/src/lj_recdef.h $(LUAJIT_UNPACK)/src/lj_folddef.h
+ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) $(LIB_VMDEFP)
+
+HOST_OBJS = $(MINILUA_O) $(BUILDVM_O)
+
+LJLIB_O= $(LUAJIT_UNPACK)/src/lib_base.o $(LUAJIT_UNPACK)/src/lib_math.o $(LUAJIT_UNPACK)/src/lib_bit.o $(LUAJIT_UNPACK)/src/lib_string.o $(LUAJIT_UNPACK)/src/lib_table.o $(LUAJIT_UNPACK)/src/lib_io.o $(LUAJIT_UNPACK)/src/lib_os.o $(LUAJIT_UNPACK)/src/lib_package.o $(LUAJIT_UNPACK)/src/lib_debug.o $(LUAJIT_UNPACK)/src/lib_jit.o $(LUAJIT_UNPACK)/src/lib_ffi.o $(LUAJIT_UNPACK)/src/lib_buffer.o
+
+LJLIB_C= $(LJLIB_O:.o=.c)
+
+.NOTPARALLEL:
+
+$(MINILUA_BIN): $(MINILUA_O)
+ @echo "HOSTLINK $@"
+ $(Q) $(HOSTCC) -m32 -o $@ $(MINILUA_O) $(HOSTLDFLAGS)
+
+$(LUAJIT_UNPACK)/src/host/buildvm_arch.h: $(DASM_DASC) $(MINILUA_BIN) $(LUAJIT_UNPACK)/src/lj_arch.h $(LUAJIT_UNPACK)/src/lua.h $(LUAJIT_UNPACK)/src/luaconf.h
+ @echo "DYNASM $@"
+ $(Q)$(MINILUA_BIN) $(LUAJIT_UNPACK)/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ $(DASM_DASC)
+
+$(BUILDVM_BIN): $(BUILDVM_O)
+ @echo "HOSTLINK $@"
+ $(Q)$(HOSTCC) -m32 -o $@ $(BUILDVM_O)
+
+$(LJVM_S): $(BUILDVM_BIN)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m elfasm -o $@
+
+$(LUAJIT_UNPACK)/src/lj_bcdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m bcdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_ffdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m ffdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_libdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m libdef -o $@ $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_recdef.h: $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m recdef -o $@ $(LJLIB_C)
+
+$(LIB_VMDEF): $(BUILDVM_BIN) $(LJLIB_C)
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m vmdef -o $(LIB_VMDEFP) $(LJLIB_C)
+
+$(LUAJIT_UNPACK)/src/lj_folddef.h: $(BUILDVM_BIN) $(LUAJIT_UNPACK)/src/lj_opt_fold.c
+ @echo "BUILDVM $@"
+ $(Q)$(BUILDVM_BIN) -m folddef -o $@ $(LUAJIT_UNPACK)/src/lj_opt_fold.c
+
+$(HOST_OBJS): %.o: %.c
+ @echo "CC: $<"
+ $(Q) $(HOSTCC) -m32 -c $(HOSTCFLAGS) $< -o $@
Review Comment:
Why? In LuaJIT documentation is written somewhere, that host application must be built with 32 bit support, when target is 32 bit, otherwise problems. Remember that host application builds buildvm executable, responsible to parse and prepare generated files for the LuaJIT assembler, thus it needs to be on the same page as target is.
"The GNU Makefile-based build system allows cross-compiling on any host for any supported target, as long as both architectures have the same pointer size. If you want to cross-compile to any 32 bit target on an x64 OS, you need to install the multilib development package (e.g. libc6-dev-i386 on Debian/Ubuntu) and build a 32 bit host part (HOST_CC="gcc -m32")."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#issuecomment-1465982636
see the case here: https://github.com/apache/nuttx/pull/6779
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 merged pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1134354397
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
Review Comment:
so, it's better to change to thumb instead armv7m. BTW, since all compiler auto define __thumb__ or __thumb2__, you can check these macros in code directly without -D in Makefile.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1139044552
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,272 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c
+CSRCS += lib_base.c
+CSRCS += lib_bit.c
+CSRCS += lib_buffer.c
+CSRCS += lib_debug.c
+CSRCS += lib_ffi.c
+CSRCS += lib_init.c
+CSRCS += lib_io.c
+CSRCS += lib_jit.c
+CSRCS += lib_math.c
+CSRCS += lib_os.c
+CSRCS += lib_package.c
+CSRCS += lib_string.c
+CSRCS += lib_table.c
+CSRCS += lj_alloc.c
+CSRCS += lj_api.c
+CSRCS += lj_asm.c
+CSRCS += lj_assert.c
+CSRCS += lj_bc.c
+CSRCS += lj_bcread.c
+CSRCS += lj_bcwrite.c
+CSRCS += lj_buf.c
+CSRCS += lj_carith.c
+CSRCS += lj_ccall.c
+CSRCS += lj_ccallback.c
+CSRCS += lj_cconv.c
+CSRCS += lj_cdata.c
+CSRCS += lj_char.c
+CSRCS += lj_clib.c
+CSRCS += lj_cparse.c
+CSRCS += lj_crecord.c
+CSRCS += lj_ctype.c
+CSRCS += lj_debug.c
+CSRCS += lj_dispatch.c
+CSRCS += lj_err.c
+CSRCS += lj_ffrecord.c
+CSRCS += lj_func.c
+CSRCS += lj_gc.c
+CSRCS += lj_gdbjit.c
+CSRCS += lj_ir.c
+CSRCS += lj_lex.c
+CSRCS += lj_lib.c
+CSRCS += lj_load.c
+CSRCS += lj_mcode.c
+CSRCS += lj_meta.c
+CSRCS += lj_obj.c
+CSRCS += lj_opt_dce.c
+CSRCS += lj_opt_fold.c
+CSRCS += lj_opt_loop.c
+CSRCS += lj_opt_mem.c
+CSRCS += lj_opt_narrow.c
+CSRCS += lj_opt_sink.c
+CSRCS += lj_opt_split.c
+CSRCS += lj_parse.c
+CSRCS += lj_prng.c
+CSRCS += lj_profile.c
+CSRCS += lj_record.c
+CSRCS += lj_serialize.c
+CSRCS += lj_snap.c
+CSRCS += lj_state.c
+CSRCS += lj_str.c
+CSRCS += lj_strfmt.c
+CSRCS += lj_strfmt_num.c
+CSRCS += lj_strscan.c
+CSRCS += lj_tab.c
+CSRCS += lj_trace.c
+CSRCS += lj_udata.c
+CSRCS += lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+
+CFLAGS += -fomit-frame-pointer
+CFLAGS += -fno-short-enums
+CFLAGS += -D__ARM_ARCH_7M__
+CFLAGS += -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_NO_UNWIND
+CFLAGS += -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0
+CFLAGS += -DLUA_ROOT=CONFIG_LIBC_HOMEDIR
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(ECHO_BEGIN) "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+ $(ECHO_END)
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_ARCH = armv7m
+
+DASM_DASC = $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
Review Comment:
change to space and algin
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1133394828
##########
interpreters/luajit/Make.defs:
##########
@@ -0,0 +1,28 @@
+############################################################################
+# apps/interpreters/luajit/Make.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifneq ($(CONFIG_INTERPRETERS_LUAJIT),)
+CONFIGURED_APPS += $(APPDIR)/interpreters/luajit
+
+CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/interpreters/luajit/LuaJIT/src
Review Comment:
it's better to move the private search path to Makefile to avoid the conflict with other project potentially.
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(Q) echo "Downloading $(LUAJIT_TARBALL)"
+ $(Q) curl -O -L $(LUAJIT_URL)
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS=
Review Comment:
remove
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
Review Comment:
should we let Toolchain.defs/Make.defs control `-fomit-frame-pointer` and `-fno-short-enums`?
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(Q) echo "Downloading $(LUAJIT_TARBALL)"
+ $(Q) curl -O -L $(LUAJIT_URL)
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS=
+DASM_FLAGS+= -D ENDIAN_LE
+DASM_FLAGS+= -D JIT
+DASM_FLAGS+= -D FFI
+DASM_FLAGS+= -D DUALNUM
+DASM_FLAGS+= -D FPU
+DASM_FLAGS+= -D HFABI
+DASM_FLAGS+= -D NO_UNWIND
+DASM_FLAGS+= -D VER=70
+DASM_ARCH= armv7m
+
+MINILUA_O= $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O= $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
Review Comment:
can we remove -D__ARM_ARCH_7M__=1?
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(Q) echo "Downloading $(LUAJIT_TARBALL)"
+ $(Q) curl -O -L $(LUAJIT_URL)
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS=
+DASM_FLAGS+= -D ENDIAN_LE
Review Comment:
remove space after -D
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(Q) echo "Downloading $(LUAJIT_TARBALL)"
+ $(Q) curl -O -L $(LUAJIT_URL)
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
Review Comment:
let's use the new command download: https://github.com/apache/nuttx/pull/8759
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(Q) echo "Downloading $(LUAJIT_TARBALL)"
+ $(Q) curl -O -L $(LUAJIT_URL)
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS=
+DASM_FLAGS+= -D ENDIAN_LE
+DASM_FLAGS+= -D JIT
+DASM_FLAGS+= -D FFI
+DASM_FLAGS+= -D DUALNUM
+DASM_FLAGS+= -D FPU
+DASM_FLAGS+= -D HFABI
+DASM_FLAGS+= -D NO_UNWIND
+DASM_FLAGS+= -D VER=70
+DASM_ARCH= armv7m
+
+MINILUA_O= $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O= $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
Review Comment:
align to the first line
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
Review Comment:
can we avoid the hardcode _ARM_ARCH_7M__?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1133541581
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
Review Comment:
Lets leave them in Makefile, because are related to LuaJIT compiling.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1133540443
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(Q) echo "Downloading $(LUAJIT_TARBALL)"
+ $(Q) curl -O -L $(LUAJIT_URL)
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS=
+DASM_FLAGS+= -D ENDIAN_LE
Review Comment:
This space after -D is required, because those flags are feed to minilua program, which does its own parsing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1133484255
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
Review Comment:
__ARM_ARCH_7M__ is the main define to bring ARMv/-M stuff into LuaJIT. I am afraid it is crucial. Without it, LuaJIT woul compile with ARM instruction set, instead of Thumb. I know NuttX can run on high end CPUs with ARM instruction set, but all those CPUs support also Thumb mode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#issuecomment-1465876814
> @xiaoxiang781216 BTW, regarding the UNUSED macro, which was not working with LuaJIT code. I have undefed the macro in LuaJIT patch and then the builtin macro in LuaJIT is used. But for the future reference, I think the UNUSED macro in NuttX compiler.h is wrong. If it is not working for LuaJIT, it might not work for other libraries taken from Linux world.
could you provide a patch to make both side happy?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#issuecomment-1465740313
@jturnsek do you have plan upstream amv7m support to luajit?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1135036310
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,172 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c lib_base.c lib_bit.c lib_buffer.c lib_debug.c
+CSRCS += lib_ffi.c lib_init.c lib_io.c lib_jit.c lib_math.c
+CSRCS += lib_os.c lib_package.c lib_string.c lib_table.c
+CSRCS += lj_alloc.c lj_api.c lj_asm.c lj_assert.c lj_bc.c
+CSRCS += lj_bcread.c lj_bcwrite.c lj_buf.c lj_carith.c lj_ccall.c
+CSRCS += lj_ccallback.c lj_cconv.c lj_cdata.c lj_char.c lj_clib.c
+CSRCS += lj_cparse.c lj_crecord.c lj_ctype.c lj_debug.c lj_dispatch.c
+CSRCS += lj_err.c lj_ffrecord.c lj_func.c lj_gc.c lj_gdbjit.c
+CSRCS += lj_ir.c lj_lex.c lj_lib.c lj_load.c lj_mcode.c lj_meta.c
+CSRCS += lj_obj.c lj_opt_dce.c lj_opt_fold.c lj_opt_loop.c
+CSRCS += lj_opt_mem.c lj_opt_narrow.c lj_opt_sink.c lj_opt_split.c
+CSRCS += lj_parse.c lj_prng.c lj_profile.c lj_record.c lj_serialize.c
+CSRCS += lj_snap.c lj_state.c lj_str.c lj_strfmt.c lj_strfmt_num.c
+CSRCS += lj_strscan.c lj_tab.c lj_trace.c lj_udata.c lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+CFLAGS += -fomit-frame-pointer -fno-short-enums -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -D__ARM_ARCH_7M__ -DLUAJIT_NO_UNWIND -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0 -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUA_ROOT=\"/home\"
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(Q) echo "Downloading $(LUAJIT_TARBALL)"
+ $(Q) curl -O -L $(LUAJIT_URL)
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(Q) echo "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_DASC= $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS=
+DASM_FLAGS+= -D ENDIAN_LE
+DASM_FLAGS+= -D JIT
+DASM_FLAGS+= -D FFI
+DASM_FLAGS+= -D DUALNUM
+DASM_FLAGS+= -D FPU
+DASM_FLAGS+= -D HFABI
+DASM_FLAGS+= -D NO_UNWIND
+DASM_FLAGS+= -D VER=70
+DASM_ARCH= armv7m
+
+MINILUA_O= $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O= $(LUAJIT_UNPACK)/src/host/buildvm.o $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_peobj.o $(LUAJIT_UNPACK)/src/host/buildvm_lib.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_fold.o
+
+HOSTCFLAGS += -DLUAJIT_DISABLE_PROFILE -I$(LUAJIT_UNPACK)/src -I$(LUAJIT_UNPACK)/src/host -D__ARM_ARCH_7M__=1 -DLUAJIT_TARGET=LUAJIT_ARCH_arm -DLJ_ARCH_HASFPU=1 -DLJ_ABI_SOFTFP=0 -DLUAJIT_NO_UNWIND
Review Comment:
-D__ARM_ARCH_7M__=1 is neccessary to tell the dynamic assembler how to work with ARMv7-M architecture.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#issuecomment-1467440451
> see the case here: [apache/nuttx#6779](https://github.com/apache/nuttx/pull/6779)
I would say let that library handle the special case when structure is passed as parameter to the function and leave the UNUSED macro as it was. One macro can never satisfy all the cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1658: Initial LuaJIT interpreter load
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#discussion_r1139046006
##########
interpreters/luajit/Makefile:
##########
@@ -0,0 +1,272 @@
+############################################################################
+# apps/interpreters/luajit/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+LUAJIT_PATCHS ?= $(sort $(wildcard 000*.patch))
+
+LUAJIT_VERSION := $(patsubst "%",%,$(CONFIG_LUAJIT_VERSION))
+LUAJIT_UNPACK = LuaJIT
+LUAJIT_TARBALL = $(LUAJIT_VERSION).tar.gz
+LUAJIT_URL_BASE = https://github.com/LuaJIT/LuaJIT/archive
+LUAJIT_URL = $(LUAJIT_URL_BASE)/$(LUAJIT_TARBALL)
+
+MAINSRC = luajit.c
+
+CSRCS += lib_aux.c
+CSRCS += lib_base.c
+CSRCS += lib_bit.c
+CSRCS += lib_buffer.c
+CSRCS += lib_debug.c
+CSRCS += lib_ffi.c
+CSRCS += lib_init.c
+CSRCS += lib_io.c
+CSRCS += lib_jit.c
+CSRCS += lib_math.c
+CSRCS += lib_os.c
+CSRCS += lib_package.c
+CSRCS += lib_string.c
+CSRCS += lib_table.c
+CSRCS += lj_alloc.c
+CSRCS += lj_api.c
+CSRCS += lj_asm.c
+CSRCS += lj_assert.c
+CSRCS += lj_bc.c
+CSRCS += lj_bcread.c
+CSRCS += lj_bcwrite.c
+CSRCS += lj_buf.c
+CSRCS += lj_carith.c
+CSRCS += lj_ccall.c
+CSRCS += lj_ccallback.c
+CSRCS += lj_cconv.c
+CSRCS += lj_cdata.c
+CSRCS += lj_char.c
+CSRCS += lj_clib.c
+CSRCS += lj_cparse.c
+CSRCS += lj_crecord.c
+CSRCS += lj_ctype.c
+CSRCS += lj_debug.c
+CSRCS += lj_dispatch.c
+CSRCS += lj_err.c
+CSRCS += lj_ffrecord.c
+CSRCS += lj_func.c
+CSRCS += lj_gc.c
+CSRCS += lj_gdbjit.c
+CSRCS += lj_ir.c
+CSRCS += lj_lex.c
+CSRCS += lj_lib.c
+CSRCS += lj_load.c
+CSRCS += lj_mcode.c
+CSRCS += lj_meta.c
+CSRCS += lj_obj.c
+CSRCS += lj_opt_dce.c
+CSRCS += lj_opt_fold.c
+CSRCS += lj_opt_loop.c
+CSRCS += lj_opt_mem.c
+CSRCS += lj_opt_narrow.c
+CSRCS += lj_opt_sink.c
+CSRCS += lj_opt_split.c
+CSRCS += lj_parse.c
+CSRCS += lj_prng.c
+CSRCS += lj_profile.c
+CSRCS += lj_record.c
+CSRCS += lj_serialize.c
+CSRCS += lj_snap.c
+CSRCS += lj_state.c
+CSRCS += lj_str.c
+CSRCS += lj_strfmt.c
+CSRCS += lj_strfmt_num.c
+CSRCS += lj_strscan.c
+CSRCS += lj_tab.c
+CSRCS += lj_trace.c
+CSRCS += lj_udata.c
+CSRCS += lj_vmevent.c
+CSRCS += lj_vmmath.c
+
+ASRCS += lj_vm.S
+
+VPATH += $(LUAJIT_UNPACK)/dynasm
+VPATH += $(LUAJIT_UNPACK)/src
+VPATH += $(LUAJIT_UNPACK)/src/host
+
+CFLAGS += -fomit-frame-pointer
+CFLAGS += -fno-short-enums
+CFLAGS += -D__ARM_ARCH_7M__
+CFLAGS += -DLUAJIT_DISABLE_PROFILE
+CFLAGS += -DLUAJIT_NO_UNWIND
+CFLAGS += -DLUAJIT_OS=LUAJIT_OS_NUTTX
+CFLAGS += -DLUAJIT_SECURITY_MCODE=0
+CFLAGS += -DLUAJIT_SECURITY_PRNG=0
+CFLAGS += -DLUA_ROOT=CONFIG_LIBC_HOMEDIR
+
+PROGNAME = luajit
+PRIORITY = $(CONFIG_LUAJIT_PRIORITY)
+STACKSIZE = $(CONFIG_LUAJIT_STACKSIZE)
+MODULE = $(CONFIG_INTERPRETERS_LUAJIT)
+
+$(LUAJIT_TARBALL):
+ $(call DOWNLOAD,$(LUAJIT_URL_BASE),$(LUAJIT_TARBALL),$(LUAJIT_TARBALL))
+
+$(LUAJIT_UNPACK): $(LUAJIT_TARBALL)
+ $(ECHO_BEGIN) "Unpacking $(LUAJIT_TARBALL) to $(LUAJIT_UNPACK)"
+ $(Q) tar xzvf $(LUAJIT_TARBALL)
+ $(Q) mv LuaJIT-$(LUAJIT_VERSION) $(LUAJIT_UNPACK)
+ $(Q) cat $(LUAJIT_PATCHS) | \
+ patch -s -N -d $(LUAJIT_UNPACK) -p1
+ $(ECHO_END)
+
+$(LUAJIT_UNPACK)/.patch: $(LUAJIT_UNPACK)
+ $(Q) touch $(LUAJIT_UNPACK)/.patch
+
+DASM_ARCH = armv7m
+
+DASM_DASC = $(LUAJIT_UNPACK)/src/vm_armv7m.dasc
+
+DASM_FLAGS += -D ENDIAN_LE
+DASM_FLAGS += -D JIT
+DASM_FLAGS += -D FFI
+DASM_FLAGS += -D DUALNUM
+DASM_FLAGS += -D FPU
+DASM_FLAGS += -D HFABI
+DASM_FLAGS += -D NO_UNWIND
+DASM_FLAGS += -D VER=70
+
+MINILUA_O = $(LUAJIT_UNPACK)/src/host/minilua.o
+
+BUILDVM_O = $(LUAJIT_UNPACK)/src/host/buildvm.o \
+ $(LUAJIT_UNPACK)/src/host/buildvm_asm.o \
Review Comment:
> > see the case here: [apache/nuttx#6779](https://github.com/apache/nuttx/pull/6779)
>
> I would say let that library handle the special case when structure is passed as parameter to the function and leave the UNUSED macro as it was. One macro can never satisfy all the cases. I do not get what an author of cmd_ifconfig did with UNUSED(gip6). If this gip6 is not used in function, it could get thrown out with simple ifdef and not with UNUSED macro. It seems to me that one was abusing UNUSED macro.
Ok, could you provide a patch fix the problem?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#issuecomment-1465782138
> do you have plan upstream amv7m support to luajit?
Uff, yes I have been thinking about it, but not in the near future due to high work load.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] jturnsek commented on pull request #1658: Initial LuaJIT interpreter load
Posted by "jturnsek (via GitHub)" <gi...@apache.org>.
jturnsek commented on PR #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658#issuecomment-1465872336
@xiaoxiang781216 BTW, regarding the UNUSED macro, which was not working with LuaJIT code. I have undefed the macro in LuaJIT patch and then the builtin macro in LuaJIT is used. But for the future reference, I think the UNUSED macro in NuttX compiler.h is wrong. If it is not working for LuaJIT, it might not work for other libraries taken from Linux world.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org