diff options
Diffstat (limited to 'doc/install.html')
| -rw-r--r-- | doc/install.html | 242 |
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 | } |
| 23 | td.compatname, td.compatver { | 23 | td.compatname { |
| 24 | width: 10%; | 24 | width: 10%; |
| 25 | } | 25 | } |
| 26 | td.compatbits { | 26 | td.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">»</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">»</span></a> |
| 75 | </li><li> | 75 | </li><li> |
| 76 | <a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a> | 76 | <a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a> |
| 77 | </li></ul> | 77 | </li></ul> |
| 78 | </div> | 78 | </div> |
| 79 | <div id="main"> | 79 | <div id="main"> |
| 80 | <p> | 80 | <p> |
| 81 | LuaJIT is only distributed as a source package. This page explains | 81 | LuaJIT is only distributed as source code — get it from the |
| 82 | how to build and install LuaJIT with different operating systems | 82 | <a href="https://luajit.org/download.html"><span class="ext">»</span> git repository</a>. This page explains how to build |
| 83 | and C compilers. | 83 | and install the LuaJIT binary and library for different operating systems. |
| 84 | </p> | 84 | </p> |
| 85 | <p> | 85 | <p> |
| 86 | For the impatient (on POSIX systems): | 86 | For the impatient (on POSIX systems): |
| @@ -90,201 +90,21 @@ make && 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> |
| 95 | LuaJIT currently builds out-of-the box on most systems: | 94 | LuaJIT currently builds out-of-the box on most systems. Please check the |
| 95 | supported operating systems and CPU architectures on the | ||
| 96 | <a href="https://luajit.org/status.html"><span class="ext">»</span> 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 –</td> | ||
| 109 | </tr> | ||
| 110 | <tr class="even"> | ||
| 111 | <td class="compatname"><a href="#posix">Linux</a></td> | ||
| 112 | <td class="compatver"> </td> | ||
| 113 | <td class="compatx"> </td> | ||
| 114 | <td class="compatx">v2.0 –</td> | ||
| 115 | </tr> | ||
| 116 | <tr class="odd"> | ||
| 117 | <td class="compatname"><a href="#posix">*BSD</a></td> | ||
| 118 | <td class="compatver"> </td> | ||
| 119 | <td class="compatx"> </td> | ||
| 120 | <td class="compatx">v2.0 –</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"> </td> | ||
| 126 | <td class="compatx">v2.1 –</td> | ||
| 127 | </tr> | ||
| 128 | <tr class="odd"> | ||
| 129 | <td class="compatname"><a href="#posix">POSIX</a></td> | ||
| 130 | <td class="compatver"> </td> | ||
| 131 | <td class="compatx">mmap, dlopen</td> | ||
| 132 | <td class="compatx">v2.0 –</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 –</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 –</td> | ||
| 145 | </tr> | ||
| 146 | <tr class="even separate"> | ||
| 147 | <td class="compatname"><a href="#consoles">PS3</a></td> | ||
| 148 | <td class="compatver"> </td> | ||
| 149 | <td class="compatx">PS3 SDK</td> | ||
| 150 | <td class="compatx">v2.0 – v2.1 EOL</td> | ||
| 151 | </tr> | ||
| 152 | <tr class="odd"> | ||
| 153 | <td class="compatname"><a href="#consoles">PS4</a></td> | ||
| 154 | <td class="compatver"> </td> | ||
| 155 | <td class="compatx">PS4 SDK (ORBIS)</td> | ||
| 156 | <td class="compatx">v2.0 –</td> | ||
| 157 | </tr> | ||
| 158 | <tr class="even"> | ||
| 159 | <td class="compatname"><a href="#consoles">PS5</a></td> | ||
| 160 | <td class="compatver"> </td> | ||
| 161 | <td class="compatx">PS5 SDK (PROSPERO)</td> | ||
| 162 | <td class="compatx">v2.1 –</td> | ||
| 163 | </tr> | ||
| 164 | <tr class="odd"> | ||
| 165 | <td class="compatname"><a href="#consoles">PS Vita</a></td> | ||
| 166 | <td class="compatver"> </td> | ||
| 167 | <td class="compatx">PS Vita SDK (PSP2)</td> | ||
| 168 | <td class="compatx">v2.0 – 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"> </td> | ||
| 173 | <td class="compatx">Xbox 360 SDK (XEDK)</td> | ||
| 174 | <td class="compatx">v2.0 – 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"> </td> | ||
| 179 | <td class="compatx">Xbox One SDK (DURANGO)</td> | ||
| 180 | <td class="compatx">v2.1 –</td> | ||
| 181 | </tr> | ||
| 182 | <tr class="even"> | ||
| 183 | <td class="compatname"><a href="#consoles">Nintendo Switch</a></td> | ||
| 184 | <td class="compatver"> </td> | ||
| 185 | <td class="compatx">NintendoSDK + NX Addon</td> | ||
| 186 | <td class="compatx">v2.1 –</td> | ||
| 187 | </tr> | ||
| 188 | </table> | ||
| 189 | <p> | ||
| 190 | The codebase has compatibility defines for some more systems, but | ||
| 191 | without official support. | ||
| 192 | </p> | ||
| 193 | <h3 id="toolchains">Toolchains</h3> | ||
| 194 | <p> | 98 | <p> |
| 195 | Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or | 99 | Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or |
| 196 | MSVC++. | 100 | MSVC++. |
| 197 | </p> | 101 | </p> |
| 198 | <p> | 102 | <p> |
| 199 | The Makefile-based build system requires GNU Make and supports | 103 | The Makefile-based build system requires GNU Make and supports |
| 200 | cross-builds. Batch files are provided for MSVC++ builds and console | ||
| 201 | cross-builds. | 104 | cross-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"> </td> | ||
| 217 | <td class="compatx">v2.0 –</td> | ||
| 218 | </tr> | ||
| 219 | <tr class="even"> | ||
| 220 | <td class="compatname">x64</td> | ||
| 221 | <td class="compatbits">64</td> | ||
| 222 | <td class="compatx"> </td> | ||
| 223 | <td class="compatx"> </td> | ||
| 224 | <td class="compatx">v2.0 –</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 –</td> | ||
| 232 | </tr> | ||
| 233 | <tr class="even"> | ||
| 234 | <td class="compatname">ARM64</td> | ||
| 235 | <td class="compatbits">64</td> | ||
| 236 | <td class="compatx"> </td> | ||
| 237 | <td class="compatx">ARM64le + ARM64be</td> | ||
| 238 | <td class="compatx">v2.1 –</td> | ||
| 239 | </tr> | ||
| 240 | <tr class="odd"> | ||
| 241 | <td class="compatname">PPC32</td> | ||
| 242 | <td class="compatbits">32</td> | ||
| 243 | <td class="compatx"> </td> | ||
| 244 | <td class="compatx">hard-fp + soft-fp</td> | ||
| 245 | <td class="compatx">v2.0 – 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"> </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 – r5</td> | ||
| 258 | <td class="compatx">hard-fp + soft-fp</td> | ||
| 259 | <td class="compatx">v2.0 –</td> | ||
| 260 | </tr> | ||
| 261 | <tr class="even"> | ||
| 262 | <td class="compatname">MIPS64</td> | ||
| 263 | <td class="compatbits">64</td> | ||
| 264 | <td class="compatx">MIPS64r1 – r5</td> | ||
| 265 | <td class="compatx">hard-fp + soft-fp</td> | ||
| 266 | <td class="compatx">v2.1 –</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"> </td> | ||
| 280 | <td class="compatx">TBA</td> | ||
| 281 | </tr> | ||
| 282 | </table> | ||
| 283 | <p> | 106 | <p> |
| 284 | There are no plans to add historic architectures or to continue support | 107 | Batch files are provided for MSVC++ builds and console cross-builds. |
| 285 | for end-of-life (EOL) architectures, for which no new CPUs are commonly | ||
| 286 | available anymore. Likewise, there are no plans to support marginal | ||
| 287 | and/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 | |||
| 294 | hold all user-configurable settings: | 114 | hold 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 |
| 299 | only).</li> | 118 | only).</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> |
| 320 | Depending on your distribution, you may need to install a package for | 139 | Depending on your distribution, you may need to install a package for a |
| 321 | GCC, the development headers and/or a complete SDK. E.g. on a current | 140 | compiler (GCC or Clang/LLVM), the development headers and/or a complete SDK. |
| 322 | Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager. | 141 | E.g. on a current Debian/Ubuntu, install <tt>build-essential</tt> with the |
| 142 | package manager. | ||
| 323 | </p> | 143 | </p> |
| 324 | <p> | ||
| 325 | The recommended way to fetch the latest version is to do a pull from | ||
| 326 | the git repository. | ||
| 327 | </p> | ||
| 328 | <p> | ||
| 329 | Alternatively, download the latest source package of LuaJIT (pick the .tar.gz). | ||
| 330 | Move it to a directory of your choice, open a terminal window and change | ||
| 331 | to this directory. Now unpack the archive and change to the newly created | ||
| 332 | directory (replace XX.YY.ZZ with the version you downloaded): | ||
| 333 | </p> | ||
| 334 | <pre class="code"> | ||
| 335 | tar zxf LuaJIT-XX.YY.ZZ.tar.gz | ||
| 336 | cd 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 | |||
| 394 | GCC plus the required development headers. | 201 | GCC plus the required development headers. |
| 395 | Or install Microsoft's Visual Studio (MSVC). | 202 | Or install Microsoft's Visual Studio (MSVC). |
| 396 | </p> | 203 | </p> |
| 397 | <p> | ||
| 398 | Next, pull from the git repository or download the source package and | ||
| 399 | unpack it using an archive manager (e.g. the Windows Explorer) to | ||
| 400 | a directory of your choice. | ||
| 401 | </p> | ||
| 402 | <h3>Building with MSVC</h3> | 204 | <h3>Building with MSVC</h3> |
| 403 | <p> | 205 | <p> |
| 404 | Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the | 206 | Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the |
| 405 | directory where you've unpacked the sources and run these commands: | 207 | directory with the source code and run these commands: |
| 406 | </p> | 208 | </p> |
| 407 | <pre class="code"> | 209 | <pre class="code"> |
| 408 | cd src | 210 | cd 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> |
| 417 | Open a command prompt window and make sure the MinGW or Cygwin programs | 219 | Open a command prompt window and make sure the MinGW or Cygwin programs |
| 418 | are in your path. Then <tt>cd</tt> to the directory of the git repository | 220 | are in your path. Then <tt>cd</tt> to the directory of the git repository. |
| 419 | or where you've unpacked the sources. Then run this command for MinGW: | 221 | Then run this command for MinGW: |
| 420 | </p> | 222 | </p> |
| 421 | <pre class="code"> | 223 | <pre class="code"> |
| 422 | mingw32-make | 224 | mingw32-make |
| @@ -518,15 +320,15 @@ make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- \ | |||
| 518 | make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabihf- | 320 | make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabihf- |
| 519 | 321 | ||
| 520 | # ARM64 | 322 | # ARM64 |
| 521 | make CROSS=aarch64-linux- | 323 | make CROSS=aarch64-linux-gnu- |
| 522 | 324 | ||
| 523 | # PPC | 325 | # PPC |
| 524 | make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu- | 326 | make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu- |
| 525 | 327 | ||
| 526 | # MIPS32 big-endian | 328 | # MIPS32 big-endian |
| 527 | make HOST_CC="gcc -m32" CROSS=mips-linux- | 329 | make HOST_CC="gcc -m32" CROSS=mips-linux-gnu- |
| 528 | # MIPS32 little-endian | 330 | # MIPS32 little-endian |
| 529 | make HOST_CC="gcc -m32" CROSS=mipsel-linux- | 331 | make HOST_CC="gcc -m32" CROSS=mipsel-linux-gnu- |
| 530 | 332 | ||
| 531 | # MIPS64 big-endian | 333 | # MIPS64 big-endian |
| 532 | make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64" | 334 | make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64" |
| @@ -605,8 +407,8 @@ make HOST_CC="gcc -m32" CROSS=ppu-lv2- | |||
| 605 | To cross-compile for the other consoles from a Windows host, open a | 407 | To 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 |
| 607 | or the 64 bit version of the host compiler to match the target. | 409 | or the 64 bit version of the host compiler to match the target. |
| 608 | Then <tt>cd</tt> to the <tt>src</tt> directory below where you've | 410 | Then <tt>cd</tt> to the <tt>src</tt> directory below the source code |
| 609 | unpacked the sources and run the build command given in the table: | 411 | and 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"> |
