ARM: Fix ABI and build issues for iOS. Now works on iOS 3.0+.
This commit is contained in:
@@ -97,14 +97,14 @@ make && sudo make install
|
||||
<p>
|
||||
LuaJIT currently builds out-of-the box on most systems.
|
||||
Here's the compatibility matrix for the supported combinations of
|
||||
operating system, CPU and compilers:
|
||||
operating systems, CPUs and compilers:
|
||||
</p>
|
||||
<table class="compat">
|
||||
<tr class="compathead">
|
||||
<td class="compatcpu">CPU / OS</td>
|
||||
<td class="compatos"><a href="#posix">Linux</a> or<br><a href="#cross">Android</a></td>
|
||||
<td class="compatos"><a href="#posix">*BSD, other</a></td>
|
||||
<td class="compatos"><a href="#posix">OSX<br>10.3-10.6</a></td>
|
||||
<td class="compatos"><a href="#posix">Linux</a> or<br><a href="#android">Android</a></td>
|
||||
<td class="compatos"><a href="#posix">*BSD, Other</a></td>
|
||||
<td class="compatos"><a href="#posix">OSX 10.3+</a> or<br><a href="#ios">iOS 3.0+</a></td>
|
||||
<td class="compatos"><a href="#windows">Windows<br>98/XP/Vista/7</a></td>
|
||||
</tr>
|
||||
<tr class="odd separate">
|
||||
@@ -122,10 +122,10 @@ operating system, CPU and compilers:
|
||||
<td class="compatos">MSVC + SDK v7.0<br>WinSDK v7.0</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td class="compatcpu">ARM</td>
|
||||
<td class="compatcpu">ARMv5+<br>ARM9E+</td>
|
||||
<td class="compatos">GCC 4.2+</td>
|
||||
<td class="compatos">GCC 4.2+</td>
|
||||
<td class="compatos">GCC 4.2+</td>
|
||||
<td class="compatos compatno"> </td>
|
||||
<td class="compatos compatno"> </td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
@@ -342,14 +342,6 @@ installing the <tt>mingw32</tt> package and running:
|
||||
make HOST_CC="gcc -m32" CROSS=i586-mingw32msvc- TARGET_SYS=Windows
|
||||
</pre>
|
||||
<p>
|
||||
Whenever the <b>host OS and the target OS differ</b>, you need to specify
|
||||
<tt>TARGET_SYS</tt> or you'll get assembler or linker errors. E.g. if
|
||||
you're compiling on a Windows or OSX host for embedded Linux or Android,
|
||||
you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a
|
||||
minimal target OS, you may need to disable the built-in allocator in
|
||||
<tt>src/Makefile</tt> and use <tt>TARGET_SYS=Other</tt>.
|
||||
</p>
|
||||
<p>
|
||||
You can cross-compile for an <b>ARM target</b> on an x86 or x64 host
|
||||
system using a standard GNU cross-compile toolchain (Binutils, GCC,
|
||||
EGLIBC). The <tt>CROSS</tt> prefix may vary depending on the
|
||||
@@ -359,7 +351,7 @@ EGLIBC). The <tt>CROSS</tt> prefix may vary depending on the
|
||||
make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- TARGET=arm
|
||||
</pre>
|
||||
<p>
|
||||
You can cross-compile for <b>Android (ARM)</b> using the <a href="http://developer.android.com/sdk/ndk/index.html"><span class="ext">»</span> Android NDK</a>.
|
||||
You can cross-compile for <b id="android">Android (ARM)</b> using the <a href="http://developer.android.com/sdk/ndk/index.html"><span class="ext">»</span> Android NDK</a>.
|
||||
The environment variables need to match the install locations and the
|
||||
desired target platform. E.g. Android 2.2 corresponds to ABI level 8:
|
||||
</p>
|
||||
@@ -372,6 +364,18 @@ NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
|
||||
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" TARGET=arm
|
||||
</pre>
|
||||
<p>
|
||||
You can cross-compile for <b id="ios">iOS 3.0+</b> (iPhone/iPad) using the <a href="http://developer.apple.com/devcenter/ios/index.action"><span class="ext">»</span> iOS SDK</a>.
|
||||
The environment variables need to match the iOS SDK version:
|
||||
</p>
|
||||
<pre class="code">
|
||||
ISDK=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||
ISDKVER=iPhoneOS4.3.sdk
|
||||
ISDKP=$ISDK/usr/bin/
|
||||
ISDKF="-arch armv6 -isysroot $ISDK/SDKs/$ISDKVER"
|
||||
make HOST_CC="gcc -m32 -arch i386" CROSS=$ISDKP TARGET_FLAGS="$ISDKF" \
|
||||
TARGET=arm TARGET_SYS=iOS
|
||||
</pre>
|
||||
<p>
|
||||
You can cross-compile for a <b>PPC/e500v2 target</b> on an x86 or x64 host system
|
||||
using a standard GNU cross-compile toolchain (Binutils, GCC, EGLIBC).
|
||||
The <tt>CROSS</tt> prefix may vary depending on the <tt>--target</tt>
|
||||
@@ -380,6 +384,14 @@ of the toolchain:
|
||||
<pre class="code">
|
||||
make HOST_CC="gcc -m32" CROSS=powerpc-e500v2-linux-gnuspe- TARGET=ppcspe
|
||||
</pre>
|
||||
<p>
|
||||
Whenever the <b>host OS and the target OS differ</b>, you need to specify
|
||||
<tt>TARGET_SYS</tt> or you'll get assembler or linker errors. E.g. if
|
||||
you're compiling on a Windows or OSX host for embedded Linux or Android,
|
||||
you need to add <tt>TARGET_SYS=Linux</tt> to the examples above. For a
|
||||
minimal target OS, you may need to disable the built-in allocator in
|
||||
<tt>src/Makefile</tt> and use <tt>TARGET_SYS=Other</tt>.
|
||||
</p>
|
||||
|
||||
<h2 id="embed">Embedding LuaJIT</h2>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user