aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2019-12-08 19:07:22 +0100
committerMike Pall <mike>2019-12-08 19:07:22 +0100
commit08272de59eedaa82726b8f671dccc7e0170addc0 (patch)
treef9d2f8cc0c700cd013a1a0e02ddfd007f89f24e8
parenta75d13c63a118ab501affe6fb0baab1d692a3df9 (diff)
downloadluajit-08272de59eedaa82726b8f671dccc7e0170addc0.tar.gz
luajit-08272de59eedaa82726b8f671dccc7e0170addc0.tar.bz2
luajit-08272de59eedaa82726b8f671dccc7e0170addc0.zip
Update Android and iOS build docs.
-rw-r--r--doc/install.html68
1 files changed, 13 insertions, 55 deletions
diff --git a/doc/install.html b/doc/install.html
index 58a2a757..405f443a 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -363,67 +363,25 @@ make HOST_CC="gcc -m32" CROSS=mips-linux-
363make HOST_CC="gcc -m32" CROSS=mipsel-linux- 363make HOST_CC="gcc -m32" CROSS=mipsel-linux-
364</pre> 364</pre>
365<p> 365<p>
366You can cross-compile for <b id="android">Android</b> using the <a href="http://developer.android.com/sdk/ndk/index.html"><span class="ext">&raquo;</span>&nbsp;Android NDK</a>. 366You can cross-compile for <b id="android">Android</b> using the <a href="http://developer.android.com/ndk/"><span class="ext">&raquo;</span>&nbsp;Android NDK</a>.
367The environment variables need to match the install locations and the 367Please adapt the environment variables to match the install locations and the
368desired target platform. E.g. Android&nbsp;4.0 corresponds to ABI level&nbsp;14. 368desired target platform. E.g. Android&nbsp;4.1 corresponds to ABI level&nbsp;16.
369For details check the folder <tt>docs</tt> in the NDK directory.
370</p>
371<p>
372Only a few common variations for the different CPUs, ABIs and platforms
373are listed. Please use your own judgement for which combination you want
374to build/deploy or which lowest common denominator you want to pick:
375</p> 369</p>
376<pre class="code"> 370<pre class="code">
377# Android/ARM, armeabi (ARMv5TE soft-float), Android 2.2+ (Froyo) 371# Android/ARM, armeabi-v7a (ARMv7 VFP), Android 4.1+ (JB)
378NDK=/opt/android/ndk
379NDKABI=8
380NDKVER=$NDK/toolchains/arm-linux-androideabi-4.6
381NDKP=$NDKVER/prebuilt/linux-x86/bin/arm-linux-androideabi-
382NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
383make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
384
385# Android/ARM, armeabi-v7a (ARMv7 VFP), Android 4.0+ (ICS)
386NDK=/opt/android/ndk
387NDKABI=14
388NDKVER=$NDK/toolchains/arm-linux-androideabi-4.6
389NDKP=$NDKVER/prebuilt/linux-x86/bin/arm-linux-androideabi-
390NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
391NDKARCH="-march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8"
392make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF $NDKARCH"
393
394# Android/MIPS, mips (MIPS32R1 hard-float), Android 4.0+ (ICS)
395NDK=/opt/android/ndk
396NDKABI=14
397NDKVER=$NDK/toolchains/mipsel-linux-android-4.6
398NDKP=$NDKVER/prebuilt/linux-x86/bin/mipsel-linux-android-
399NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-mips"
400make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
401 372
402# Android/x86, x86 (i686 SSE3), Android 4.0+ (ICS) 373NDKDIR=/opt/android/ndk
403NDK=/opt/android/ndk 374NDKBIN=$NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin
404NDKABI=14 375NDKCROSS=$NDKBIN/arm-linux-androideabi-
405NDKVER=$NDK/toolchains/x86-4.6 376NDKCC=$NDKBIN/armv7a-linux-androideabi16-clang
406NDKP=$NDKVER/prebuilt/linux-x86/bin/i686-linux-android- 377make HOST_CC="gcc -m32" CROSS=$NDKCROSS \
407NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-x86" 378 STATIC_CC=$NDKCC DYNAMIC_CC="$NDKCC -fPIC" \
408make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" 379 TARGET_LD=$NDKCC
409</pre> 380</pre>
410<p> 381<p>
411You 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">&raquo;</span>&nbsp;iOS SDK</a>: 382Please use the LuaJIT 2.1 branch to compile for
383<b id="ios">iOS</b> (iPhone/iPad).
412</p> 384</p>
413<p style="font-size: 8pt;">
414Note: <b>the JIT compiler is disabled for iOS</b>, because regular iOS Apps
415are not allowed to generate code at runtime. You'll only get the performance
416of the LuaJIT interpreter on iOS. This is still faster than plain Lua, but
417much slower than the JIT compiler. Please complain to Apple, not me.
418Or use Android. :-p
419</p>
420<pre class="code">
421ISDKP=$(xcrun --sdk iphoneos --show-sdk-path)
422ICC=$(xcrun --sdk iphoneos --find clang)
423ISDKF="-arch armv7 -isysroot $ISDKP"
424make DEFAULT_CC=clang HOST_CC="clang -m32 -arch i386" \
425 CROSS="$(dirname $ICC)/" TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
426</pre>
427 385
428<h3 id="consoles">Cross-compiling for consoles</h3> 386<h3 id="consoles">Cross-compiling for consoles</h3>
429<p> 387<p>