diff options
| -rw-r--r-- | Makefile | 28 | ||||
| -rw-r--r-- | etc/luajit.pc | 2 | ||||
| -rw-r--r-- | src/.gitignore | 2 | ||||
| -rw-r--r-- | src/Makefile | 23 | ||||
| -rw-r--r-- | src/host/buildvm.c | 1 | ||||
| -rw-r--r-- | src/host/genversion.lua | 43 | ||||
| -rw-r--r-- | src/jit/bc.lua | 1 | ||||
| -rw-r--r-- | src/jit/bcsave.lua | 2 | ||||
| -rw-r--r-- | src/jit/dump.lua | 1 | ||||
| -rw-r--r-- | src/jit/v.lua | 1 | ||||
| -rw-r--r-- | src/lib_jit.c | 2 | ||||
| -rw-r--r-- | src/luaconf.h | 2 | ||||
| -rw-r--r-- | src/luajit_rolling.h (renamed from src/luajit.h) | 6 |
13 files changed, 87 insertions, 27 deletions
| @@ -15,10 +15,16 @@ | |||
| 15 | 15 | ||
| 16 | MAJVER= 2 | 16 | MAJVER= 2 |
| 17 | MINVER= 0 | 17 | MINVER= 0 |
| 18 | RELVER= 5 | ||
| 19 | VERSION= $(MAJVER).$(MINVER).$(RELVER) | ||
| 20 | ABIVER= 5.1 | 18 | ABIVER= 5.1 |
| 21 | 19 | ||
| 20 | # LuaJIT uses rolling releases. The release version is based on the time of | ||
| 21 | # the latest git commit. The 'git' command must be available during the build. | ||
| 22 | RELVER= $(shell cat src/luajit_relver.txt 2>/dev/null || : ) | ||
| 23 | # Note: setting it with := doesn't work, since it will change during the build. | ||
| 24 | |||
| 25 | MMVERSION= $(MAJVER).$(MINVER) | ||
| 26 | VERSION= $(MMVERSION).$(RELVER) | ||
| 27 | |||
| 22 | ############################################################################## | 28 | ############################################################################## |
| 23 | # | 29 | # |
| 24 | # Change the installation path as needed. This automatically adjusts | 30 | # Change the installation path as needed. This automatically adjusts |
| @@ -32,10 +38,10 @@ DPREFIX= $(DESTDIR)$(PREFIX) | |||
| 32 | INSTALL_BIN= $(DPREFIX)/bin | 38 | INSTALL_BIN= $(DPREFIX)/bin |
| 33 | INSTALL_LIB= $(DPREFIX)/$(MULTILIB) | 39 | INSTALL_LIB= $(DPREFIX)/$(MULTILIB) |
| 34 | INSTALL_SHARE= $(DPREFIX)/share | 40 | INSTALL_SHARE= $(DPREFIX)/share |
| 35 | INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER) | 41 | INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION) |
| 36 | INSTALL_INC= $(INSTALL_DEFINC) | 42 | INSTALL_INC= $(INSTALL_DEFINC) |
| 37 | 43 | ||
| 38 | INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION) | 44 | INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION) |
| 39 | INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit | 45 | INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit |
| 40 | INSTALL_LMODD= $(INSTALL_SHARE)/lua | 46 | INSTALL_LMODD= $(INSTALL_SHARE)/lua |
| 41 | INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER) | 47 | INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER) |
| @@ -49,10 +55,10 @@ INSTALL_TSYMNAME= luajit | |||
| 49 | INSTALL_ANAME= libluajit-$(ABIVER).a | 55 | INSTALL_ANAME= libluajit-$(ABIVER).a |
| 50 | INSTALL_SOSHORT1= libluajit-$(ABIVER).so | 56 | INSTALL_SOSHORT1= libluajit-$(ABIVER).so |
| 51 | INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER) | 57 | INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER) |
| 52 | INSTALL_SONAME= $(INSTALL_SOSHORT2).$(MINVER).$(RELVER) | 58 | INSTALL_SONAME= libluajit-$(ABIVER).so.$(VERSION) |
| 53 | INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib | 59 | INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib |
| 54 | INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib | 60 | INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib |
| 55 | INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib | 61 | INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(VERSION).dylib |
| 56 | INSTALL_PCNAME= luajit.pc | 62 | INSTALL_PCNAME= luajit.pc |
| 57 | 63 | ||
| 58 | INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME) | 64 | INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME) |
| @@ -77,7 +83,8 @@ INSTALL_F= install -m 0644 | |||
| 77 | UNINSTALL= $(RM) | 83 | UNINSTALL= $(RM) |
| 78 | LDCONFIG= ldconfig -n 2>/dev/null | 84 | LDCONFIG= ldconfig -n 2>/dev/null |
| 79 | SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \ | 85 | SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \ |
| 80 | -e "s|^multilib=.*|multilib=$(MULTILIB)|" | 86 | -e "s|^multilib=.*|multilib=$(MULTILIB)|" \ |
| 87 | -e "s|^relver=.*|relver=$(RELVER)|" | ||
| 81 | ifneq ($(INSTALL_DEFINC),$(INSTALL_INC)) | 88 | ifneq ($(INSTALL_DEFINC),$(INSTALL_INC)) |
| 82 | SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|" | 89 | SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|" |
| 83 | endif | 90 | endif |
| @@ -110,9 +117,9 @@ endif | |||
| 110 | INSTALL_DEP= src/luajit | 117 | INSTALL_DEP= src/luajit |
| 111 | 118 | ||
| 112 | default all $(INSTALL_DEP): | 119 | default all $(INSTALL_DEP): |
| 113 | @echo "==== Building LuaJIT $(VERSION) ====" | 120 | @echo "==== Building LuaJIT $(MMVERSION) ====" |
| 114 | $(MAKE) -C src | 121 | $(MAKE) -C src |
| 115 | @echo "==== Successfully built LuaJIT $(VERSION) ====" | 122 | @echo "==== Successfully built LuaJIT $(MMVERSION) ====" |
| 116 | 123 | ||
| 117 | install: $(INSTALL_DEP) | 124 | install: $(INSTALL_DEP) |
| 118 | @echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ====" | 125 | @echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ====" |
| @@ -150,8 +157,9 @@ uninstall: | |||
| 150 | ############################################################################## | 157 | ############################################################################## |
| 151 | 158 | ||
| 152 | amalg: | 159 | amalg: |
| 153 | @echo "Building LuaJIT $(VERSION)" | 160 | @echo "==== Building LuaJIT $(MMVERSION) (amalgamation) ====" |
| 154 | $(MAKE) -C src amalg | 161 | $(MAKE) -C src amalg |
| 162 | @echo "==== Successfully built LuaJIT $(MMVERSION) (amalgamation) ====" | ||
| 155 | 163 | ||
| 156 | clean: | 164 | clean: |
| 157 | $(MAKE) -C src clean | 165 | $(MAKE) -C src clean |
diff --git a/etc/luajit.pc b/etc/luajit.pc index 9bac3a8b..68f8d5cc 100644 --- a/etc/luajit.pc +++ b/etc/luajit.pc | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # Package information for LuaJIT to be used by pkg-config. | 1 | # Package information for LuaJIT to be used by pkg-config. |
| 2 | majver=2 | 2 | majver=2 |
| 3 | minver=0 | 3 | minver=0 |
| 4 | relver=5 | 4 | relver=ROLLING |
| 5 | version=${majver}.${minver}.${relver} | 5 | version=${majver}.${minver}.${relver} |
| 6 | abiver=5.1 | 6 | abiver=5.1 |
| 7 | 7 | ||
diff --git a/src/.gitignore b/src/.gitignore index fc94e82c..19f2a00e 100644 --- a/src/.gitignore +++ b/src/.gitignore | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | luajit | 1 | luajit |
| 2 | luajit.h | ||
| 3 | luajit_relver.txt | ||
| 2 | lj_bcdef.h | 4 | lj_bcdef.h |
| 3 | lj_ffdef.h | 5 | lj_ffdef.h |
| 4 | lj_libdef.h | 6 | lj_libdef.h |
diff --git a/src/Makefile b/src/Makefile index aac78beb..e6954a95 100644 --- a/src/Makefile +++ b/src/Makefile | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | 12 | ||
| 13 | MAJVER= 2 | 13 | MAJVER= 2 |
| 14 | MINVER= 0 | 14 | MINVER= 0 |
| 15 | RELVER= 5 | ||
| 16 | ABIVER= 5.1 | 15 | ABIVER= 5.1 |
| 17 | NODOTABIVER= 51 | 16 | NODOTABIVER= 51 |
| 18 | 17 | ||
| @@ -308,7 +307,7 @@ ifeq (Darwin,$(TARGET_SYS)) | |||
| 308 | TARGET_STRIP+= -x | 307 | TARGET_STRIP+= -x |
| 309 | TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC | 308 | TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC |
| 310 | TARGET_DYNXLDOPTS= | 309 | TARGET_DYNXLDOPTS= |
| 311 | TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER) | 310 | TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).255 |
| 312 | ifeq (x64,$(TARGET_LJARCH)) | 311 | ifeq (x64,$(TARGET_LJARCH)) |
| 313 | TARGET_XLDFLAGS+= -pagezero_size 10000 -image_base 100000000 | 312 | TARGET_XLDFLAGS+= -pagezero_size 10000 -image_base 100000000 |
| 314 | TARGET_XSHLDFLAGS+= -image_base 7fff04c4a000 | 313 | TARGET_XSHLDFLAGS+= -image_base 7fff04c4a000 |
| @@ -318,7 +317,7 @@ ifeq (iOS,$(TARGET_SYS)) | |||
| 318 | TARGET_STRIP+= -x | 317 | TARGET_STRIP+= -x |
| 319 | TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC | 318 | TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC |
| 320 | TARGET_DYNXLDOPTS= | 319 | TARGET_DYNXLDOPTS= |
| 321 | TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER) | 320 | TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).255 |
| 322 | else | 321 | else |
| 323 | ifneq (SunOS,$(TARGET_SYS)) | 322 | ifneq (SunOS,$(TARGET_SYS)) |
| 324 | ifneq (PS3,$(TARGET_SYS)) | 323 | ifneq (PS3,$(TARGET_SYS)) |
| @@ -367,10 +366,11 @@ MINILUA_O= host/minilua.o | |||
| 367 | MINILUA_LIBS= -lm | 366 | MINILUA_LIBS= -lm |
| 368 | MINILUA_T= host/minilua | 367 | MINILUA_T= host/minilua |
| 369 | MINILUA_X= $(MINILUA_T) | 368 | MINILUA_X= $(MINILUA_T) |
| 369 | MINILUA_DEP= | ||
| 370 | 370 | ||
| 371 | ifeq (,$(HOST_LUA)) | 371 | ifeq (,$(HOST_LUA)) |
| 372 | HOST_LUA= $(MINILUA_X) | 372 | HOST_LUA= $(MINILUA_X) |
| 373 | DASM_DEP= $(MINILUA_T) | 373 | MINILUA_DEP= $(MINILUA_T) |
| 374 | endif | 374 | endif |
| 375 | 375 | ||
| 376 | DASM_DIR= ../dynasm | 376 | DASM_DIR= ../dynasm |
| @@ -445,6 +445,10 @@ endif | |||
| 445 | DASM_FLAGS= $(DASM_XFLAGS) $(DASM_AFLAGS) | 445 | DASM_FLAGS= $(DASM_XFLAGS) $(DASM_AFLAGS) |
| 446 | DASM_DASC= vm_$(DASM_ARCH).dasc | 446 | DASM_DASC= vm_$(DASM_ARCH).dasc |
| 447 | 447 | ||
| 448 | GIT= git | ||
| 449 | GIT_RELVER= [ -d ../.git ] && $(GIT) show -s --format=%ct >luajit_relver.txt 2>/dev/null || cat ../.relver >luajit_relver.txt 2>/dev/null || : | ||
| 450 | GIT_DEP= $(wildcard ../.git/HEAD ../.git/refs/heads/*) | ||
| 451 | |||
| 448 | BUILDVM_O= host/buildvm.o host/buildvm_asm.o host/buildvm_peobj.o \ | 452 | BUILDVM_O= host/buildvm.o host/buildvm_asm.o host/buildvm_peobj.o \ |
| 449 | host/buildvm_lib.o host/buildvm_fold.o | 453 | host/buildvm_lib.o host/buildvm_fold.o |
| 450 | BUILDVM_T= host/buildvm | 454 | BUILDVM_T= host/buildvm |
| @@ -488,8 +492,8 @@ LUAJIT_T= luajit | |||
| 488 | 492 | ||
| 489 | ALL_T= $(LUAJIT_T) $(LUAJIT_A) $(LUAJIT_SO) $(HOST_T) | 493 | ALL_T= $(LUAJIT_T) $(LUAJIT_A) $(LUAJIT_SO) $(HOST_T) |
| 490 | ALL_HDRGEN= lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h \ | 494 | ALL_HDRGEN= lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h \ |
| 491 | host/buildvm_arch.h | 495 | host/buildvm_arch.h luajit.h |
| 492 | ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) $(LIB_VMDEFP) | 496 | ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) luajit_relver.txt $(LIB_VMDEFP) |
| 493 | WIN_RM= *.obj *.lib *.exp *.dll *.exe *.manifest *.pdb *.ilk | 497 | WIN_RM= *.obj *.lib *.exp *.dll *.exe *.manifest *.pdb *.ilk |
| 494 | ALL_RM= $(ALL_T) $(ALL_GEN) *.o host/*.o $(WIN_RM) | 498 | ALL_RM= $(ALL_T) $(ALL_GEN) *.o host/*.o $(WIN_RM) |
| 495 | 499 | ||
| @@ -610,7 +614,12 @@ $(MINILUA_T): $(MINILUA_O) | |||
| 610 | $(E) "HOSTLINK $@" | 614 | $(E) "HOSTLINK $@" |
| 611 | $(Q)$(HOST_CC) $(HOST_ALDFLAGS) -o $@ $(MINILUA_O) $(MINILUA_LIBS) $(HOST_ALIBS) | 615 | $(Q)$(HOST_CC) $(HOST_ALDFLAGS) -o $@ $(MINILUA_O) $(MINILUA_LIBS) $(HOST_ALIBS) |
| 612 | 616 | ||
| 613 | host/buildvm_arch.h: $(DASM_DASC) $(DASM_DEP) lj_arch.h lua.h luaconf.h | 617 | luajit.h: $(MINILUA_DEP) $(GIT_DEP) luajit_rolling.h |
| 618 | $(E) "VERSION $@" | ||
| 619 | $(Q)$(GIT_RELVER) | ||
| 620 | $(Q)$(HOST_LUA) host/genversion.lua | ||
| 621 | |||
| 622 | host/buildvm_arch.h: $(DASM_DASC) $(MINILUA_DEP) lj_arch.h lua.h luaconf.h | ||
| 614 | $(E) "DYNASM $@" | 623 | $(E) "DYNASM $@" |
| 615 | $(Q)$(DASM) $(DASM_FLAGS) -o $@ $(DASM_DASC) | 624 | $(Q)$(DASM) $(DASM_FLAGS) -o $@ $(DASM_DASC) |
| 616 | 625 | ||
diff --git a/src/host/buildvm.c b/src/host/buildvm.c index ef393ff8..39c2bc24 100644 --- a/src/host/buildvm.c +++ b/src/host/buildvm.c | |||
| @@ -320,6 +320,7 @@ static void emit_vmdef(BuildCtx *ctx) | |||
| 320 | char buf[80]; | 320 | char buf[80]; |
| 321 | int i; | 321 | int i; |
| 322 | fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n"); | 322 | fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n"); |
| 323 | fprintf(ctx->fp, "assert(require(\"jit\").version == \"%s\", \"LuaJIT core/library version mismatch\")\n\n", LUAJIT_VERSION); | ||
| 323 | fprintf(ctx->fp, "module(...)\n\n"); | 324 | fprintf(ctx->fp, "module(...)\n\n"); |
| 324 | 325 | ||
| 325 | fprintf(ctx->fp, "bcnames = \""); | 326 | fprintf(ctx->fp, "bcnames = \""); |
diff --git a/src/host/genversion.lua b/src/host/genversion.lua new file mode 100644 index 00000000..a38cec56 --- /dev/null +++ b/src/host/genversion.lua | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | ---------------------------------------------------------------------------- | ||
| 2 | -- Lua script to embed the rolling release version in luajit.h. | ||
| 3 | ---------------------------------------------------------------------------- | ||
| 4 | -- Copyright (C) 2005-2023 Mike Pall. All rights reserved. | ||
| 5 | -- Released under the MIT license. See Copyright Notice in luajit.h | ||
| 6 | ---------------------------------------------------------------------------- | ||
| 7 | |||
| 8 | local FILE_INPUT_H = "luajit_rolling.h" | ||
| 9 | local FILE_INPUT_R = "luajit_relver.txt" | ||
| 10 | local FILE_OUTPUT_H = "luajit.h" | ||
| 11 | |||
| 12 | local function file_read(file) | ||
| 13 | local fp = assert(io.open(file, "rb"), "run from the wrong directory") | ||
| 14 | local data = assert(fp:read("*a")) | ||
| 15 | fp:close() | ||
| 16 | return data | ||
| 17 | end | ||
| 18 | |||
| 19 | local function file_write_mod(file, data) | ||
| 20 | local fp = io.open(file, "rb") | ||
| 21 | if fp then | ||
| 22 | local odata = assert(fp:read("*a")) | ||
| 23 | fp:close() | ||
| 24 | if odata == data then return end | ||
| 25 | end | ||
| 26 | fp = assert(io.open(file, "wb")) | ||
| 27 | assert(fp:write(data)) | ||
| 28 | assert(fp:close()) | ||
| 29 | end | ||
| 30 | |||
| 31 | local text = file_read(FILE_INPUT_H) | ||
| 32 | local relver = file_read(FILE_INPUT_R):match("(%d+)") | ||
| 33 | |||
| 34 | if relver then | ||
| 35 | text = text:gsub("ROLLING", relver) | ||
| 36 | else | ||
| 37 | io.stderr:write([[ | ||
| 38 | **** WARNING Cannot determine rolling release version from git log. | ||
| 39 | **** WARNING The 'git' command must be available during the build. | ||
| 40 | ]]) | ||
| 41 | end | ||
| 42 | |||
| 43 | file_write_mod(FILE_OUTPUT_H, text) | ||
diff --git a/src/jit/bc.lua b/src/jit/bc.lua index b128d35a..4b384012 100644 --- a/src/jit/bc.lua +++ b/src/jit/bc.lua | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | 41 | ||
| 42 | -- Cache some library functions and objects. | 42 | -- Cache some library functions and objects. |
| 43 | local jit = require("jit") | 43 | local jit = require("jit") |
| 44 | assert(jit.version_num == 20005, "LuaJIT core/library version mismatch") | ||
| 45 | local jutil = require("jit.util") | 44 | local jutil = require("jit.util") |
| 46 | local vmdef = require("jit.vmdef") | 45 | local vmdef = require("jit.vmdef") |
| 47 | local bit = require("bit") | 46 | local bit = require("bit") |
diff --git a/src/jit/bcsave.lua b/src/jit/bcsave.lua index fcd80334..55fae993 100644 --- a/src/jit/bcsave.lua +++ b/src/jit/bcsave.lua | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | ------------------------------------------------------------------------------ | 11 | ------------------------------------------------------------------------------ |
| 12 | 12 | ||
| 13 | local jit = require("jit") | 13 | local jit = require("jit") |
| 14 | assert(jit.version_num == 20005, "LuaJIT core/library version mismatch") | 14 | assert(jit.version_num == 20099, "LuaJIT core/library version mismatch") |
| 15 | local bit = require("bit") | 15 | local bit = require("bit") |
| 16 | 16 | ||
| 17 | -- Symbol name prefix for LuaJIT bytecode. | 17 | -- Symbol name prefix for LuaJIT bytecode. |
diff --git a/src/jit/dump.lua b/src/jit/dump.lua index 87950cb2..86f11e26 100644 --- a/src/jit/dump.lua +++ b/src/jit/dump.lua | |||
| @@ -55,7 +55,6 @@ | |||
| 55 | 55 | ||
| 56 | -- Cache some library functions and objects. | 56 | -- Cache some library functions and objects. |
| 57 | local jit = require("jit") | 57 | local jit = require("jit") |
| 58 | assert(jit.version_num == 20005, "LuaJIT core/library version mismatch") | ||
| 59 | local jutil = require("jit.util") | 58 | local jutil = require("jit.util") |
| 60 | local vmdef = require("jit.vmdef") | 59 | local vmdef = require("jit.vmdef") |
| 61 | local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc | 60 | local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc |
diff --git a/src/jit/v.lua b/src/jit/v.lua index 19b6949d..29edcf2b 100644 --- a/src/jit/v.lua +++ b/src/jit/v.lua | |||
| @@ -59,7 +59,6 @@ | |||
| 59 | 59 | ||
| 60 | -- Cache some library functions and objects. | 60 | -- Cache some library functions and objects. |
| 61 | local jit = require("jit") | 61 | local jit = require("jit") |
| 62 | assert(jit.version_num == 20005, "LuaJIT core/library version mismatch") | ||
| 63 | local jutil = require("jit.util") | 62 | local jutil = require("jit.util") |
| 64 | local vmdef = require("jit.vmdef") | 63 | local vmdef = require("jit.vmdef") |
| 65 | local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo | 64 | local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo |
diff --git a/src/lib_jit.c b/src/lib_jit.c index c2f1ee7c..04a564c7 100644 --- a/src/lib_jit.c +++ b/src/lib_jit.c | |||
| @@ -648,7 +648,7 @@ LUALIB_API int luaopen_jit(lua_State *L) | |||
| 648 | { | 648 | { |
| 649 | lua_pushliteral(L, LJ_OS_NAME); | 649 | lua_pushliteral(L, LJ_OS_NAME); |
| 650 | lua_pushliteral(L, LJ_ARCH_NAME); | 650 | lua_pushliteral(L, LJ_ARCH_NAME); |
| 651 | lua_pushinteger(L, LUAJIT_VERSION_NUM); | 651 | lua_pushinteger(L, LUAJIT_VERSION_NUM); /* Deprecated. */ |
| 652 | lua_pushliteral(L, LUAJIT_VERSION); | 652 | lua_pushliteral(L, LUAJIT_VERSION); |
| 653 | LJ_LIB_REG(L, LUA_JITLIBNAME, jit); | 653 | LJ_LIB_REG(L, LUA_JITLIBNAME, jit); |
| 654 | #ifndef LUAJIT_DISABLE_JITUTIL | 654 | #ifndef LUAJIT_DISABLE_JITUTIL |
diff --git a/src/luaconf.h b/src/luaconf.h index c1c9b4d3..8fc3eee5 100644 --- a/src/luaconf.h +++ b/src/luaconf.h | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | #endif | 37 | #endif |
| 38 | #define LUA_LROOT "/usr/local" | 38 | #define LUA_LROOT "/usr/local" |
| 39 | #define LUA_LUADIR "/lua/5.1/" | 39 | #define LUA_LUADIR "/lua/5.1/" |
| 40 | #define LUA_LJDIR "/luajit-2.0.5/" | 40 | #define LUA_LJDIR "/luajit-2.0/" |
| 41 | 41 | ||
| 42 | #ifdef LUA_ROOT | 42 | #ifdef LUA_ROOT |
| 43 | #define LUA_JROOT LUA_ROOT | 43 | #define LUA_JROOT LUA_ROOT |
diff --git a/src/luajit.h b/src/luajit_rolling.h index 8b09f376..27368836 100644 --- a/src/luajit.h +++ b/src/luajit_rolling.h | |||
| @@ -30,9 +30,9 @@ | |||
| 30 | 30 | ||
| 31 | #include "lua.h" | 31 | #include "lua.h" |
| 32 | 32 | ||
| 33 | #define LUAJIT_VERSION "LuaJIT 2.0.5" | 33 | #define LUAJIT_VERSION "LuaJIT 2.0.ROLLING" |
| 34 | #define LUAJIT_VERSION_NUM 20005 /* Version 2.0.5 = 02.00.05. */ | 34 | #define LUAJIT_VERSION_NUM 20099 /* Deprecated. */ |
| 35 | #define LUAJIT_VERSION_SYM luaJIT_version_2_0_5 | 35 | #define LUAJIT_VERSION_SYM luaJIT_version_2_0_ROLLING |
| 36 | #define LUAJIT_COPYRIGHT "Copyright (C) 2005-2023 Mike Pall" | 36 | #define LUAJIT_COPYRIGHT "Copyright (C) 2005-2023 Mike Pall" |
| 37 | #define LUAJIT_URL "https://luajit.org/" | 37 | #define LUAJIT_URL "https://luajit.org/" |
| 38 | 38 | ||
