aboutsummaryrefslogtreecommitdiff
path: root/doc/install.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--doc/install.html242
1 files changed, 22 insertions, 220 deletions
diff --git a/doc/install.html b/doc/install.html
index 0ccd37aa..be721031 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 {
@@ -69,18 +69,18 @@ td.compatx {
69<a href="ext_profiler.html">Profiler</a> 69<a href="ext_profiler.html">Profiler</a>
70</li></ul> 70</li></ul>
71</li><li> 71</li><li>
72<a href="status.html">Status</a> 72<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
73</li><li> 73</li><li>
74<a href="faq.html">FAQ</a> 74<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
75</li><li> 75</li><li>
76<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 76<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
77</li></ul> 77</li></ul>
78</div> 78</div>
79<div id="main"> 79<div id="main">
80<p> 80<p>
81LuaJIT is only distributed as a source package. This page explains 81LuaJIT is only distributed as source code &mdash; get it from the
82how to build and install LuaJIT with different operating systems 82<a href="https://luajit.org/download.html"><span class="ext">&raquo;</span>&nbsp;git repository</a>. This page explains how to build
83and C&nbsp;compilers. 83and install the LuaJIT binary and library for different operating systems.
84</p> 84</p>
85<p> 85<p>
86For the impatient (on POSIX systems): 86For the impatient (on POSIX systems):
@@ -90,201 +90,21 @@ make &amp;&amp; sudo make install
90</pre> 90</pre>
91 91
92<h2 id="req">Requirements</h2> 92<h2 id="req">Requirements</h2>
93<h3 id="systems">Systems</h3>
94<p> 93<p>
95LuaJIT currently builds out-of-the box on most systems: 94LuaJIT currently builds out-of-the box on most systems. Please check the
95supported operating systems and CPU architectures on the
96<a href="https://luajit.org/status.html"><span class="ext">&raquo;</span>&nbsp;status page</a>.
96</p> 97</p>
97<table class="compat">
98<tr class="compathead">
99<td class="compatname">OS</td>
100<td class="compatver">Min. Version</td>
101<td class="compatx">Requirements</td>
102<td class="compatx">LuaJIT Versions</td>
103</tr>
104<tr class="odd separate">
105<td class="compatname"><a href="#windows">Windows</a></td>
106<td class="compatver">7</td>
107<td class="compatx">x86 or x64, ARM64: TBA</td>
108<td class="compatx">v2.0 &ndash;</td>
109</tr>
110<tr class="even">
111<td class="compatname"><a href="#posix">Linux</a></td>
112<td class="compatver">&nbsp;</td>
113<td class="compatx">&nbsp;</td>
114<td class="compatx">v2.0 &ndash;</td>
115</tr>
116<tr class="odd">
117<td class="compatname"><a href="#posix">*BSD</a></td>
118<td class="compatver">&nbsp;</td>
119<td class="compatx">&nbsp;</td>
120<td class="compatx">v2.0 &ndash;</td>
121</tr>
122<tr class="even">
123<td class="compatname"><a href="#posix">macOS (OSX)</a></td>
124<td class="compatver">10.4</td>
125<td class="compatx">&nbsp;</td>
126<td class="compatx">v2.1 &ndash;</td>
127</tr>
128<tr class="odd">
129<td class="compatname"><a href="#posix">POSIX</a></td>
130<td class="compatver">&nbsp;</td>
131<td class="compatx">mmap, dlopen</td>
132<td class="compatx">v2.0 &ndash;</td>
133</tr>
134<tr class="even separate">
135<td class="compatname"><a href="#android">Android</a></td>
136<td class="compatver">4.0</td>
137<td class="compatx">Recent Android NDK</td>
138<td class="compatx">v2.0 &ndash;</td>
139</tr>
140<tr class="odd">
141<td class="compatname"><a href="#ios">iOS</a></td>
142<td class="compatver">3.0</td>
143<td class="compatx">Xcode iOS SDK</td>
144<td class="compatx">v2.1 &ndash;</td>
145</tr>
146<tr class="even separate">
147<td class="compatname"><a href="#consoles">PS3</a></td>
148<td class="compatver">&nbsp;</td>
149<td class="compatx">PS3 SDK</td>
150<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
151</tr>
152<tr class="odd">
153<td class="compatname"><a href="#consoles">PS4</a></td>
154<td class="compatver">&nbsp;</td>
155<td class="compatx">PS4 SDK (ORBIS)</td>
156<td class="compatx">v2.0 &ndash;</td>
157</tr>
158<tr class="even">
159<td class="compatname"><a href="#consoles">PS5</a></td>
160<td class="compatver">&nbsp;</td>
161<td class="compatx">PS5 SDK (PROSPERO)</td>
162<td class="compatx">v2.1 &ndash;</td>
163</tr>
164<tr class="odd">
165<td class="compatname"><a href="#consoles">PS Vita</a></td>
166<td class="compatver">&nbsp;</td>
167<td class="compatx">PS Vita SDK (PSP2)</td>
168<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
169</tr>
170<tr class="even">
171<td class="compatname"><a href="#consoles">Xbox 360</a></td>
172<td class="compatver">&nbsp;</td>
173<td class="compatx">Xbox 360 SDK (XEDK)</td>
174<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
175</tr>
176<tr class="odd">
177<td class="compatname"><a href="#consoles">Xbox One</a></td>
178<td class="compatver">&nbsp;</td>
179<td class="compatx">Xbox One SDK (DURANGO)</td>
180<td class="compatx">v2.1 &ndash;</td>
181</tr>
182<tr class="even">
183<td class="compatname"><a href="#consoles">Nintendo Switch</a></td>
184<td class="compatver">&nbsp;</td>
185<td class="compatx">NintendoSDK + NX Addon</td>
186<td class="compatx">v2.1 &ndash;</td>
187</tr>
188</table>
189<p>
190The codebase has compatibility defines for some more systems, but
191without official support.
192</p>
193<h3 id="toolchains">Toolchains</h3>
194<p> 98<p>
195Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or 99Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or
196MSVC++. 100MSVC++.
197</p> 101</p>
198<p> 102<p>
199The Makefile-based build system requires GNU Make and supports 103The Makefile-based build system requires GNU Make and supports
200cross-builds. Batch files are provided for MSVC++ builds and console
201cross-builds. 104cross-builds.
202</p> 105</p>
203<h3 id="architectures">CPU Architectures</h3>
204<table class="compat">
205<tr class="compathead">
206<td class="compatname">CPU</td>
207<td class="compatbits">Bits</td>
208<td class="compatx">Requirements</td>
209<td class="compatx">Variants</td>
210<td class="compatx">LuaJIT Versions</td>
211</tr>
212<tr class="odd separate">
213<td class="compatname">x86</td>
214<td class="compatbits">32</td>
215<td class="compatx">v2.1+: SSE2</td>
216<td class="compatx">&nbsp;</td>
217<td class="compatx">v2.0 &ndash;</td>
218</tr>
219<tr class="even">
220<td class="compatname">x64</td>
221<td class="compatbits">64</td>
222<td class="compatx">&nbsp;</td>
223<td class="compatx">&nbsp;</td>
224<td class="compatx">v2.0 &ndash;</td>
225</tr>
226<tr class="odd">
227<td class="compatname">ARM</td>
228<td class="compatbits">32</td>
229<td class="compatx">ARMv5+, ARM9E+</td>
230<td class="compatx">hard-fp + soft-fp</td>
231<td class="compatx">v2.0 &ndash;</td>
232</tr>
233<tr class="even">
234<td class="compatname">ARM64</td>
235<td class="compatbits">64</td>
236<td class="compatx">&nbsp;</td>
237<td class="compatx">ARM64le + ARM64be</td>
238<td class="compatx">v2.1 &ndash;</td>
239</tr>
240<tr class="odd">
241<td class="compatname">PPC32</td>
242<td class="compatbits">32</td>
243<td class="compatx">&nbsp;</td>
244<td class="compatx">hard-fp + soft-fp</td>
245<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
246</tr>
247<tr class="even">
248<td class="compatname">PPC/e500</td>
249<td class="compatbits">32</td>
250<td class="compatx">e500v2</td>
251<td class="compatx">&nbsp;</td>
252<td class="compatx">v2.0 EOL</td>
253</tr>
254<tr class="odd">
255<td class="compatname">MIPS32</td>
256<td class="compatbits">32</td>
257<td class="compatx">MIPS32r1 &ndash; r5</td>
258<td class="compatx">hard-fp + soft-fp</td>
259<td class="compatx">v2.0 &ndash;</td>
260</tr>
261<tr class="even">
262<td class="compatname">MIPS64</td>
263<td class="compatbits">64</td>
264<td class="compatx">MIPS64r1 &ndash; r5</td>
265<td class="compatx">hard-fp + soft-fp</td>
266<td class="compatx">v2.1 &ndash;</td>
267</tr>
268<tr class="odd">
269<td class="compatname">MIPS64</td>
270<td class="compatbits">64</td>
271<td class="compatx">MIPS64r6</td>
272<td class="compatx">hard-fp + soft-fp</td>
273<td class="compatx">v2.1 EOL</td>
274</tr>
275<tr class="even">
276<td class="compatname">RISC-V</td>
277<td class="compatbits">64</td>
278<td class="compatx">RVA22+</td>
279<td class="compatx">&nbsp;</td>
280<td class="compatx">TBA</td>
281</tr>
282</table>
283<p> 106<p>
284There are no plans to add historic architectures or to continue support 107Batch files are provided for MSVC++ builds and console cross-builds.
285for end-of-life (EOL) architectures, for which no new CPUs are commonly
286available anymore. Likewise, there are no plans to support marginal
287and/or de-facto-dead architectures.
288</p> 108</p>
289 109
290<h2>Configuring LuaJIT</h2> 110<h2>Configuring LuaJIT</h2>
@@ -294,7 +114,6 @@ Usually there is no need to tweak the settings. The following files
294hold all user-configurable settings: 114hold all user-configurable settings:
295</p> 115</p>
296<ul> 116<ul>
297<li><tt>src/luaconf.h</tt> sets some configuration variables.</li>
298<li><tt>Makefile</tt> has settings for <b>installing</b> LuaJIT (POSIX 117<li><tt>Makefile</tt> has settings for <b>installing</b> LuaJIT (POSIX
299only).</li> 118only).</li>
300<li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT 119<li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT
@@ -317,23 +136,11 @@ Please check the note about the
317<h2 id="posix">POSIX Systems (Linux, macOS, *BSD etc.)</h2> 136<h2 id="posix">POSIX Systems (Linux, macOS, *BSD etc.)</h2>
318<h3>Prerequisites</h3> 137<h3>Prerequisites</h3>
319<p> 138<p>
320Depending on your distribution, you may need to install a package for 139Depending on your distribution, you may need to install a package for a
321GCC, the development headers and/or a complete SDK. E.g. on a current 140compiler (GCC or Clang/LLVM), the development headers and/or a complete SDK.
322Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager. 141E.g. on a current Debian/Ubuntu, install <tt>build-essential</tt> with the
142package manager.
323</p> 143</p>
324<p>
325The recommended way to fetch the latest version is to do a pull from
326the git repository.
327</p>
328<p>
329Alternatively, download the latest source package of LuaJIT (pick the .tar.gz).
330Move it to a directory of your choice, open a terminal window and change
331to this directory. Now unpack the archive and change to the newly created
332directory (replace XX.YY.ZZ with the version you downloaded):
333</p>
334<pre class="code">
335tar zxf LuaJIT-XX.YY.ZZ.tar.gz
336cd LuaJIT-XX.YY.ZZ
337</pre> 144</pre>
338<h3>Building LuaJIT</h3> 145<h3>Building LuaJIT</h3>
339<p> 146<p>
@@ -394,15 +201,10 @@ Either install one of the open source SDKs
394GCC plus the required development headers. 201GCC plus the required development headers.
395Or install Microsoft's Visual Studio (MSVC). 202Or install Microsoft's Visual Studio (MSVC).
396</p> 203</p>
397<p>
398Next, pull from the git repository or download the source package and
399unpack it using an archive manager (e.g. the Windows Explorer) to
400a directory of your choice.
401</p>
402<h3>Building with MSVC</h3> 204<h3>Building with MSVC</h3>
403<p> 205<p>
404Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the 206Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the
405directory where you've unpacked the sources and run these commands: 207directory with the source code and run these commands:
406</p> 208</p>
407<pre class="code"> 209<pre class="code">
408cd src 210cd src
@@ -415,8 +217,8 @@ Then follow the installation instructions below.
415<h3>Building with MinGW or Cygwin</h3> 217<h3>Building with MinGW or Cygwin</h3>
416<p> 218<p>
417Open a command prompt window and make sure the MinGW or Cygwin programs 219Open a command prompt window and make sure the MinGW or Cygwin programs
418are in your path. Then <tt>cd</tt> to the directory of the git repository 220are in your path. Then <tt>cd</tt> to the directory of the git repository.
419or where you've unpacked the sources. Then run this command for MinGW: 221Then run this command for MinGW:
420</p> 222</p>
421<pre class="code"> 223<pre class="code">
422mingw32-make 224mingw32-make
@@ -518,15 +320,15 @@ make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- \
518make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabihf- 320make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabihf-
519 321
520# ARM64 322# ARM64
521make CROSS=aarch64-linux- 323make CROSS=aarch64-linux-gnu-
522 324
523# PPC 325# PPC
524make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu- 326make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu-
525 327
526# MIPS32 big-endian 328# MIPS32 big-endian
527make HOST_CC="gcc -m32" CROSS=mips-linux- 329make HOST_CC="gcc -m32" CROSS=mips-linux-gnu-
528# MIPS32 little-endian 330# MIPS32 little-endian
529make HOST_CC="gcc -m32" CROSS=mipsel-linux- 331make HOST_CC="gcc -m32" CROSS=mipsel-linux-gnu-
530 332
531# MIPS64 big-endian 333# MIPS64 big-endian
532make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64" 334make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64"
@@ -605,8 +407,8 @@ make HOST_CC="gcc -m32" CROSS=ppu-lv2-
605To cross-compile for the other consoles from a Windows host, open a 407To cross-compile for the other consoles from a Windows host, open a
606"Native Tools Command Prompt for VS". You need to choose either the 32 408"Native Tools Command Prompt for VS". You need to choose either the 32
607or the 64&nbsp;bit version of the host compiler to match the target. 409or the 64&nbsp;bit version of the host compiler to match the target.
608Then <tt>cd</tt> to the <tt>src</tt> directory below where you've 410Then <tt>cd</tt> to the <tt>src</tt> directory below the source code
609unpacked the sources and run the build command given in the table: 411and run the build command given in the table:
610</p> 412</p>
611<table class="compat"> 413<table class="compat">
612<tr class="compathead"> 414<tr class="compathead">