|
@@ -14,25 +14,20 @@ table.compat {
|
|
}
|
|
}
|
|
table.compat td {
|
|
table.compat td {
|
|
border: 1px solid #bfcfff;
|
|
border: 1px solid #bfcfff;
|
|
- height: 2.5em;
|
|
|
|
|
|
+ height: 1.5em;
|
|
}
|
|
}
|
|
table.compat tr.compathead td {
|
|
table.compat tr.compathead td {
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
border-bottom: 2px solid #bfcfff;
|
|
border-bottom: 2px solid #bfcfff;
|
|
}
|
|
}
|
|
-tr.compathead td.compatos {
|
|
|
|
- vertical-align: top;
|
|
|
|
|
|
+td.compatname, td.compatver {
|
|
|
|
+ width: 10%;
|
|
}
|
|
}
|
|
-table.compat td.compatcpu {
|
|
|
|
- width: 18%;
|
|
|
|
- border-right: 2px solid #bfcfff;
|
|
|
|
|
|
+td.compatbits {
|
|
|
|
+ width: 5%;
|
|
}
|
|
}
|
|
-td.compatos {
|
|
|
|
|
|
+td.compatx {
|
|
width: 21%;
|
|
width: 21%;
|
|
- vertical-align: middle;
|
|
|
|
-}
|
|
|
|
-td.compatno {
|
|
|
|
- background-color: #d0d0d0;
|
|
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
</head>
|
|
</head>
|
|
@@ -91,62 +86,198 @@ For the impatient (on POSIX systems):
|
|
<pre class="code">
|
|
<pre class="code">
|
|
make && sudo make install
|
|
make && sudo make install
|
|
</pre>
|
|
</pre>
|
|
|
|
+
|
|
|
|
+<h2 id="req">Requirements</h2>
|
|
|
|
+<h3 id="systems">Systems</h3>
|
|
|
|
+<p>
|
|
|
|
+LuaJIT currently builds out-of-the box on most systems:
|
|
|
|
+</p>
|
|
|
|
+<table class="compat">
|
|
|
|
+<tr class="compathead">
|
|
|
|
+<td class="compatname">OS</td>
|
|
|
|
+<td class="compatver">Min. Version</td>
|
|
|
|
+<td class="compatx">Requirements</td>
|
|
|
|
+<td class="compatx">LuaJIT Versions</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd separate">
|
|
|
|
+<td class="compatname"><a href="#windows">Windows</a></td>
|
|
|
|
+<td class="compatver">7</td>
|
|
|
|
+<td class="compatx">x86 or x64, ARM64: TBA</td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="even">
|
|
|
|
+<td class="compatname"><a href="#posix">Linux</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd">
|
|
|
|
+<td class="compatname"><a href="#posix">*BSD</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="even">
|
|
|
|
+<td class="compatname"><a href="#osx">macOS (OSX)</a></td>
|
|
|
|
+<td class="compatver">10.4</td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">v2.1 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd">
|
|
|
|
+<td class="compatname"><a href="#posix">POSIX</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx">mmap, dlopen</td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="even separate">
|
|
|
|
+<td class="compatname"><a href="#android">Android</a></td>
|
|
|
|
+<td class="compatver">4.0</td>
|
|
|
|
+<td class="compatx">Recent Android NDK</td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd">
|
|
|
|
+<td class="compatname"><a href="#ios">iOS</a></td>
|
|
|
|
+<td class="compatver">3.0</td>
|
|
|
|
+<td class="compatx">Xcode iOS SDK</td>
|
|
|
|
+<td class="compatx">v2.1 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="even separate">
|
|
|
|
+<td class="compatname"><a href="#consoles">PS3</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx">PS3 SDK</td>
|
|
|
|
+<td class="compatx">v2.0 – v2.1 EOL</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd">
|
|
|
|
+<td class="compatname"><a href="#consoles">PS4</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx">PS4 SDK (ORBIS)</td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="even">
|
|
|
|
+<td class="compatname"><a href="#consoles">PS5</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx">PS5 SDK (PROSPERO)</td>
|
|
|
|
+<td class="compatx">v2.1 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd">
|
|
|
|
+<td class="compatname"><a href="#consoles">PS Vita</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx">PS Vita SDK (PSP2)</td>
|
|
|
|
+<td class="compatx">v2.0 – v2.1 EOL</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="even">
|
|
|
|
+<td class="compatname"><a href="#consoles">Xbox 360</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx">Xbox 360 SDK (XEDK)</td>
|
|
|
|
+<td class="compatx">v2.0 – v2.1 EOL</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd">
|
|
|
|
+<td class="compatname"><a href="#consoles">Xbox One</a></td>
|
|
|
|
+<td class="compatver"> </td>
|
|
|
|
+<td class="compatx">Xbox One SDK (DURANGO)</td>
|
|
|
|
+<td class="compatx">v2.1 –</td>
|
|
|
|
+</tr>
|
|
|
|
+</table>
|
|
<p>
|
|
<p>
|
|
-LuaJIT currently builds out-of-the box on most systems.
|
|
|
|
-Here's the compatibility matrix for the supported combinations of
|
|
|
|
-operating systems, CPUs and compilers:
|
|
|
|
|
|
+The codebase has compatibility defines for some more systems, but
|
|
|
|
+without official support.
|
|
</p>
|
|
</p>
|
|
|
|
+<h3 id="toolchains">Toolchains</h3>
|
|
|
|
+<p>
|
|
|
|
+Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or
|
|
|
|
+MSVC++.
|
|
|
|
+</p>
|
|
|
|
+<p>
|
|
|
|
+The Makefile-based build system requires GNU Make and supports
|
|
|
|
+cross-builds. Batch files are provided for MSVC++ builds and console
|
|
|
|
+cross-builds.
|
|
|
|
+</p>
|
|
|
|
+<h3 id="architectures">CPU Architectures</h3>
|
|
<table class="compat">
|
|
<table class="compat">
|
|
<tr class="compathead">
|
|
<tr class="compathead">
|
|
-<td class="compatcpu">CPU / OS</td>
|
|
|
|
-<td class="compatos"><a href="#posix">Linux</a> or<br><a href="#android">Android</a></td>
|
|
|
|
-<td class="compatos"><a href="#posix">*BSD, Other</a></td>
|
|
|
|
-<td class="compatos"><a href="#posix">macOS 10.4+</a> or<br><a href="#ios">iOS 3.0+</a></td>
|
|
|
|
-<td class="compatos"><a href="#windows">Windows XP<br>or later</a></td>
|
|
|
|
|
|
+<td class="compatname">CPU</td>
|
|
|
|
+<td class="compatbits">Bits</td>
|
|
|
|
+<td class="compatx">Requirements</td>
|
|
|
|
+<td class="compatx">Variants</td>
|
|
|
|
+<td class="compatx">LuaJIT Versions</td>
|
|
</tr>
|
|
</tr>
|
|
<tr class="odd separate">
|
|
<tr class="odd separate">
|
|
-<td class="compatcpu">x86 (32 bit)</td>
|
|
|
|
-<td class="compatos">GCC 4.x+<br>GCC 3.4</td>
|
|
|
|
-<td class="compatos">GCC 4.x+<br>GCC 3.4</td>
|
|
|
|
-<td class="compatos">XCode 5.0+<br>Clang</td>
|
|
|
|
-<td class="compatos">MSVC<br>MinGW, Cygwin</td>
|
|
|
|
|
|
+<td class="compatname">x86</td>
|
|
|
|
+<td class="compatbits">32</td>
|
|
|
|
+<td class="compatx">v2.1+: SSE2</td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="even">
|
|
|
|
+<td class="compatname">x64</td>
|
|
|
|
+<td class="compatbits">64</td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd">
|
|
|
|
+<td class="compatname">ARM</td>
|
|
|
|
+<td class="compatbits">32</td>
|
|
|
|
+<td class="compatx">ARMv5+, ARM9E+</td>
|
|
|
|
+<td class="compatx">hard-fp + soft-fp</td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
</tr>
|
|
</tr>
|
|
<tr class="even">
|
|
<tr class="even">
|
|
-<td class="compatcpu">x64 (64 bit)</td>
|
|
|
|
-<td class="compatos">GCC 4.x+</td>
|
|
|
|
-<td class="compatos">ORBIS (<a href="#ps4">PS4</a>)</td>
|
|
|
|
-<td class="compatos">XCode 5.0+<br>Clang</td>
|
|
|
|
-<td class="compatos">MSVC</td>
|
|
|
|
|
|
+<td class="compatname">ARM64</td>
|
|
|
|
+<td class="compatbits">64</td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">ARM64le + ARM64be</td>
|
|
|
|
+<td class="compatx">v2.1 –</td>
|
|
</tr>
|
|
</tr>
|
|
<tr class="odd">
|
|
<tr class="odd">
|
|
-<td class="compatcpu"><a href="#cross2">ARMv5+<br>ARM9E+</a></td>
|
|
|
|
-<td class="compatos">GCC 4.2+</td>
|
|
|
|
-<td class="compatos">GCC 4.2+<br>PSP2 (<a href="#psvita">PS VITA</a>)</td>
|
|
|
|
-<td class="compatos">XCode 5.0+<br>Clang</td>
|
|
|
|
-<td class="compatos compatno"> </td>
|
|
|
|
|
|
+<td class="compatname">PPC32</td>
|
|
|
|
+<td class="compatbits">32</td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">hard-fp + soft-fp</td>
|
|
|
|
+<td class="compatx">v2.0 – v2.1 EOL</td>
|
|
</tr>
|
|
</tr>
|
|
<tr class="even">
|
|
<tr class="even">
|
|
-<td class="compatcpu"><a href="#cross2">PPC</a></td>
|
|
|
|
-<td class="compatos">GCC 4.3+</td>
|
|
|
|
-<td class="compatos">GCC 4.3+<br>GCC 4.1 (<a href="#ps3">PS3</a>)</td>
|
|
|
|
-<td class="compatos compatno"> </td>
|
|
|
|
-<td class="compatos">XEDK (<a href="#xbox360">Xbox 360</a>)</td>
|
|
|
|
|
|
+<td class="compatname">PPC/e500</td>
|
|
|
|
+<td class="compatbits">32</td>
|
|
|
|
+<td class="compatx">e500v2</td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">v2.0 EOL</td>
|
|
</tr>
|
|
</tr>
|
|
<tr class="odd">
|
|
<tr class="odd">
|
|
-<td class="compatcpu"><a href="#cross2">PPC/e500v2</a></td>
|
|
|
|
-<td class="compatos">GCC 4.3+</td>
|
|
|
|
-<td class="compatos">GCC 4.3+</td>
|
|
|
|
-<td class="compatos compatno"> </td>
|
|
|
|
-<td class="compatos compatno"> </td>
|
|
|
|
|
|
+<td class="compatname">MIPS32</td>
|
|
|
|
+<td class="compatbits">32</td>
|
|
|
|
+<td class="compatx">MIPS32r1 – r5</td>
|
|
|
|
+<td class="compatx">hard-fp + soft-fp</td>
|
|
|
|
+<td class="compatx">v2.0 –</td>
|
|
</tr>
|
|
</tr>
|
|
<tr class="even">
|
|
<tr class="even">
|
|
-<td class="compatcpu"><a href="#cross2">MIPS</a></td>
|
|
|
|
-<td class="compatos">GCC 4.3+</td>
|
|
|
|
-<td class="compatos">GCC 4.3+</td>
|
|
|
|
-<td class="compatos compatno"> </td>
|
|
|
|
-<td class="compatos compatno"> </td>
|
|
|
|
|
|
+<td class="compatname">MIPS64</td>
|
|
|
|
+<td class="compatbits">64</td>
|
|
|
|
+<td class="compatx">MIPS64r1 – r5</td>
|
|
|
|
+<td class="compatx">hard-fp + soft-fp</td>
|
|
|
|
+<td class="compatx">v2.1 –</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="odd">
|
|
|
|
+<td class="compatname">MIPS64</td>
|
|
|
|
+<td class="compatbits">64</td>
|
|
|
|
+<td class="compatx">MIPS64r6</td>
|
|
|
|
+<td class="compatx">hard-fp + soft-fp</td>
|
|
|
|
+<td class="compatx">v2.1 EOL</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr class="even">
|
|
|
|
+<td class="compatname">RISC-V</td>
|
|
|
|
+<td class="compatbits">64</td>
|
|
|
|
+<td class="compatx">RVA22+</td>
|
|
|
|
+<td class="compatx"> </td>
|
|
|
|
+<td class="compatx">TBA</td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
|
|
+<p>
|
|
|
|
+There are no plans to add historic architectures or to continue support
|
|
|
|
+for end-of-life (EOL) architectures, for which no new CPUs are commonly
|
|
|
|
+available anymore. Likewise, there are no plans to support marginal
|
|
|
|
+and/or de-facto-dead architectures.
|
|
|
|
+</p>
|
|
|
|
|
|
<h2>Configuring LuaJIT</h2>
|
|
<h2>Configuring LuaJIT</h2>
|
|
<p>
|
|
<p>
|
|
@@ -199,7 +330,7 @@ which is probably the default on your system, anyway. Simply run:
|
|
make
|
|
make
|
|
</pre>
|
|
</pre>
|
|
<p>
|
|
<p>
|
|
-This always builds a native x86, x64 or PPC binary, depending on the host OS
|
|
|
|
|
|
+This always builds a native binary, depending on the host OS
|
|
you're running this command on. Check the section on
|
|
you're running this command on. Check the section on
|
|
<a href="#cross">cross-compilation</a> for more options.
|
|
<a href="#cross">cross-compilation</a> for more options.
|
|
</p>
|
|
</p>
|
|
@@ -212,12 +343,9 @@ You can add an extra prefix to the search paths by appending the
|
|
make PREFIX=/home/myself/lj2
|
|
make PREFIX=/home/myself/lj2
|
|
</pre>
|
|
</pre>
|
|
<p>
|
|
<p>
|
|
-Note for macOS: you <b>must</b> set the <tt>MACOSX_DEPLOYMENT_TARGET</tt>
|
|
|
|
-environment variable to a value supported by your toolchain:
|
|
|
|
|
|
+Please use the LuaJIT 2.1 branch to compile for
|
|
|
|
+<b id="osx">macOS (OSX)</b>.
|
|
</p>
|
|
</p>
|
|
-<pre class="code">
|
|
|
|
-MACOSX_DEPLOYMENT_TARGET=XX.YY make
|
|
|
|
-</pre>
|
|
|
|
<h3>Installing LuaJIT</h3>
|
|
<h3>Installing LuaJIT</h3>
|
|
<p>
|
|
<p>
|
|
The top-level Makefile installs LuaJIT by default under
|
|
The top-level Makefile installs LuaJIT by default under
|
|
@@ -470,16 +598,6 @@ the DLL). You may link LuaJIT statically on Windows only if you don't
|
|
intend to load Lua/C modules at runtime.
|
|
intend to load Lua/C modules at runtime.
|
|
</li></ul>
|
|
</li></ul>
|
|
</li>
|
|
</li>
|
|
-<li>
|
|
|
|
-<i>Important: this relates to LuaJIT 2.0 only — use LuaJIT 2.1 to
|
|
|
|
-avoid these complications.</i><br>
|
|
|
|
-If you're building a 64 bit application on macOS which links directly or
|
|
|
|
-indirectly against LuaJIT, you need to link your main executable
|
|
|
|
-with these flags:
|
|
|
|
-<pre class="code">
|
|
|
|
--pagezero_size 10000 -image_base 100000000
|
|
|
|
-</pre>
|
|
|
|
-</li>
|
|
|
|
</ul>
|
|
</ul>
|
|
<p>Additional hints for initializing LuaJIT using the C API functions:</p>
|
|
<p>Additional hints for initializing LuaJIT using the C API functions:</p>
|
|
<ul>
|
|
<ul>
|