Skip to content

Commit 15a66e9

Browse files
authored
Merge pull request #279 from Madreag/pr/luajit-update-current-tip
Switched LuaJIT to WohlSoft fork
2 parents 81dab12 + fea2285 commit 15a66e9

245 files changed

Lines changed: 7383 additions & 4041 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.relver export-subst
2+
*.bat text eol=crlf

external/sources/LuaJIT-2.1/.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ src/*.lib
33
*.so
44
*.obj
55
*.exp
6+
*.pdb
67
*.dll
78
*.exe
89
*.manifest
@@ -17,6 +18,7 @@ _Bin/libluajit*
1718

1819
#cmake
1920
/build/
21+
/build-*/
2022
cmake_install.cmake
2123
CmakeCache.txt
2224
/CMakeFiles*
@@ -26,4 +28,7 @@ ALL_BUILD.vcxproj.filters
2628
INSTALL.vcxproj
2729
INSTALL.vcxproj.filters
2830
ZERO_CHECK.vcxproj
29-
ZERO_CHECK.vcxproj.filters
31+
ZERO_CHECK.vcxproj.filters
32+
33+
#Mac OS junk
34+
.DS_Store
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$Format:%ct$
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cmake_minimum_required(VERSION 3.0...4.0)
2+
3+
list(APPEND CMAKE_MODULE_PATH
4+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
5+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
6+
)
7+
8+
set(LUAJIT_TOP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
9+
10+
project(luajit)
11+
12+
set(can_use_assembler TRUE)
13+
enable_language(ASM)
14+
15+
include (GNUInstallDirs)
16+
17+
add_subdirectory(src)

external/sources/LuaJIT-2.1/COPYRIGHT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
===============================================================================
22
LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/
33

4-
Copyright (C) 2005-2022 Mike Pall. All rights reserved.
4+
Copyright (C) 2005-2026 Mike Pall. All rights reserved.
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

external/sources/LuaJIT-2.1/Makefile

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@
1010
# For MSVC, please follow the instructions given in src/msvcbuild.bat.
1111
# For MinGW and Cygwin, cd to src and run make with the Makefile there.
1212
#
13-
# Copyright (C) 2005-2022 Mike Pall. See Copyright Notice in luajit.h
13+
# Copyright (C) 2005-2026 Mike Pall. See Copyright Notice in luajit.h
1414
##############################################################################
1515

1616
MAJVER= 2
1717
MINVER= 1
18-
RELVER= 0
19-
PREREL= -beta3
20-
VERSION= $(MAJVER).$(MINVER).$(RELVER)$(PREREL)
2118
ABIVER= 5.1
2219

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+
2328
##############################################################################
2429
#
2530
# Change the installation path as needed. This automatically adjusts
@@ -32,12 +37,13 @@ export MULTILIB= lib
3237
DPREFIX= $(DESTDIR)$(PREFIX)
3338
INSTALL_BIN= $(DPREFIX)/bin
3439
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
35-
INSTALL_SHARE= $(DPREFIX)/share
36-
INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
40+
INSTALL_SHARE_= $(PREFIX)/share
41+
INSTALL_SHARE= $(DESTDIR)$(INSTALL_SHARE_)
42+
INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION)
3743
INSTALL_INC= $(INSTALL_DEFINC)
3844

39-
INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION)
40-
INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
45+
export INSTALL_LJLIBD= $(INSTALL_SHARE_)/luajit-$(MMVERSION)
46+
INSTALL_JITLIB= $(DESTDIR)$(INSTALL_LJLIBD)/jit
4147
INSTALL_LMODD= $(INSTALL_SHARE)/lua
4248
INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
4349
INSTALL_CMODD= $(INSTALL_LIB)/lua
@@ -50,10 +56,10 @@ INSTALL_TSYMNAME= luajit
5056
INSTALL_ANAME= libluajit-$(ABIVER).a
5157
INSTALL_SOSHORT1= libluajit-$(ABIVER).so
5258
INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
53-
INSTALL_SONAME= $(INSTALL_SOSHORT2).$(MINVER).$(RELVER)
59+
INSTALL_SONAME= libluajit-$(ABIVER).so.$(VERSION)
5460
INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib
5561
INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib
56-
INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib
62+
INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(VERSION).dylib
5763
INSTALL_PCNAME= luajit.pc
5864

5965
INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME)
@@ -66,7 +72,7 @@ INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
6672

6773
INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \
6874
$(INSTALL_PKGCONFIG) $(INSTALL_JITLIB) $(INSTALL_LMOD) $(INSTALL_CMOD)
69-
UNINSTALL_DIRS= $(INSTALL_JITLIB) $(INSTALL_LJLIBD) $(INSTALL_INC) \
75+
UNINSTALL_DIRS= $(INSTALL_JITLIB) $(DESTDIR)$(INSTALL_LJLIBD) $(INSTALL_INC) \
7076
$(INSTALL_LMOD) $(INSTALL_LMODD) $(INSTALL_CMOD) $(INSTALL_CMODD)
7177

7278
RM= rm -f
@@ -78,7 +84,8 @@ INSTALL_F= install -m 0644
7884
UNINSTALL= $(RM)
7985
LDCONFIG= ldconfig -n 2>/dev/null
8086
SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \
81-
-e "s|^multilib=.*|multilib=$(MULTILIB)|"
87+
-e "s|^multilib=.*|multilib=$(MULTILIB)|" \
88+
-e "s|^relver=.*|relver=$(RELVER)|"
8289
ifneq ($(INSTALL_DEFINC),$(INSTALL_INC))
8390
SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|"
8491
endif
@@ -92,7 +99,9 @@ FILES_INC= lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h
9299
FILES_JITLIB= bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua \
93100
dis_x86.lua dis_x64.lua dis_arm.lua dis_arm64.lua \
94101
dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua \
95-
dis_mips64.lua dis_mips64el.lua vmdef.lua
102+
dis_mips64.lua dis_mips64el.lua \
103+
dis_mips64r6.lua dis_mips64r6el.lua \
104+
vmdef.lua
96105

97106
ifeq (,$(findstring Windows,$(OS)))
98107
HOST_SYS:= $(shell uname -s)
@@ -101,21 +110,22 @@ else
101110
endif
102111
TARGET_SYS?= $(HOST_SYS)
103112

104-
ifeq (Darwin,$(TARGET_SYS))
113+
ifneq (,$(filter $(TARGET_SYS),Darwin iOS))
105114
INSTALL_SONAME= $(INSTALL_DYLIBNAME)
106115
INSTALL_SOSHORT1= $(INSTALL_DYLIBSHORT1)
107116
INSTALL_SOSHORT2= $(INSTALL_DYLIBSHORT2)
108117
LDCONFIG= :
118+
SED_PC+= -e "s| -Wl,-E||"
109119
endif
110120

111121
##############################################################################
112122

113123
INSTALL_DEP= src/luajit
114124

115125
default all $(INSTALL_DEP):
116-
@echo "==== Building LuaJIT $(VERSION) ===="
126+
@echo "==== Building LuaJIT $(MMVERSION) ===="
117127
$(MAKE) -C src
118-
@echo "==== Successfully built LuaJIT $(VERSION) ===="
128+
@echo "==== Successfully built LuaJIT $(MMVERSION) ===="
119129

120130
install: $(INSTALL_DEP)
121131
@echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ===="
@@ -134,18 +144,12 @@ install: $(INSTALL_DEP)
134144
$(RM) $(FILE_PC).tmp
135145
cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
136146
cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
147+
$(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)
137148
@echo "==== Successfully installed LuaJIT $(VERSION) to $(PREFIX) ===="
138-
@echo ""
139-
@echo "Note: the development releases deliberately do NOT install a symlink for luajit"
140-
@echo "You can do this now by running this command (with sudo):"
141-
@echo ""
142-
@echo " $(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)"
143-
@echo ""
144-
145149

146150
uninstall:
147151
@echo "==== Uninstalling LuaJIT $(VERSION) from $(PREFIX) ===="
148-
$(UNINSTALL) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
152+
$(UNINSTALL) $(INSTALL_TSYM) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
149153
for file in $(FILES_JITLIB); do \
150154
$(UNINSTALL) $(INSTALL_JITLIB)/$$file; \
151155
done
@@ -159,8 +163,9 @@ uninstall:
159163
##############################################################################
160164

161165
amalg:
162-
@echo "Building LuaJIT $(VERSION)"
166+
@echo "==== Building LuaJIT $(MMVERSION) (amalgamation) ===="
163167
$(MAKE) -C src amalg
168+
@echo "==== Successfully built LuaJIT $(MMVERSION) (amalgamation) ===="
164169

165170
clean:
166171
$(MAKE) -C src clean

external/sources/LuaJIT-2.1/README

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
README for LuaJIT 2.1
2+
---------------------
3+
4+
LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.
5+
6+
Project Homepage: https://luajit.org/
7+
8+
LuaJIT is Copyright (C) 2005-2026 Mike Pall.
9+
LuaJIT is free software, released under the MIT license.
10+
See full Copyright Notice in the COPYRIGHT file or in luajit.h.
11+
12+
Documentation for LuaJIT is available in HTML format.
13+
Please point your favorite browser to:
14+
15+
doc/luajit.html
16+

external/sources/LuaJIT-2.1/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1-
README for LuaJIT 2.1.0-beta3
2-
-----------------------------
1+
# LuaJIT + CMake & UTF8-paths-on-Windows
2+
There is the modified version of LuaJIT that has the next difference from the original version:
3+
* In addition to its default GNU Make-based build, there is a CMake-based build was added
4+
* Enforces the UTF-8 charset for file system-related functions to ensure the equal result on all supported platforms (without this addition, locale-depending ANSI charsets used on Windows) (You should specify the `-DLUAJIT_FORCE_UTF8_FOPEN=ON` CMake option to enable this feature)
5+
6+
If you find a bug using CMake build, please **DON'T REPORT IT TO OFFICIAL LuaJIT developers**, as they refuse to take the CMake building system support. So, you MUST verify the [latest original version](https://github.com/LuaJIT/LuaJIT) using the GNU Make-based building system to ensure that the same bug gets reproduced too:
7+
* If the bug gets reproduced at both CMake and GNU-Make-based builds, feel free to report the bug to [official LuaJIT developers](https://github.com/LuaJIT/LuaJIT/issues).
8+
* If the bug gets reproduced at the CMake-based build only, however, doesn't reproduce at the official GNU-Make-based build, you [should report this bug to me](https://github.com/WohlSoft/LuaJIT/issues).
9+
10+
# Original readme
11+
## README for LuaJIT 2.1
12+
---------------------
313

414
LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.
515

616
Project Homepage: https://luajit.org/
717

8-
LuaJIT is Copyright (C) 2005-2022 Mike Pall.
18+
LuaJIT is Copyright (C) 2005-2025 Mike Pall.
919
LuaJIT is free software, released under the MIT license.
1020
See full Copyright Notice in the COPYRIGHT file or in luajit.h.
1121

1222
Documentation for LuaJIT is available in HTML format.
1323
Please point your favorite browser to:
1424

1525
doc/luajit.html
16-
-11.9 KB
Binary file not shown.
-19.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)