diff options
| author | Mike Pall <mike> | 2021-01-02 21:17:01 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2021-01-02 21:17:01 +0100 |
| commit | ee855749a188d3d13bba9a0e58f430e138e641ae (patch) | |
| tree | 429ef17b62a88682f920d95a6dec28cd4f7f7789 /doc/install.html | |
| parent | 56c04accf975bff2519c34721dccbbdb7b8e6963 (diff) | |
| download | luajit-ee855749a188d3d13bba9a0e58f430e138e641ae.tar.gz luajit-ee855749a188d3d13bba9a0e58f430e138e641ae.tar.bz2 luajit-ee855749a188d3d13bba9a0e58f430e138e641ae.zip | |
Documentation cleanup.
Diffstat (limited to 'doc/install.html')
| -rw-r--r-- | doc/install.html | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/doc/install.html b/doc/install.html index 85ca9913..6110450c 100644 --- a/doc/install.html +++ b/doc/install.html | |||
| @@ -101,8 +101,8 @@ operating systems, CPUs and compilers: | |||
| 101 | <td class="compatcpu">CPU / OS</td> | 101 | <td class="compatcpu">CPU / OS</td> |
| 102 | <td class="compatos"><a href="#posix">Linux</a> or<br><a href="#android">Android</a></td> | 102 | <td class="compatos"><a href="#posix">Linux</a> or<br><a href="#android">Android</a></td> |
| 103 | <td class="compatos"><a href="#posix">*BSD, Other</a></td> | 103 | <td class="compatos"><a href="#posix">*BSD, Other</a></td> |
| 104 | <td class="compatos"><a href="#posix">OSX 10.4+</a> or<br><a href="#ios">iOS 3.0+</a></td> | 104 | <td class="compatos"><a href="#posix">macOS 10.4+</a> or<br><a href="#ios">iOS 3.0+</a></td> |
| 105 | <td class="compatos"><a href="#windows">Windows<br>XP/Vista/7</a></td> | 105 | <td class="compatos"><a href="#windows">Windows XP<br>or later</a></td> |
| 106 | </tr> | 106 | </tr> |
| 107 | <tr class="odd separate"> | 107 | <tr class="odd separate"> |
| 108 | <td class="compatcpu">x86 (32 bit)</td> | 108 | <td class="compatcpu">x86 (32 bit)</td> |
| @@ -168,7 +168,7 @@ Please read the instructions given in these files, before changing | |||
| 168 | any settings. | 168 | any settings. |
| 169 | </p> | 169 | </p> |
| 170 | 170 | ||
| 171 | <h2 id="posix">POSIX Systems (Linux, OSX, *BSD etc.)</h2> | 171 | <h2 id="posix">POSIX Systems (Linux, macOS, *BSD etc.)</h2> |
| 172 | <h3>Prerequisites</h3> | 172 | <h3>Prerequisites</h3> |
| 173 | <p> | 173 | <p> |
| 174 | Depending on your distribution, you may need to install a package for | 174 | Depending on your distribution, you may need to install a package for |
| @@ -176,8 +176,9 @@ GCC, the development headers and/or a complete SDK. E.g. on a current | |||
| 176 | Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager. | 176 | Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager. |
| 177 | </p> | 177 | </p> |
| 178 | <p> | 178 | <p> |
| 179 | Download the current source package of LuaJIT (pick the .tar.gz), | 179 | The recommended way to fetch the latest version is to do a pull from |
| 180 | if you haven't already done so. Move it to a directory of your choice, | 180 | the git repository. Alternatively download the latest source package of |
| 181 | LuaJIT (pick the .tar.gz). Move it to a directory of your choice, | ||
| 181 | open a terminal window and change to this directory. Now unpack the archive | 182 | open a terminal window and change to this directory. Now unpack the archive |
| 182 | and change to the newly created directory: | 183 | and change to the newly created directory: |
| 183 | </p> | 184 | </p> |
| @@ -207,7 +208,7 @@ You can add an extra prefix to the search paths by appending the | |||
| 207 | make PREFIX=/home/myself/lj2 | 208 | make PREFIX=/home/myself/lj2 |
| 208 | </pre> | 209 | </pre> |
| 209 | <p> | 210 | <p> |
| 210 | Note for OSX: you must set the <tt>MACOSX_DEPLOYMENT_TARGET</tt> | 211 | Note for macOS: you must set the <tt>MACOSX_DEPLOYMENT_TARGET</tt> |
| 211 | environment variable to a value supported by your toolchain. | 212 | environment variable to a value supported by your toolchain. |
| 212 | </p> | 213 | </p> |
| 213 | <h3>Installing LuaJIT</h3> | 214 | <h3>Installing LuaJIT</h3> |
| @@ -241,8 +242,9 @@ GCC plus the required development headers. | |||
| 241 | Or install Microsoft's Visual Studio (MSVC). | 242 | Or install Microsoft's Visual Studio (MSVC). |
| 242 | </p> | 243 | </p> |
| 243 | <p> | 244 | <p> |
| 244 | Next, download the source package and unpack it using an archive manager | 245 | Next, pull from the git repository or download the source package and |
| 245 | (e.g. the Windows Explorer) to a directory of your choice. | 246 | unpack it using an archive manager (e.g. the Windows Explorer) to |
| 247 | a directory of your choice. | ||
| 246 | </p> | 248 | </p> |
| 247 | <h3>Building with MSVC</h3> | 249 | <h3>Building with MSVC</h3> |
| 248 | <p> | 250 | <p> |
| @@ -260,8 +262,8 @@ Then follow the installation instructions below. | |||
| 260 | <h3>Building with MinGW or Cygwin</h3> | 262 | <h3>Building with MinGW or Cygwin</h3> |
| 261 | <p> | 263 | <p> |
| 262 | Open a command prompt window and make sure the MinGW or Cygwin programs | 264 | Open a command prompt window and make sure the MinGW or Cygwin programs |
| 263 | are in your path. Then <tt>cd</tt> to the directory where | 265 | are in your path. Then <tt>cd</tt> to the directory of the git repository |
| 264 | you've unpacked the sources and run this command for MinGW: | 266 | or where you've unpacked the sources. Then run this command for MinGW: |
| 265 | </p> | 267 | </p> |
| 266 | <pre class="code"> | 268 | <pre class="code"> |
| 267 | mingw32-make | 269 | mingw32-make |
| @@ -302,7 +304,7 @@ x64 OS, you need to install the multilib development package (e.g. | |||
| 302 | <p> | 304 | <p> |
| 303 | You need to specify <tt>TARGET_SYS</tt> whenever the host OS and the | 305 | You need to specify <tt>TARGET_SYS</tt> whenever the host OS and the |
| 304 | target OS differ, or you'll get assembler or linker errors. E.g. if | 306 | target OS differ, or you'll get assembler or linker errors. E.g. if |
| 305 | you're compiling on a Windows or OSX host for embedded Linux or Android, | 307 | you're compiling on a Windows or macOS host for embedded Linux or Android, |
| 306 | you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a | 308 | you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a |
| 307 | minimal target OS, you may need to disable the built-in allocator in | 309 | minimal target OS, you may need to disable the built-in allocator in |
| 308 | <tt>src/Makefile</tt> and use <tt>TARGET_SYS=Other</tt>. Don't forget to | 310 | <tt>src/Makefile</tt> and use <tt>TARGET_SYS=Other</tt>. Don't forget to |
| @@ -461,15 +463,14 @@ intend to load Lua/C modules at runtime. | |||
| 461 | </li></ul> | 463 | </li></ul> |
| 462 | </li> | 464 | </li> |
| 463 | <li> | 465 | <li> |
| 464 | If you're building a 64 bit application on OSX which links directly or | 466 | <i>Important: this relates to LuaJIT 2.0 only — use LuaJIT 2.1 to |
| 467 | avoid these complications.</i><br> | ||
| 468 | If you're building a 64 bit application on macOS which links directly or | ||
| 465 | indirectly against LuaJIT, you need to link your main executable | 469 | indirectly against LuaJIT, you need to link your main executable |
| 466 | with these flags: | 470 | with these flags: |
| 467 | <pre class="code"> | 471 | <pre class="code"> |
| 468 | -pagezero_size 10000 -image_base 100000000 | 472 | -pagezero_size 10000 -image_base 100000000 |
| 469 | </pre> | 473 | </pre> |
| 470 | Also, it's recommended to <tt>rebase</tt> all (self-compiled) shared libraries | ||
| 471 | which are loaded at runtime on OSX/x64 (e.g. C extension modules for Lua). | ||
| 472 | See: <tt>man rebase</tt> | ||
| 473 | </li> | 474 | </li> |
| 474 | </ul> | 475 | </ul> |
| 475 | <p>Additional hints for initializing LuaJIT using the C API functions:</p> | 476 | <p>Additional hints for initializing LuaJIT using the C API functions:</p> |
| @@ -479,7 +480,7 @@ See: <tt>man rebase</tt> | |||
| 479 | for embedding Lua or LuaJIT into your application.</li> | 480 | for embedding Lua or LuaJIT into your application.</li> |
| 480 | <li>Make sure you use <tt>luaL_newstate</tt>. Avoid using | 481 | <li>Make sure you use <tt>luaL_newstate</tt>. Avoid using |
| 481 | <tt>lua_newstate</tt>, since this uses the (slower) default memory | 482 | <tt>lua_newstate</tt>, since this uses the (slower) default memory |
| 482 | allocator from your system (no support for this on x64).</li> | 483 | allocator from your system (no support for this on 64 bit architectures).</li> |
| 483 | <li>Make sure you use <tt>luaL_openlibs</tt> and not the old Lua 5.0 style | 484 | <li>Make sure you use <tt>luaL_openlibs</tt> and not the old Lua 5.0 style |
| 484 | of calling <tt>luaopen_base</tt> etc. directly.</li> | 485 | of calling <tt>luaopen_base</tt> etc. directly.</li> |
| 485 | <li>To change or extend the list of standard libraries to load, copy | 486 | <li>To change or extend the list of standard libraries to load, copy |
