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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to