aboutsummaryrefslogtreecommitdiff
path: root/doc/install.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--doc/install.html236
1 files changed, 19 insertions, 217 deletions
diff --git a/doc/install.html b/doc/install.html
index c960e071..21866315 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -20,7 +20,7 @@ table.compat tr.compathead td {
20 font-weight: bold; 20 font-weight: bold;
21 border-bottom: 2px solid #bfcfff; 21 border-bottom: 2px solid #bfcfff;
22} 22}
23td.compatname, td.compatver { 23td.compatname {
24 width: 10%; 24 width: 10%;
25} 25}
26td.compatbits { 26td.compatbits {
@@ -65,18 +65,18 @@ td.compatx {
65<a href="ext_c_api.html">Lua/C API</a> 65<a href="ext_c_api.html">Lua/C API</a>
66</li></ul> 66</li></ul>
67</li><li> 67</li><li>
68<a href="status.html">Status</a> 68<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
69</li><li> 69</li><li>
70<a href="faq.html">FAQ</a> 70<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
71</li><li> 71</li><li>
72<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 72<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
73</li></ul> 73</li></ul>
74</div> 74</div>
75<div id="main"> 75<div id="main">
76<p> 76<p>
77LuaJIT is only distributed as a source package. This page explains 77LuaJIT is only distributed as source code &mdash; get it from the
78how to build and install LuaJIT with different operating systems 78<a href="https://luajit.org/download.html"><span class="ext">&raquo;</span>&nbsp;git repository</a>. This page explains how to build
79and C&nbsp;compilers. 79and install the LuaJIT binary and library for different operating systems.
80</p> 80</p>
81<p> 81<p>
82For the impatient (on POSIX systems): 82For the impatient (on POSIX systems):
@@ -86,201 +86,21 @@ make &amp;&amp; sudo make install
86</pre> 86</pre>
87 87
88<h2 id="req">Requirements</h2> 88<h2 id="req">Requirements</h2>
89<h3 id="systems">Systems</h3>
90<p> 89<p>
91LuaJIT currently builds out-of-the box on most systems: 90LuaJIT currently builds out-of-the box on most systems. Please check the
91supported operating systems and CPU architectures on the
92<a href="https://luajit.org/status.html"><span class="ext">&raquo;</span>&nbsp;status page</a>.
92</p> 93</p>
93<table class="compat">
94<tr class="compathead">
95<td class="compatname">OS</td>
96<td class="compatver">Min. Version</td>
97<td class="compatx">Requirements</td>
98<td class="compatx">LuaJIT Versions</td>
99</tr>
100<tr class="odd separate">
101<td class="compatname"><a href="#windows">Windows</a></td>
102<td class="compatver">7</td>
103<td class="compatx">x86 or x64, ARM64: TBA</td>
104<td class="compatx">v2.0 &ndash;</td>
105</tr>
106<tr class="even">
107<td class="compatname"><a href="#posix">Linux</a></td>
108<td class="compatver">&nbsp;</td>
109<td class="compatx">&nbsp;</td>
110<td class="compatx">v2.0 &ndash;</td>
111</tr>
112<tr class="odd">
113<td class="compatname"><a href="#posix">*BSD</a></td>
114<td class="compatver">&nbsp;</td>
115<td class="compatx">&nbsp;</td>
116<td class="compatx">v2.0 &ndash;</td>
117</tr>
118<tr class="even">
119<td class="compatname"><a href="#osx">macOS (OSX)</a></td>
120<td class="compatver">10.4</td>
121<td class="compatx">&nbsp;</td>
122<td class="compatx">v2.1 &ndash;</td>
123</tr>
124<tr class="odd">
125<td class="compatname"><a href="#posix">POSIX</a></td>
126<td class="compatver">&nbsp;</td>
127<td class="compatx">mmap, dlopen</td>
128<td class="compatx">v2.0 &ndash;</td>
129</tr>
130<tr class="even separate">
131<td class="compatname"><a href="#android">Android</a></td>
132<td class="compatver">4.0</td>
133<td class="compatx">Recent Android NDK</td>
134<td class="compatx">v2.0 &ndash;</td>
135</tr>
136<tr class="odd">
137<td class="compatname"><a href="#ios">iOS</a></td>
138<td class="compatver">3.0</td>
139<td class="compatx">Xcode iOS SDK</td>
140<td class="compatx">v2.1 &ndash;</td>
141</tr>
142<tr class="even separate">
143<td class="compatname"><a href="#consoles">PS3</a></td>
144<td class="compatver">&nbsp;</td>
145<td class="compatx">PS3 SDK</td>
146<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
147</tr>
148<tr class="odd">
149<td class="compatname"><a href="#consoles">PS4</a></td>
150<td class="compatver">&nbsp;</td>
151<td class="compatx">PS4 SDK (ORBIS)</td>
152<td class="compatx">v2.0 &ndash;</td>
153</tr>
154<tr class="even">
155<td class="compatname"><a href="#consoles">PS5</a></td>
156<td class="compatver">&nbsp;</td>
157<td class="compatx">PS5 SDK (PROSPERO)</td>
158<td class="compatx">v2.1 &ndash;</td>
159</tr>
160<tr class="odd">
161<td class="compatname"><a href="#consoles">PS Vita</a></td>
162<td class="compatver">&nbsp;</td>
163<td class="compatx">PS Vita SDK (PSP2)</td>
164<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
165</tr>
166<tr class="even">
167<td class="compatname"><a href="#consoles">Xbox 360</a></td>
168<td class="compatver">&nbsp;</td>
169<td class="compatx">Xbox 360 SDK (XEDK)</td>
170<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
171</tr>
172<tr class="odd">
173<td class="compatname"><a href="#consoles">Xbox One</a></td>
174<td class="compatver">&nbsp;</td>
175<td class="compatx">Xbox One SDK (DURANGO)</td>
176<td class="compatx">v2.1 &ndash;</td>
177</tr>
178<tr class="even">
179<td class="compatname"><a href="#consoles">Nintendo Switch</a></td>
180<td class="compatver">&nbsp;</td>
181<td class="compatx">NintendoSDK + NX Addon</td>
182<td class="compatx">v2.1 &ndash;</td>
183</tr>
184</table>
185<p>
186The codebase has compatibility defines for some more systems, but
187without official support.
188</p>
189<h3 id="toolchains">Toolchains</h3>
190<p> 94<p>
191Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or 95Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or
192MSVC++. 96MSVC++.
193</p> 97</p>
194<p> 98<p>
195The Makefile-based build system requires GNU Make and supports 99The Makefile-based build system requires GNU Make and supports
196cross-builds. Batch files are provided for MSVC++ builds and console
197cross-builds. 100cross-builds.
198</p> 101</p>
199<h3 id="architectures">CPU Architectures</h3>
200<table class="compat">
201<tr class="compathead">
202<td class="compatname">CPU</td>
203<td class="compatbits">Bits</td>
204<td class="compatx">Requirements</td>
205<td class="compatx">Variants</td>
206<td class="compatx">LuaJIT Versions</td>
207</tr>
208<tr class="odd separate">
209<td class="compatname">x86</td>
210<td class="compatbits">32</td>
211<td class="compatx">v2.1+: SSE2</td>
212<td class="compatx">&nbsp;</td>
213<td class="compatx">v2.0 &ndash;</td>
214</tr>
215<tr class="even">
216<td class="compatname">x64</td>
217<td class="compatbits">64</td>
218<td class="compatx">&nbsp;</td>
219<td class="compatx">&nbsp;</td>
220<td class="compatx">v2.0 &ndash;</td>
221</tr>
222<tr class="odd">
223<td class="compatname">ARM</td>
224<td class="compatbits">32</td>
225<td class="compatx">ARMv5+, ARM9E+</td>
226<td class="compatx">hard-fp + soft-fp</td>
227<td class="compatx">v2.0 &ndash;</td>
228</tr>
229<tr class="even">
230<td class="compatname">ARM64</td>
231<td class="compatbits">64</td>
232<td class="compatx">&nbsp;</td>
233<td class="compatx">ARM64le + ARM64be</td>
234<td class="compatx">v2.1 &ndash;</td>
235</tr>
236<tr class="odd">
237<td class="compatname">PPC32</td>
238<td class="compatbits">32</td>
239<td class="compatx">&nbsp;</td>
240<td class="compatx">hard-fp + soft-fp</td>
241<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
242</tr>
243<tr class="even">
244<td class="compatname">PPC/e500</td>
245<td class="compatbits">32</td>
246<td class="compatx">e500v2</td>
247<td class="compatx">&nbsp;</td>
248<td class="compatx">v2.0 EOL</td>
249</tr>
250<tr class="odd">
251<td class="compatname">MIPS32</td>
252<td class="compatbits">32</td>
253<td class="compatx">MIPS32r1 &ndash; r5</td>
254<td class="compatx">hard-fp + soft-fp</td>
255<td class="compatx">v2.0 &ndash;</td>
256</tr>
257<tr class="even">
258<td class="compatname">MIPS64</td>
259<td class="compatbits">64</td>
260<td class="compatx">MIPS64r1 &ndash; r5</td>
261<td class="compatx">hard-fp + soft-fp</td>
262<td class="compatx">v2.1 &ndash;</td>
263</tr>
264<tr class="odd">
265<td class="compatname">MIPS64</td>
266<td class="compatbits">64</td>
267<td class="compatx">MIPS64r6</td>
268<td class="compatx">hard-fp + soft-fp</td>
269<td class="compatx">v2.1 EOL</td>
270</tr>
271<tr class="even">
272<td class="compatname">RISC-V</td>
273<td class="compatbits">64</td>
274<td class="compatx">RVA22+</td>
275<td class="compatx">&nbsp;</td>
276<td class="compatx">TBA</td>
277</tr>
278</table>
279<p> 102<p>
280There are no plans to add historic architectures or to continue support 103Batch files are provided for MSVC++ builds and console cross-builds.
281for end-of-life (EOL) architectures, for which no new CPUs are commonly
282available anymore. Likewise, there are no plans to support marginal
283and/or de-facto-dead architectures.
284</p> 104</p>
285 105
286<h2>Configuring LuaJIT</h2> 106<h2>Configuring LuaJIT</h2>
@@ -290,7 +110,6 @@ Usually there is no need to tweak the settings. The following files
290hold all user-configurable settings: 110hold all user-configurable settings:
291</p> 111</p>
292<ul> 112<ul>
293<li><tt>src/luaconf.h</tt> sets some configuration variables.</li>
294<li><tt>Makefile</tt> has settings for <b>installing</b> LuaJIT (POSIX 113<li><tt>Makefile</tt> has settings for <b>installing</b> LuaJIT (POSIX
295only).</li> 114only).</li>
296<li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT 115<li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT
@@ -306,23 +125,11 @@ any settings.
306<h2 id="posix">POSIX Systems (Linux, macOS, *BSD etc.)</h2> 125<h2 id="posix">POSIX Systems (Linux, macOS, *BSD etc.)</h2>
307<h3>Prerequisites</h3> 126<h3>Prerequisites</h3>
308<p> 127<p>
309Depending on your distribution, you may need to install a package for 128Depending on your distribution, you may need to install a package for a
310GCC, the development headers and/or a complete SDK. E.g. on a current 129compiler (GCC or Clang/LLVM), the development headers and/or a complete SDK.
311Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager. 130E.g. on a current Debian/Ubuntu, install <tt>build-essential</tt> with the
131package manager.
312</p> 132</p>
313<p>
314The recommended way to fetch the latest version is to do a pull from
315the git repository.
316</p>
317<p>
318Alternatively, download the latest source package of LuaJIT (pick the .tar.gz).
319Move it to a directory of your choice, open a terminal window and change
320to this directory. Now unpack the archive and change to the newly created
321directory (replace XX.YY.ZZ with the version you downloaded):
322</p>
323<pre class="code">
324tar zxf LuaJIT-XX.YY.ZZ.tar.gz
325cd LuaJIT-XX.YY.ZZ
326</pre> 133</pre>
327<h3>Building LuaJIT</h3> 134<h3>Building LuaJIT</h3>
328<p> 135<p>
@@ -380,15 +187,10 @@ Either install one of the open source SDKs
380GCC plus the required development headers. 187GCC plus the required development headers.
381Or install Microsoft's Visual Studio (MSVC). 188Or install Microsoft's Visual Studio (MSVC).
382</p> 189</p>
383<p>
384Next, pull from the git repository or download the source package and
385unpack it using an archive manager (e.g. the Windows Explorer) to
386a directory of your choice.
387</p>
388<h3>Building with MSVC</h3> 190<h3>Building with MSVC</h3>
389<p> 191<p>
390Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the 192Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the
391directory where you've unpacked the sources and run these commands: 193directory with the source code and run these commands:
392</p> 194</p>
393<pre class="code"> 195<pre class="code">
394cd src 196cd src
@@ -401,8 +203,8 @@ Then follow the installation instructions below.
401<h3>Building with MinGW or Cygwin</h3> 203<h3>Building with MinGW or Cygwin</h3>
402<p> 204<p>
403Open a command prompt window and make sure the MinGW or Cygwin programs 205Open a command prompt window and make sure the MinGW or Cygwin programs
404are in your path. Then <tt>cd</tt> to the directory of the git repository 206are in your path. Then <tt>cd</tt> to the directory of the git repository.
405or where you've unpacked the sources. Then run this command for MinGW: 207Then run this command for MinGW:
406</p> 208</p>
407<pre class="code"> 209<pre class="code">
408mingw32-make 210mingw32-make
@@ -547,8 +349,8 @@ make HOST_CC="gcc -m32" CROSS=ppu-lv2-
547To cross-compile for the other consoles from a Windows host, open a 349To cross-compile for the other consoles from a Windows host, open a
548"Native Tools Command Prompt for VS". You need to choose either the 32 350"Native Tools Command Prompt for VS". You need to choose either the 32
549or the 64&nbsp;bit version of the host compiler to match the target. 351or the 64&nbsp;bit version of the host compiler to match the target.
550Then <tt>cd</tt> to the <tt>src</tt> directory below where you've 352Then <tt>cd</tt> to the <tt>src</tt> directory below the source code
551unpacked the sources and run the build command given in the table: 353and run the build command given in the table:
552</p> 354</p>
553<table class="compat"> 355<table class="compat">
554<tr class="compathead"> 356<tr class="compathead">