summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2015-10-24 19:30:55 +0200
committerMike Pall <mike>2015-10-24 19:30:55 +0200
commit3ad77346dfc12a910a806ccf3ec6d54f49d54672 (patch)
treeb281228340fb5578987aa47a578d1c5f8d395a10
parentffb124ec77f7881de374c3f4dca8c418a89c6cbc (diff)
parent1393b2f681df3a71cb381b958e8e3221d2dd427d (diff)
downloadluajit-3ad77346dfc12a910a806ccf3ec6d54f49d54672.tar.gz
luajit-3ad77346dfc12a910a806ccf3ec6d54f49d54672.tar.bz2
luajit-3ad77346dfc12a910a806ccf3ec6d54f49d54672.zip
Merge branch 'master' into v2.1
-rw-r--r--doc/install.html29
-rw-r--r--src/Makefile46
2 files changed, 41 insertions, 34 deletions
diff --git a/doc/install.html b/doc/install.html
index b5df697b..68f49d18 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -114,30 +114,30 @@ operating systems, CPUs and compilers:
114</tr> 114</tr>
115<tr class="odd separate"> 115<tr class="odd separate">
116<td class="compatcpu">x86 (32 bit)</td> 116<td class="compatcpu">x86 (32 bit)</td>
117<td class="compatos">GCC 4.x<br>GCC 3.4</td> 117<td class="compatos">GCC 4.x+<br>GCC 3.4</td>
118<td class="compatos">GCC 4.x<br>GCC 3.4</td> 118<td class="compatos">GCC 4.x+<br>GCC 3.4</td>
119<td class="compatos">GCC 4.x<br>GCC 3.4</td> 119<td class="compatos">XCode 5.0+<br>Clang</td>
120<td class="compatos">MSVC, MSVC/EE<br>WinSDK<br>MinGW, Cygwin</td> 120<td class="compatos">MSVC, MSVC/EE<br>WinSDK<br>MinGW, Cygwin</td>
121</tr> 121</tr>
122<tr class="even"> 122<tr class="even">
123<td class="compatcpu">x64 (64 bit)</td> 123<td class="compatcpu">x64 (64 bit)</td>
124<td class="compatos">GCC 4.x</td> 124<td class="compatos">GCC 4.x+</td>
125<td class="compatos">ORBIS (<a href="#ps4">PS4</a>)</td> 125<td class="compatos">ORBIS (<a href="#ps4">PS4</a>)</td>
126<td class="compatos">GCC 4.x</td> 126<td class="compatos">XCode 5.0+<br>Clang</td>
127<td class="compatos">MSVC + SDK v7.0<br>WinSDK v7.0<br>Durango (<a href="#xboxone">Xbox One</a>)</td> 127<td class="compatos">MSVC + SDK v7.0<br>WinSDK v7.0<br>Durango (<a href="#xboxone">Xbox One</a>)</td>
128</tr> 128</tr>
129<tr class="odd"> 129<tr class="odd">
130<td class="compatcpu"><a href="#cross2">ARMv5+<br>ARM9E+</a></td> 130<td class="compatcpu"><a href="#cross2">ARMv5+<br>ARM9E+</a></td>
131<td class="compatos">GCC 4.2+</td> 131<td class="compatos">GCC 4.2+</td>
132<td class="compatos">GCC 4.2+<br>PSP2 (<a href="#psvita">PS VITA</a>)</td> 132<td class="compatos">GCC 4.2+<br>PSP2 (<a href="#psvita">PS VITA</a>)</td>
133<td class="compatos">GCC 4.2+</td> 133<td class="compatos">XCode 5.0+<br>Clang</td>
134<td class="compatos compatno">&nbsp;</td> 134<td class="compatos compatno">&nbsp;</td>
135</tr> 135</tr>
136<tr class="even"> 136<tr class="even">
137<td class="compatcpu"><a href="#cross2">ARM64</a></td> 137<td class="compatcpu"><a href="#cross2">ARM64</a></td>
138<td class="compatos">GCC 4.8+</td> 138<td class="compatos">GCC 4.8+</td>
139<td class="compatos compatno">&nbsp;</td> 139<td class="compatos compatno">&nbsp;</td>
140<td class="compatos">Clang 3.5+</td> 140<td class="compatos">XCode 6.0+<br>Clang 3.5+</td>
141<td class="compatos compatno">&nbsp;</td> 141<td class="compatos compatno">&nbsp;</td>
142</tr> 142</tr>
143<tr class="odd"> 143<tr class="odd">
@@ -442,8 +442,7 @@ NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-x86"
442make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF" 442make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
443</pre> 443</pre>
444<p> 444<p>
445You 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>. 445You 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>:
446The environment variables need to match the iOS SDK version:
447</p> 446</p>
448<p style="font-size: 8pt;"> 447<p style="font-size: 8pt;">
449Note: <b>the JIT compiler is disabled for iOS</b>, because regular iOS Apps 448Note: <b>the JIT compiler is disabled for iOS</b>, because regular iOS Apps
@@ -453,13 +452,11 @@ much slower than the JIT compiler. Please complain to Apple, not me.
453Or use Android. :-p 452Or use Android. :-p
454</p> 453</p>
455<pre class="code"> 454<pre class="code">
456IXCODE=`xcode-select -print-path` 455ISDKP=$(xcrun --sdk iphoneos --show-sdk-path)
457ISDK=$IXCODE/Platforms/iPhoneOS.platform/Developer 456ICC=$(xcrun --sdk iphoneos --find clang)
458ISDKVER=iPhoneOS6.0.sdk 457ISDKF="-arch armv7 -isysroot $ISDKP"
459ISDKP=$ISDK/usr/bin/ 458make HOST_CC="clang -m32 -arch i386" CROSS="$(dirname $ICC)/" \
460ISDKF="-arch armv7 -isysroot $ISDK/SDKs/$ISDKVER" 459 TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
461make HOST_CC="gcc -m32 -arch i386" CROSS=$ISDKP TARGET_FLAGS="$ISDKF" \
462 TARGET_SYS=iOS
463</pre> 460</pre>
464 461
465<h3 id="consoles">Cross-compiling for consoles</h3> 462<h3 id="consoles">Cross-compiling for consoles</h3>
diff --git a/src/Makefile b/src/Makefile
index 532da6e9..9845f6a0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -24,11 +24,13 @@ NODOTABIVER= 51
24# removing the '#' in front of them. Make sure you force a full recompile 24# removing the '#' in front of them. Make sure you force a full recompile
25# with "make clean", followed by "make" if you change any options. 25# with "make clean", followed by "make" if you change any options.
26# 26#
27DEFAULT_CC = gcc
28#
27# LuaJIT builds as a native 32 or 64 bit binary by default. 29# LuaJIT builds as a native 32 or 64 bit binary by default.
28CC= gcc 30CC= $(DEFAULT_CC)
29# 31#
30# Use this if you want to force a 32 bit build on a 64 bit multilib OS. 32# Use this if you want to force a 32 bit build on a 64 bit multilib OS.
31#CC= gcc -m32 33#CC= $(DEFAULT_CC) -m32
32# 34#
33# Since the assembler part does NOT maintain a frame pointer, it's pointless 35# Since the assembler part does NOT maintain a frame pointer, it's pointless
34# to slow down the C part by not omitting it. Debugging, tracebacks and 36# to slow down the C part by not omitting it. Debugging, tracebacks and
@@ -148,6 +150,29 @@ XCFLAGS=
148############################################################################## 150##############################################################################
149 151
150############################################################################## 152##############################################################################
153# Host system detection.
154##############################################################################
155
156ifeq (Windows,$(findstring Windows,$(OS))$(MSYSTEM)$(TERM))
157 HOST_SYS= Windows
158 HOST_RM= del
159else
160 HOST_SYS:= $(shell uname -s)
161 ifneq (,$(findstring MINGW,$(HOST_SYS)))
162 HOST_SYS= Windows
163 HOST_MSYS= mingw
164 endif
165 ifneq (,$(findstring CYGWIN,$(HOST_SYS)))
166 HOST_SYS= Windows
167 HOST_MSYS= cygwin
168 endif
169 # Use Clang for OSX host.
170 ifeq (Darwin,$(HOST_SYS))
171 DEFAULT_CC= clang
172 endif
173endif
174
175##############################################################################
151# Flags and options for host and target. 176# Flags and options for host and target.
152############################################################################## 177##############################################################################
153 178
@@ -268,24 +293,9 @@ ifneq (,$(LMULTILIB))
268endif 293endif
269 294
270############################################################################## 295##############################################################################
271# System detection. 296# Target system detection.
272############################################################################## 297##############################################################################
273 298
274ifeq (Windows,$(findstring Windows,$(OS))$(MSYSTEM)$(TERM))
275 HOST_SYS= Windows
276 HOST_RM= del
277else
278 HOST_SYS:= $(shell uname -s)
279 ifneq (,$(findstring MINGW,$(HOST_SYS)))
280 HOST_SYS= Windows
281 HOST_MSYS= mingw
282 endif
283 ifneq (,$(findstring CYGWIN,$(HOST_SYS)))
284 HOST_SYS= Windows
285 HOST_MSYS= cygwin
286 endif
287endif
288
289TARGET_SYS?= $(HOST_SYS) 299TARGET_SYS?= $(HOST_SYS)
290ifeq (Windows,$(TARGET_SYS)) 300ifeq (Windows,$(TARGET_SYS))
291 TARGET_STRIP+= --strip-unneeded 301 TARGET_STRIP+= --strip-unneeded