summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changes.html4
-rw-r--r--doc/install.html75
-rw-r--r--doc/luajit.html6
-rw-r--r--doc/status.html14
4 files changed, 65 insertions, 34 deletions
diff --git a/doc/changes.html b/doc/changes.html
index 16cda402..c733e5d1 100644
--- a/doc/changes.html
+++ b/doc/changes.html
@@ -55,9 +55,9 @@ to see whether newer versions are available.
55<div class="major" style="background: #d0d0d0;"> 55<div class="major" style="background: #d0d0d0;">
56<h2 id="snap">Development Snapshot</h2> 56<h2 id="snap">Development Snapshot</h2>
57<ul> 57<ul>
58<li>CPU support: 58<li>Portability:
59<ul> 59<ul>
60<li>Port integrated memory allocator to Linux/x64 and Windows/x64.</li> 60<li>Port integrated memory allocator to Linux/x64, Windows/x64 and OSX/x64.</li>
61<li>Port interpreter and JIT compiler to x64.</li> 61<li>Port interpreter and JIT compiler to x64.</li>
62<li>Port DynASM to x64.</li> 62<li>Port DynASM to x64.</li>
63<li>Many 32/64 bit cleanups in the VM.</li> 63<li>Many 32/64 bit cleanups in the VM.</li>
diff --git a/doc/install.html b/doc/install.html
index 102f3417..727668cf 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -50,14 +50,8 @@ For the impatient (on POSIX systems):
50make &amp;&amp; sudo make install 50make &amp;&amp; sudo make install
51</pre> 51</pre>
52<p> 52<p>
53LuaJIT currently builds out-of-the box on all popular x86 systems 53LuaJIT currently builds out-of-the box on all popular x86 or x64 systems
54(Linux, Windows, OSX etc.). It builds and runs fine as a 32&nbsp;bit 54(Linux, Windows, OSX etc.).
55application under x64-based systems, too.
56</p>
57<p style="color: #00a000;">
58The x64 port of LuaJIT is still preliminary and not enabled by default.
59It only builds on Linux/x64 and Windows/x64 right now. If you want to
60give it a try, please follow the special build instructions below.
61</p> 55</p>
62 56
63<h2>Configuring LuaJIT</h2> 57<h2>Configuring LuaJIT</h2>
@@ -85,13 +79,8 @@ any settings.
85<p> 79<p>
86Depending on your distribution, you may need to install a package for 80Depending on your distribution, you may need to install a package for
87GCC (GCC 3.4 or later required), the development headers and/or a 81GCC (GCC 3.4 or later required), the development headers and/or a
88complete SDK. 82complete SDK. E.g. on a current Debian/Ubuntu, install <tt>libc6-dev</tt>
89</p> 83with the package manager.
90<p>
91E.g. on a current Debian/Ubuntu, install <tt>libc6-dev</tt>
92with the package manager. Currently LuaJIT builds as a 32&nbsp;bit
93application by default, so you actually need to install <tt>libc6-dev-i386</tt>
94when building on an x64 OS.
95</p> 84</p>
96<p> 85<p>
97Download the current source package (pick the .tar.gz), if you haven't 86Download the current source package (pick the .tar.gz), if you haven't
@@ -111,14 +100,9 @@ which is probably the default on your system, anyway. Simply run:
111<pre class="code"> 100<pre class="code">
112make 101make
113</pre> 102</pre>
114<div style="color: #00a000;">
115<p> 103<p>
116You can force a native x64 build on Linux/x64 with the following command: 104This always builds a native x86 or x64 binary, depending on your OS.
117</p> 105</p>
118<pre class="code">
119make CC="gcc -m64"
120</pre>
121</div>
122<p> 106<p>
123By default modules are only searched under the prefix <tt>/usr/local</tt>. 107By default modules are only searched under the prefix <tt>/usr/local</tt>.
124You can add an extra prefix to the search paths by appending the 108You can add an extra prefix to the search paths by appending the
@@ -203,14 +187,12 @@ Open a "Windows SDK Command Shell" and select the x86 compiler:
203<pre class="code"> 187<pre class="code">
204setenv /release /x86 188setenv /release /x86
205</pre> 189</pre>
206<div style="color: #00a000;">
207<p> 190<p>
208Or select the x64 compiler: 191Or select the x64 compiler:
209</p> 192</p>
210<pre class="code"> 193<pre class="code">
211setenv /release /x64 194setenv /release /x64
212</pre> 195</pre>
213</div>
214<p> 196<p>
215Then <tt>cd</tt> to the directory where you've unpacked the sources 197Then <tt>cd</tt> to the directory where you've unpacked the sources
216and run these commands: 198and run these commands:
@@ -254,6 +236,53 @@ absolute path names &mdash; all modules are loaded relative to the
254directory where <tt>luajit.exe</tt> is installed 236directory where <tt>luajit.exe</tt> is installed
255(see <tt>src/luaconf.h</tt>). 237(see <tt>src/luaconf.h</tt>).
256</p> 238</p>
239
240<h2>Cross-compiling LuaJIT</h2>
241<p>
242The build system has limited support for cross-compilation. For details
243check the comments in <tt>src/Makefile</tt>. Here are some popular examples:
244</p>
245<p>
246You can cross-compile to a 32 bit binary on a multilib x64 OS by
247installing the multilib development pacakges (e.g. <tt>libc6-dev-i386</tt>
248on Debian/Ubuntu) and running:
249</p>
250<pre class="code">
251make CC="gcc -m32"
252</pre>
253<p>
254You can cross-compile for a Windows target on Debian/Ubuntu by
255installing the <tt>mingw32</tt> package and running:
256</p>
257<pre class="code">
258make CC="gcc -m32" CROSS=i586-mingw32msvc- TARGET_SYS=Windows
259</pre>
260
261<h2>Embedding LuaJIT</h2>
262<p>
263LuaJIT is API-compatible with Lua 5.1. If you've already embedded Lua
264into your application, you probably don't need to do anything to switch
265to LuaJIT, except link with a different library. Additional hints:
266</p>
267<ul>
268<li>Make sure you use <tt>luaL_newstate</tt>. Avoid using
269<tt>lua_newstate</tt>, since this uses the (slower) default memory
270allocator from your system (no support for this on x64).</tt></li>
271<li>Make sure you use <tt>luaL_openlibs</tt> and not the old Lua 5.0 style
272of calling <tt>luaopen_base</tt> etc. directly.</li>
273<li>To change which standard libraries to load, copy <tt>src/lib_init.c</tt>
274to your project and modify it accordingly. Make sure the <tt>jit</tt>
275library is loaded or the JIT compiler will not be activated.</li>
276<li>Here's a
277<a href="http://lua-users.org/wiki/SimpleLuaApiExample"><span class="ext">&raquo;</span>&nbsp;simple example</a>.</li>
278</ul>
279<p>
28064 bit applications on OSX must be linked with these options
281(only the main executable):
282</p>
283<pre class="code">
284-pagezero_size 10000 -image_base 100000000
285</pre>
257<br class="flush"> 286<br class="flush">
258</div> 287</div>
259<div id="foot"> 288<div id="foot">
diff --git a/doc/luajit.html b/doc/luajit.html
index 66032fdf..fce49a68 100644
--- a/doc/luajit.html
+++ b/doc/luajit.html
@@ -62,10 +62,8 @@ standard Lua interpreter and can be deployed as a drop-in replacement.
62</p> 62</p>
63<p> 63<p>
64LuaJIT offers more performance, at the expense of portability. It 64LuaJIT offers more performance, at the expense of portability. It
65currently runs on all popular operating systems based on <b>x86 CPUs</b> 65currently runs on all popular operating systems based on
66(Linux, Windows, OSX etc.). A preliminary port to Linux/x64 and Windows/x64 66<b>x86 or x64 CPUs</b> (Linux, Windows, OSX etc.).
67is already available (follow the <a href="install.html">build instructions</a>
68to enable it).
69Other platforms will be supported in the future, based on user demand 67Other platforms will be supported in the future, based on user demand
70and sponsoring. 68and sponsoring.
71</p> 69</p>
diff --git a/doc/status.html b/doc/status.html
index 2d750ee1..c4d9170f 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -53,10 +53,8 @@ page.
53<span style="color: #c00000;">LuaJIT 2.0</span> is the currently active 53<span style="color: #c00000;">LuaJIT 2.0</span> is the currently active
54<span style="color: #c00000;">development branch</span>. 54<span style="color: #c00000;">development branch</span>.
55It has <b>Beta Test</b> status and is still undergoing 55It has <b>Beta Test</b> status and is still undergoing
56substantial changes. It's expected to quickly mature within the next 56substantial changes. It's maturing quickly, so you should definitely
57months. You should definitely start to evaluate it for new projects 57start to evaluate it for new projects right now.
58right now. But deploying it in production environments is not yet
59recommended.
60</p> 58</p>
61 59
62<h2>Current Status</h2> 60<h2>Current Status</h2>
@@ -153,6 +151,12 @@ with <b>open upvalues aliasing</b> one of the SSA slots later on (or
153vice versa). Bonus points, if you can find a real world test case for 151vice versa). Bonus points, if you can find a real world test case for
154this. 152this.
155</li> 153</li>
154<li>
155Currently some <b>out-of-memory</b> errors from <b>on-trace code</b> are not
156handled correctly. The error may fall through an on-trace
157<tt>pcall</tt> (x86) or it may be passed on to the function set with
158<tt>lua_atpanic</tt> (x64).
159</li>
156</ul> 160</ul>
157</li> 161</li>
158</ul> 162</ul>
@@ -194,7 +198,7 @@ Nonetheless, it compiles to native code and needs to be adapted to each
194architecture. Porting the compiler backend is probably the easier task, 198architecture. Porting the compiler backend is probably the easier task,
195but a key element of its design is the fast interpreter, written in 199but a key element of its design is the fast interpreter, written in
196machine-specific assembler.<br> 200machine-specific assembler.<br>
197A preliminary x64 port is already available, thanks to the 201An x64 port is already available, thanks to the
198<a href="sponsors.html">LuaJIT sponsorship program</a>. 202<a href="sponsors.html">LuaJIT sponsorship program</a>.
199Other ports will follow &mdash; companies which are 203Other ports will follow &mdash; companies which are
200interested in sponsoring a port to a particular architecture, please 204interested in sponsoring a port to a particular architecture, please