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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
