aboutsummaryrefslogtreecommitdiff
path: root/doc/install.html
diff options
context:
space:
mode:
authorMike Pall <mike>2021-01-02 21:17:01 +0100
committerMike Pall <mike>2021-01-02 21:17:01 +0100
commitee855749a188d3d13bba9a0e58f430e138e641ae (patch)
tree429ef17b62a88682f920d95a6dec28cd4f7f7789 /doc/install.html
parent56c04accf975bff2519c34721dccbbdb7b8e6963 (diff)
downloadluajit-ee855749a188d3d13bba9a0e58f430e138e641ae.tar.gz
luajit-ee855749a188d3d13bba9a0e58f430e138e641ae.tar.bz2
luajit-ee855749a188d3d13bba9a0e58f430e138e641ae.zip
Documentation cleanup.
Diffstat (limited to 'doc/install.html')
-rw-r--r--doc/install.html33
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
168any settings. 168any 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>
174Depending on your distribution, you may need to install a package for 174Depending 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
176Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager. 176Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager.
177</p> 177</p>
178<p> 178<p>
179Download the current source package of LuaJIT (pick the .tar.gz), 179The recommended way to fetch the latest version is to do a pull from
180if you haven't already done so. Move it to a directory of your choice, 180the git repository. Alternatively download the latest source package of
181LuaJIT (pick the .tar.gz). Move it to a directory of your choice,
181open a terminal window and change to this directory. Now unpack the archive 182open a terminal window and change to this directory. Now unpack the archive
182and change to the newly created directory: 183and 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
207make PREFIX=/home/myself/lj2 208make PREFIX=/home/myself/lj2
208</pre> 209</pre>
209<p> 210<p>
210Note for OSX: you must set the <tt>MACOSX_DEPLOYMENT_TARGET</tt> 211Note for macOS: you must set the <tt>MACOSX_DEPLOYMENT_TARGET</tt>
211environment variable to a value supported by your toolchain. 212environment 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.
241Or install Microsoft's Visual Studio (MSVC). 242Or install Microsoft's Visual Studio (MSVC).
242</p> 243</p>
243<p> 244<p>
244Next, download the source package and unpack it using an archive manager 245Next, pull from the git repository or download the source package and
245(e.g. the Windows Explorer) to a directory of your choice. 246unpack it using an archive manager (e.g. the Windows Explorer) to
247a 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>
262Open a command prompt window and make sure the MinGW or Cygwin programs 264Open a command prompt window and make sure the MinGW or Cygwin programs
263are in your path. Then <tt>cd</tt> to the directory where 265are in your path. Then <tt>cd</tt> to the directory of the git repository
264you've unpacked the sources and run this command for MinGW: 266or where you've unpacked the sources. Then run this command for MinGW:
265</p> 267</p>
266<pre class="code"> 268<pre class="code">
267mingw32-make 269mingw32-make
@@ -302,7 +304,7 @@ x64 OS, you need to install the multilib development package (e.g.
302<p> 304<p>
303You need to specify <tt>TARGET_SYS</tt> whenever the host OS and the 305You need to specify <tt>TARGET_SYS</tt> whenever the host OS and the
304target OS differ, or you'll get assembler or linker errors. E.g. if 306target OS differ, or you'll get assembler or linker errors. E.g. if
305you're compiling on a Windows or OSX host for embedded Linux or Android, 307you're compiling on a Windows or macOS host for embedded Linux or Android,
306you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a 308you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a
307minimal target OS, you may need to disable the built-in allocator in 309minimal 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>
464If you're building a 64 bit application on OSX which links directly or 466<i>Important: this relates to LuaJIT 2.0 only &mdash; use LuaJIT 2.1 to
467avoid these complications.</i><br>
468If you're building a 64 bit application on macOS which links directly or
465indirectly against LuaJIT, you need to link your main executable 469indirectly against LuaJIT, you need to link your main executable
466with these flags: 470with 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>
470Also, it's recommended to <tt>rebase</tt> all (self-compiled) shared libraries
471which are loaded at runtime on OSX/x64 (e.g. C extension modules for Lua).
472See: <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>
479for embedding Lua or LuaJIT into your application.</li> 480for 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
482allocator from your system (no support for this on x64).</li> 483allocator from your system (no support for this on 64&nbsp;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
484of calling <tt>luaopen_base</tt> etc. directly.</li> 485of 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