diff --git a/luajit-2.1-update.patch b/luajit-2.1-update.patch index 24354bc..37aece6 100644 --- a/luajit-2.1-update.patch +++ b/luajit-2.1-update.patch @@ -1001,7 +1001,7 @@ index a66a8d95..00000000 - - diff --git a/doc/contact.html b/doc/contact.html -index fe4751c0..89c1af95 100644 +index fe4751c0..6d609286 100644 --- a/doc/contact.html +++ b/doc/contact.html @@ -1,17 +1,16 @@ @@ -1044,7 +1044,7 @@ index fe4751c0..89c1af95 100644 jit.* Library
  • Lua/C API -@@ -46,28 +47,23 @@ +@@ -46,28 +47,21 @@
  • Status @@ -1056,8 +1056,8 @@ index fe4751c0..89c1af95 100644
  • -Performance » -
  • - Wiki » -
  • +-Wiki » +-
  • -Mailing List » +Mailing List »
  • @@ -1076,7 +1076,17 @@ index fe4751c0..89c1af95 100644

    You can also send any questions you have directly to me: -@@ -93,7 +89,7 @@ xD("fyZKB8xv\"FJytmz8.KAB0u52D") +@@ -90,10 +84,17 @@ xD("fyZKB8xv\"FJytmz8.KAB0u52D") +

    + + ++

    ++Note: I cannot reply to GMail, Google Workplace, Outlook or Office365 ++mail addresses, since they prefer to mindlessly filter out mails sent ++from small domains using independent mail servers, such as mine. If you ++don't like that, please complain to Google or Microsoft, not me. ++

    ++

    Copyright

    All documentation is @@ -1085,7 +1095,7 @@ index fe4751c0..89c1af95 100644

    -@@ -101,7 +97,7 @@ Copyright © 2005-2017 Mike Pall. +@@ -101,7 +102,7 @@ Copyright © 2005-2017 Mike Pall. @@ -1798,7 +1806,7 @@ index 00000000..192110a7 + + diff --git a/doc/ext_c_api.html b/doc/ext_c_api.html -index ad462c63..21dc1310 100644 +index ad462c63..151d20b5 100644 --- a/doc/ext_c_api.html +++ b/doc/ext_c_api.html @@ -1,17 +1,16 @@ @@ -1841,7 +1849,7 @@ index ad462c63..21dc1310 100644 jit.* Library
  • Lua/C API -@@ -46,17 +47,12 @@ +@@ -46,17 +47,10 @@
  • Status @@ -1853,14 +1861,14 @@ index ad462c63..21dc1310 100644
  • -Performance » -
  • - Wiki » -
  • +-Wiki » +-
  • -Mailing List » +Mailing List »
  • -@@ -91,8 +87,8 @@ other Lua/C API functions). +@@ -91,8 +85,8 @@ other Lua/C API functions).

    The third argument specifies the mode, which is 'or'ed with a flag. @@ -1871,7 +1879,7 @@ index ad462c63..21dc1310 100644 LUAJIT_MODE_FLUSH to flush cached code.

    -@@ -111,7 +107,7 @@ Turn the whole JIT compiler on or off or flush the whole cache of compiled code. +@@ -111,7 +105,7 @@ Turn the whole JIT compiler on or off or flush the whole cache of compiled code. This sets the mode for the function at the stack index idx or the parent of the calling function (idx = 0). It either enables JIT compilation for a function, disables it and flushes any @@ -1880,7 +1888,7 @@ index ad462c63..21dc1310 100644 applies recursively to all sub-functions of the function with LUAJIT_MODE_ALLFUNC or only to the sub-functions with LUAJIT_MODE_ALLSUBFUNC. -@@ -130,7 +126,7 @@ traces which link to it. +@@ -130,7 +124,7 @@ traces which link to it. This mode defines a wrapper function for calls to C functions. If called with LUAJIT_MODE_ON, the stack index at idx must be a lightuserdata object holding a pointer to the wrapper @@ -1889,7 +1897,7 @@ index ad462c63..21dc1310 100644 function. If called with LUAJIT_MODE_OFF this mode is turned off and all C functions are directly called.

    -@@ -179,7 +175,7 @@ Also note that this mechanism is not without overhead. +@@ -179,7 +173,7 @@ Also note that this mechanism is not without overhead.
    -@@ -161,7 +157,7 @@ call the binding function. Phew! +@@ -161,7 +155,7 @@ call the binding function. Phew!

    Motivating Example: Using C Data Structures

    The FFI library allows you to create and access C data @@ -1970,7 +1978,7 @@ index 5e1daaf5..b39ae314 100644 C functions. But they can be used stand-alone, too.

    -@@ -173,7 +169,7 @@ implemented with a big table holding lots of tiny tables. This imposes +@@ -173,7 +167,7 @@ implemented with a big table holding lots of tiny tables. This imposes both a substantial memory overhead as well as a performance overhead.

    @@ -1979,7 +1987,7 @@ index 5e1daaf5..b39ae314 100644 simple benchmark. First, the plain Lua version:

    -@@ -188,7 +184,7 @@ local function image_ramp_green(n)
    +@@ -188,7 +182,7 @@ local function image_ramp_green(n)
        return img
      end
      
    @@ -1988,7 +1996,7 @@ index 5e1daaf5..b39ae314 100644
        for i=1,n do
          local y = floor(0.3*img[i].red + 0.59*img[i].green + 0.11*img[i].blue)
          img[i].red = y; img[i].green = y; img[i].blue = y
    -@@ -198,14 +194,14 @@ end
    +@@ -198,14 +192,14 @@ end
      local N = 400*400
      local img = image_ramp_green(N)
      for i=1,1000 do
    @@ -2006,7 +2014,7 @@ index 5e1daaf5..b39ae314 100644
      need of a simple example ...
      

    -@@ -312,7 +308,7 @@ be more compact and faster. This is certainly true (by a factor of +@@ -312,7 +306,7 @@ be more compact and faster. This is certainly true (by a factor of ~1.7x). Switching to a struct-of-arrays would help, too.

    @@ -2015,7 +2023,7 @@ index 5e1daaf5..b39ae314 100644 error-prone. And it still doesn't get even close to the performance of the FFI version of the code. Also, high-level data structures cannot be easily passed to other C functions, especially I/O functions, -@@ -322,7 +318,7 @@ without undue conversion penalties. +@@ -322,7 +316,7 @@ without undue conversion penalties.

    -@@ -125,7 +121,7 @@ separated by semicolons. The trailing semicolon for a single +@@ -125,7 +119,7 @@ separated by semicolons. The trailing semicolon for a single declaration may be omitted.

    @@ -2097,7 +2105,7 @@ index 91af2e1d..b8da1c95 100644 are not bound to any specific address, yet. Binding is achieved with C library namespaces (see below).

    -@@ -213,7 +209,7 @@ parse the cdecl only once and get its ctype with +@@ -213,7 +207,7 @@ parse the cdecl only once and get its ctype with ffi.typeof(). Then use the ctype as a constructor repeatedly.

    @@ -2106,7 +2114,7 @@ index 91af2e1d..b8da1c95 100644 creates a new and distinguished ctype every time you use it for ffi.new(). This is probably not what you want, especially if you create more than one cdata object. Different anonymous -@@ -260,12 +256,12 @@ afterwards. Neither the contents of the metatable nor the +@@ -260,12 +254,12 @@ afterwards. Neither the contents of the metatable nor the contents of an __index table (if any) may be modified afterwards. The associated metatable automatically applies to all uses of this type, no matter how the objects are created or where they @@ -2122,7 +2130,7 @@ index 91af2e1d..b8da1c95 100644 left operand is checked first for a valid ctype metamethod. The __gc metamethod only applies to struct/union types and performs an implicit ffi.gc() -@@ -469,6 +465,8 @@ otherwise. The following parameters are currently defined: +@@ -469,6 +463,8 @@ otherwise. The following parameters are currently defined: winWindows variant of the standard ABI @@ -2131,7 +2139,7 @@ index 91af2e1d..b8da1c95 100644 gc6464 bit GC references -@@ -494,7 +492,7 @@ have some extra methods: +@@ -494,7 +490,7 @@ have some extra methods:

    Free the resources associated with a callback. The associated Lua function is unanchored and may be garbage collected. The callback @@ -2140,7 +2148,7 @@ index 91af2e1d..b8da1c95 100644 (it may be reused by a subsequently created callback).

    -@@ -560,7 +558,7 @@ named i. +@@ -560,7 +556,7 @@ named i.
    -@@ -92,7 +88,7 @@ footprint. It's used by the ffi.* library +@@ -92,7 +86,7 @@ footprint. It's used by the ffi.* library functions to declare C types or external symbols.

    @@ -2222,7 +2230,7 @@ index 800b6b18..22f7f17c 100644 C header files. Although it does evaluate constant expressions, it's not a C compiler. The body of inline C function definitions is simply ignored. -@@ -169,7 +165,7 @@ function declarations. +@@ -169,7 +163,7 @@ function declarations.

    @@ -2231,7 +2239,7 @@ index 800b6b18..22f7f17c 100644 a typedef, except re-declarations will be ignored):

    A ctype object can be indexed with a string key, too. The only @@ -2261,7 +2269,7 @@ index 800b6b18..22f7f17c 100644 struct/union types. All other accesses defer to the corresponding metamethods or index tables (if any).

    -@@ -660,7 +656,7 @@ certain optimizations. +@@ -660,7 +654,7 @@ certain optimizations.

    As a consequence, the elements of complex numbers and vectors are immutable. But the elements of an aggregate holding these @@ -2270,7 +2278,7 @@ index 800b6b18..22f7f17c 100644 foo.c.im, but you can assign a (newly created) complex number to foo.c.

    -@@ -678,9 +674,9 @@ through unions is explicitly detected and allowed. +@@ -678,9 +672,9 @@ through unions is explicitly detected and allowed. constructor. This is equivalent to ffi.new(ct, ...), unless a __new metamethod is defined. The __new metamethod is called with the ctype object @@ -2283,7 +2291,7 @@ index 800b6b18..22f7f17c 100644
  • C function call: a cdata function or cdata function pointer can be called. The passed arguments are -@@ -691,7 +687,7 @@ variable argument part of vararg C function use +@@ -691,7 +685,7 @@ variable argument part of vararg C function use C function is called and the return value (if any) is converted to a Lua object.
    On Windows/x86 systems, __stdcall functions are automatically @@ -2292,7 +2300,7 @@ index 800b6b18..22f7f17c 100644 silently fixed up after the first call.
  • -@@ -701,7 +697,7 @@ silently fixed up after the first call. +@@ -701,7 +695,7 @@ silently fixed up after the first call.
  • Pointer arithmetic: a cdata pointer/array and a cdata number or a Lua number can be added or subtracted. The number must be @@ -2301,7 +2309,7 @@ index 800b6b18..22f7f17c 100644 the same type with an address plus or minus the number value multiplied by the element size in bytes. An error is raised if the element size is undefined.
  • -@@ -716,7 +712,7 @@ operators (+ - * / % ^ and unary +@@ -716,7 +710,7 @@ operators (+ - * / % ^ and unary minus) can be applied to two cdata numbers, or a cdata number and a Lua number. If one of them is an uint64_t, the other side is converted to an uint64_t and an unsigned arithmetic operation @@ -2310,7 +2318,7 @@ index 800b6b18..22f7f17c 100644 int64_t and a signed arithmetic operation is performed. The result is a boxed 64 bit cdata object.
    -@@ -763,7 +759,7 @@ which is compatible with any other pointer type. +@@ -763,7 +757,7 @@ which is compatible with any other pointer type.
  • 64 bit integer comparison: two cdata numbers, or a cdata number and a Lua number can be compared with each other. If one of them is an uint64_t, the other side is converted to an @@ -2319,7 +2327,7 @@ index 800b6b18..22f7f17c 100644 both sides are converted to an int64_t and a signed comparison is performed.
    -@@ -788,9 +784,9 @@ keys! +@@ -788,9 +782,9 @@ keys! A cdata object is treated like any other garbage-collected object and is hashed and compared by its address for table indexing. Since there's no interning for cdata value types, the same value may be @@ -2331,7 +2339,7 @@ index 800b6b18..22f7f17c 100644 hash slot as t[2].

    -@@ -812,7 +808,7 @@ the resulting Lua number as a key when indexing tables.
    +@@ -812,7 +806,7 @@ the resulting Lua number as a key when indexing tables.
    One obvious benefit: t[tonumber(2LL)] does point to the same slot as t[2].

  • @@ -2340,7 +2348,7 @@ index 800b6b18..22f7f17c 100644 or complex numbers or combine multiple fields of a cdata aggregate to a Lua string (e.g. with ffi.string()). Then -@@ -820,7 +816,7 @@ use the resulting Lua string as a key when indexing tables. +@@ -820,7 +814,7 @@ use the resulting Lua string as a key when indexing tables.
  • Create your own specialized hash table implementation using the C types provided by the FFI library, just like you would in @@ -2349,7 +2357,7 @@ index 800b6b18..22f7f17c 100644 other alternatives or what a generic by-value hash table could possibly provide.
  • -@@ -864,7 +860,7 @@ place of a type, you'd need to use ffi.typeof("int") instead. +@@ -864,7 +858,7 @@ place of a type, you'd need to use ffi.typeof("int") instead.

    The main use for parameterized types are libraries implementing abstract data types @@ -2358,7 +2366,7 @@ index 800b6b18..22f7f17c 100644 similar to what can be achieved with C++ template metaprogramming. Another use case are derived types of anonymous structs, which avoids pollution of the global struct namespace. -@@ -886,7 +882,7 @@ garbage collector will automatically free the memory used by it (at +@@ -886,7 +880,7 @@ garbage collector will automatically free the memory used by it (at the end of the next GC cycle).

    @@ -2367,7 +2375,7 @@ index 800b6b18..22f7f17c 100644 are not followed by the garbage collector. So e.g. if you assign a cdata array to a pointer, you must keep the cdata object holding the array alive as long as the pointer is still in use: -@@ -935,18 +931,18 @@ of the function pointer and the Lua function object (closure). +@@ -935,18 +929,18 @@ of the function pointer and the Lua function object (closure).

    This can happen implicitly due to the usual conversions, e.g. when @@ -2390,7 +2398,7 @@ index 800b6b18..22f7f17c 100644

    It's allowed to throw errors across a callback invocation, but it's not -@@ -1007,7 +1003,7 @@ convention cannot be automatically detected, unlike for +@@ -1007,7 +1001,7 @@ convention cannot be automatically detected, unlike for __stdcall calls to Windows functions.

    @@ -2399,7 +2407,7 @@ index 800b6b18..22f7f17c 100644 dynamically redirect callbacks. Use an explicit cast to a C function pointer and keep the resulting cdata object. Then use the cb:free() -@@ -1060,7 +1056,7 @@ GUI application, which waits for user input most of the time, anyway. +@@ -1060,7 +1054,7 @@ GUI application, which waits for user input most of the time, anyway.

    For new designs avoid push-style APIs: a C function repeatedly @@ -2408,7 +2416,7 @@ index 800b6b18..22f7f17c 100644 call a C function repeatedly to get a new result. Calls from Lua to C via the FFI are much faster than the other way round. Most well-designed libraries already use pull-style APIs (read/write, get/put). -@@ -1079,7 +1075,7 @@ function. +@@ -1079,7 +1073,7 @@ function.

    Indexing a C library namespace object with a symbol name (a Lua @@ -2417,7 +2425,7 @@ index 800b6b18..22f7f17c 100644 is resolved — it must have been declared with ffi.cdef. Then the symbol address is resolved by searching for the symbol name in the -@@ -1134,7 +1130,7 @@ Performance notice: the JIT compiler specializes to the identity of +@@ -1134,7 +1128,7 @@ Performance notice: the JIT compiler specializes to the identity of namespace objects and to the strings used to index it. This effectively turns function cdata objects into constants. It's not useful and actually counter-productive to explicitly cache these @@ -2426,7 +2434,7 @@ index 800b6b18..22f7f17c 100644 is useful to cache the namespace itself, e.g. local C = ffi.C.

    -@@ -1159,14 +1155,14 @@ This behavior is inevitable, since the goal is to provide full +@@ -1159,14 +1153,14 @@ This behavior is inevitable, since the goal is to provide full interoperability with C code. Adding extra safety measures, like bounds checks, would be futile. There's no way to detect misdeclarations of C functions, since shared libraries only @@ -2443,7 +2451,7 @@ index 800b6b18..22f7f17c 100644 library is not for the faint of heart and probably shouldn't be the first exercise for someone with little experience in Lua, C or C++.

    -@@ -1194,7 +1190,7 @@ currently incomplete: +@@ -1194,7 +1188,7 @@ currently incomplete:
  • C declarations are not passed through a C pre-processor, yet.
  • The C parser is able to evaluate most constant expressions @@ -2452,7 +2460,7 @@ index 800b6b18..22f7f17c 100644 full range of C expression semantics and may fail for some obscure constructs.
  • static const declarations only work for integer types -@@ -1225,7 +1221,7 @@ suboptimal performance, especially when used in inner loops: +@@ -1225,7 +1219,7 @@ suboptimal performance, especially when used in inner loops:
  • Table initializers.
  • Initialization of nested struct/union types.
  • Non-default initialization of VLA/VLS or large C types @@ -2461,7 +2469,7 @@ index 800b6b18..22f7f17c 100644
  • Bitfield initializations.
  • Pointer differences for element sizes that are not a power of two.
  • -@@ -1252,7 +1248,7 @@ compiled. +@@ -1252,7 +1246,7 @@ compiled.
    -@@ -89,7 +85,7 @@ of its functions: +@@ -89,7 +83,7 @@ of its functions: local ffi = require("ffi")

    @@ -2543,7 +2551,7 @@ index 36500664..e0bf9040 100644 of globals — you really need to use the local variable. The require function ensures the library is only loaded once.

    -@@ -198,7 +194,7 @@ don't need to declare them as such. +@@ -198,7 +192,7 @@ don't need to declare them as such. The poll() function takes a couple more arguments we're not going to use. You can simply use nil to pass a NULL pointer and 0 @@ -2552,7 +2560,7 @@ index 36500664..e0bf9040 100644 number 0 does not convert to a pointer value, unlike in C++. You really have to pass pointers to pointer arguments and numbers to number arguments. -@@ -222,7 +218,7 @@ a fascinating best-selling game is left as an exercise for the reader. +@@ -222,7 +216,7 @@ a fascinating best-selling game is left as an exercise for the reader.

    Accessing the zlib Compression Library

    The following code shows how to access the -@@ -295,17 +291,17 @@ Here's the step-by-step explanation: +@@ -295,17 +289,17 @@ Here's the step-by-step explanation:

    This defines some of the C functions provided by zlib. For the sake of this example, some @@ -2582,7 +2590,7 @@ index 36500664..e0bf9040 100644 ffi.os makes sure we pass the right name to ffi.load().

    -@@ -328,7 +324,7 @@ actual length that was used. +@@ -328,7 +322,7 @@ actual length that was used.

    In C you'd pass in the address of a local variable (&buflen). But since there's no address-of operator in @@ -2591,7 +2599,7 @@ index 36500664..e0bf9040 100644 initialized with the maximum buffer size in one step. Calling the actual zlib.compress2 function is then straightforward.

    -@@ -352,7 +348,7 @@ for garbage collection and string interning. +@@ -352,7 +346,7 @@ for garbage collection and string interning. The uncompress functions does the exact opposite of the compress function. The compressed data doesn't include the size of the original string, @@ -2600,7 +2608,7 @@ index 36500664..e0bf9040 100644

    The code, that makes use -@@ -386,7 +382,7 @@ Ok, so the ffi.* functions generally accept cdata objects +@@ -386,7 +380,7 @@ Ok, so the ffi.* functions generally accept cdata objects wherever you'd want to use a number. That's why we get a away with passing n to ffi.string() above. But other Lua library functions or modules don't know how to deal with this. So for @@ -2609,7 +2617,7 @@ index 36500664..e0bf9040 100644 long results before passing them on. Otherwise the application might work on some systems, but would fail in a POSIX/x64 environment. -@@ -458,7 +454,7 @@ the origin. +@@ -458,7 +452,7 @@ the origin.

    If we run out of operators, we can @@ -2618,7 +2626,7 @@ index 36500664..e0bf9040 100644 area function. For custom indexing needs, one might want to define __index and __newindex functions instead.

    -@@ -472,13 +468,13 @@ be used e.g. to create an array of points. The metamethods automatically +@@ -472,13 +466,13 @@ be used e.g. to create an array of points. The metamethods automatically apply to any and all uses of this type.

    @@ -2634,7 +2642,7 @@ index 36500664..e0bf9040 100644 operations (such as a.x) can be freely mixed with the newly defined metamethods. Note that area is a method and must be called with the Lua syntax for methods: a:area(), not -@@ -487,7 +483,7 @@ called with the Lua syntax for methods: a:area(), not +@@ -487,7 +481,7 @@ called with the Lua syntax for methods: a:area(), not

    The C type metamethod mechanism is most useful when used in conjunction with C libraries that are written in an object-oriented @@ -2643,7 +2651,7 @@ index 36500664..e0bf9040 100644 instance pointer as the first argument. Sometimes you can just point __index to the library namespace and __gc to the destructor and you're done. But often enough you'll want to add -@@ -573,7 +569,7 @@ end +@@ -573,7 +567,7 @@ end

    This turns them into indirect calls and generates bigger and slower @@ -2652,7 +2660,7 @@ index 36500664..e0bf9040 100644 rely on the JIT compiler to eliminate the lookups:

    -@@ -593,7 +589,7 @@ it to a local variable in the function scope is unnecessary.
    +@@ -593,7 +587,7 @@ it to a local variable in the function scope is unnecessary.
      
    -@@ -153,12 +149,12 @@ Contains the target OS name: +@@ -153,12 +147,12 @@ Contains the target OS name:

    jit.arch

    Contains the target architecture name: @@ -2739,7 +2747,7 @@ index e4088bcb..b8a25967 100644 option.

    -@@ -178,7 +174,7 @@ which was one of the ways to enable optimization. +@@ -178,7 +172,7 @@ which was one of the ways to enable optimization.

    jit.util.* — JIT compiler introspection

    @@ -2748,7 +2756,7 @@ index e4088bcb..b8a25967 100644 traces, the IR and the generated machine code. The functionality provided by this module is still in flux and therefore undocumented.

    -@@ -191,7 +187,7 @@ if you want to know more. +@@ -191,7 +185,7 @@ if you want to know more.
    -@@ -162,7 +158,7 @@ To see how much time is spent in different VM states or +@@ -162,7 +156,7 @@ To see how much time is spent in different VM states or Combinations of v/z with f/F/l produce two-level views, e.g. -jp=vf or -jp=fv. This shows the time spent in a VM state or zone vs. hotspots. This can be used to answer @@ -2829,7 +2837,7 @@ index 71b8c033..b645a204 100644 "What's the garbage collector overhead for a specific function?".

    -@@ -221,7 +217,7 @@ local profile = require("jit.profile") +@@ -221,7 +215,7 @@ local profile = require("jit.profile") This module can be used to implement your own higher-level profiler. A typical profiling run starts the profiler, captures stack dumps in the profiler callback, adds them to a hash table to aggregate the number @@ -2838,7 +2846,7 @@ index 71b8c033..b645a204 100644 stack dumps. Other parameters can be sampled in the profiler callback, too. But it's important not to spend too much time in the callback, since this may skew the statistics. -@@ -275,9 +271,9 @@ returns a string with a stack dump for the thread (coroutine), +@@ -275,9 +269,9 @@ returns a string with a stack dump for the thread (coroutine), formatted according to the fmt argument:

    -@@ -99,62 +90,204 @@ For the impatient (on POSIX systems): +@@ -99,62 +88,204 @@ For the impatient (on POSIX systems):
      make && sudo make install
      
    + +

    Requirements

    +

    Systems

    -

    --LuaJIT currently builds out-of-the box on most systems. --Here's the compatibility matrix for the supported combinations of --operating systems, CPUs and compilers: ++

    +LuaJIT currently builds out-of-the box on most systems: -

    - - -- -- -- -- -- ++

    ++
    CPU / OSLinux or
    Android
    *BSD, OtherOSX 10.4+ or
    iOS 3.0+
    Windows
    XP/Vista/7
    ++ + + + + - - -- -- -- -- -- ++ ++ + + + @@ -3462,13 +3457,8 @@ index c491c601..9fad31f4 100644 + + + - - -- -- -- -- -- ++ ++ + + + @@ -3497,46 +3487,26 @@ index c491c601..9fad31f4 100644 + + + - - -- -- -- -- -- ++ ++ + + + + - - -- -- -- -- -- ++ ++ + + + + - - -- -- -- -- -- ++ ++ + + + + - - -- -- -- -- -- ++ ++ + + + @@ -3553,12 +3523,15 @@ index c491c601..9fad31f4 100644 + + + - -
    OSMin. VersionRequirementsLuaJIT Versions
    x86 (32 bit)GCC 4.2+GCC 4.2+XCode 5.0+
    Clang
    MSVC, MSVC/EE
    WinSDK
    MinGW, Cygwin
    Windows7x86 or x64, ARM64: TBA  v2.0 –
    x64 (64 bit)GCC 4.2+GCC 4.2+
    ORBIS (PS4)
    XCode 5.0+
    Clang
    MSVC + SDK v7.0
    WinSDK v7.0
    Durango (Xbox One)
    macOS (OSX)10.4  PS3 SDKv2.0 – v2.1 EOL
    ARMv5+
    ARM9E+
    GCC 4.2+GCC 4.2+
    PSP2 (PS VITA)
    XCode 5.0+
    Clang
     
    PS4 PS4 SDK (ORBIS)v2.0 –
    ARM64GCC 4.8+ XCode 6.0+
    Clang 3.5+
     
    PS5 PS5 SDK (PROSPERO)v2.1 –
    PPCGCC 4.3+GCC 4.3+
    GCC 4.1 (PS3)
     XEDK (Xbox 360)
    PS Vita PS Vita SDK (PSP2)v2.0 – v2.1 EOL
    MIPS32
    MIPS64
    GCC 4.3+GCC 4.3+  
    Xbox 360 Xbox 360 SDK (XEDK) NintendoSDK + NX Addonv2.1 –
    -+

    ++ ++ +

    +-LuaJIT currently builds out-of-the box on most systems. +-Here's the compatibility matrix for the supported combinations of +-operating systems, CPUs and compilers: +The codebase has compatibility defines for some more systems, but +without official support. -+

    +

    +

    Toolchains

    +

    +Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or @@ -3570,15 +3543,25 @@ index c491c601..9fad31f4 100644 +cross-builds. +

    +

    CPU Architectures

    -+ -+ +
    + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + @@ -3598,36 +3581,61 @@ index c491c601..9fad31f4 100644 + + + -+ -+ + + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + @@ -3647,8 +3655,8 @@ index c491c601..9fad31f4 100644 + + + -+ -+
    CPU / OSLinux or
    Android
    *BSD, OtherOSX 10.4+ or
    iOS 3.0+
    Windows
    XP/Vista/7
    CPUBitsRequirementsVariantsLuaJIT Versions
    x86 (32 bit)GCC 4.2+GCC 4.2+XCode 5.0+
    Clang
    MSVC, MSVC/EE
    WinSDK
    MinGW, Cygwin
    x8632v2.1+: SSE2ARMv5+, ARM9E+hard-fp + soft-fpv2.0 –
    x64 (64 bit)GCC 4.2+GCC 4.2+
    ORBIS (PS4)
    XCode 5.0+
    Clang
    MSVC + SDK v7.0
    WinSDK v7.0
    Durango (Xbox One)
    ARM6464 ARM64le + ARM64bev2.1 –
    ARMv5+
    ARM9E+
    GCC 4.2+GCC 4.2+
    PSP2 (PS VITA)
    XCode 5.0+
    Clang
     PPC3232 hard-fp + soft-fpv2.0 – v2.1 EOL
    ARM64GCC 4.8+ XCode 6.0+
    Clang 3.5+
     PPC/e50032e500v2 v2.0 EOL
    PPCGCC 4.3+GCC 4.3+
    GCC 4.1 (PS3)
     XEDK (Xbox 360)MIPS3232MIPS32r1 – r5hard-fp + soft-fpv2.0 –
    MIPS32
    MIPS64
    GCC 4.3+GCC 4.3+  MIPS6464MIPS64r1 – r5RVA22+ TBA
    + + +

    +There are no plans to add historic architectures or to continue support +for end-of-life (EOL) architectures, for which no new CPUs are commonly @@ -3658,7 +3666,7 @@ index c491c601..9fad31f4 100644

    Configuring LuaJIT

    -@@ -169,22 +302,21 @@ only). +@@ -169,22 +300,21 @@ only).

  • src/Makefile has settings for compiling LuaJIT under POSIX, MinGW or Cygwin.
  • src/msvcbuild.bat has settings for compiling LuaJIT with @@ -3688,7 +3696,7 @@ index c491c601..9fad31f4 100644

    Prerequisites

    Depending on your distribution, you may need to install a package for -@@ -192,14 +324,19 @@ GCC, the development headers and/or a complete SDK. E.g. on a current +@@ -192,14 +322,19 @@ GCC, the development headers and/or a complete SDK. E.g. on a current Debian/Ubuntu, install libc6-dev with the package manager.

    @@ -3714,7 +3722,7 @@ index c491c601..9fad31f4 100644

    Building LuaJIT

    The supplied Makefiles try to auto-detect the settings needed for your -@@ -223,9 +360,12 @@ You can add an extra prefix to the search paths by appending the +@@ -223,9 +358,12 @@ You can add an extra prefix to the search paths by appending the make PREFIX=/home/myself/lj2

    @@ -3729,7 +3737,7 @@ index c491c601..9fad31f4 100644

    Installing LuaJIT

    The top-level Makefile installs LuaJIT by default under -@@ -252,27 +392,18 @@ Obviously the prefixes given during build and installation need to be the same. +@@ -252,27 +390,18 @@ Obviously the prefixes given during build and installation need to be the same.

    Either install one of the open source SDKs (» MinGW or @@ -3763,7 +3771,7 @@ index c491c601..9fad31f4 100644 directory where you've unpacked the sources and run these commands:

    -@@ -280,37 +411,14 @@ cd src
    +@@ -280,37 +409,14 @@ cd src
      msvcbuild
      

    @@ -3804,7 +3812,7 @@ index c491c601..9fad31f4 100644

      mingw32-make
    -@@ -365,7 +473,7 @@ You need to specify TARGET_SYS whenever the host OS and the
    +@@ -365,7 +471,7 @@ You need to specify TARGET_SYS whenever the host OS and the
      target OS differ, or you'll get assembler or linker errors:
      

      @@ -3813,7 +3821,7 @@ index c491c601..9fad31f4 100644
    • For a minimal target OS, you may need to disable the built-in allocator in src/Makefile and use TARGET_SYS=Other.
    • Don't forget to specify the same TARGET_SYS for the install step, too.
    -@@ -428,52 +536,33 @@ make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64" +@@ -428,52 +534,33 @@ make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64" make CROSS=mipsel-linux- TARGET_CFLAGS="-mips64r2 -mabi=64"

    @@ -3888,7 +3896,7 @@ index c491c601..9fad31f4 100644

    Note: the JIT compiler is disabled for iOS, because regular iOS Apps -@@ -483,13 +572,6 @@ much slower than the JIT compiler. Please complain to Apple, not me. +@@ -483,13 +570,6 @@ much slower than the JIT compiler. Please complain to Apple, not me. Or use Android. :-p

    @@ -3902,7 +3910,7 @@ index c491c601..9fad31f4 100644
      # iOS/ARM64
      ISDKP=$(xcrun --sdk iphoneos --show-sdk-path)
      ICC=$(xcrun --sdk iphoneos --find clang)
    -@@ -501,8 +583,7 @@ make DEFAULT_CC=clang CROSS="$(dirname $ICC)/" \
    +@@ -501,8 +581,7 @@ make DEFAULT_CC=clang CROSS="$(dirname $ICC)/" \
      

    Cross-compiling for consoles

    Building LuaJIT for consoles requires both a supported host compiler @@ -3912,7 +3920,7 @@ index c491c601..9fad31f4 100644

    Due to restrictions on consoles, the JIT compiler is disabled and only -@@ -523,45 +604,58 @@ To cross-compile for PS3 from a Linux host (requires +@@ -523,45 +602,58 @@ To cross-compile for PS3 from a Linux host (requires make HOST_CC="gcc -m32" CROSS=ppu-lv2-

    @@ -4007,7 +4015,7 @@ index c491c601..9fad31f4 100644

    Embedding LuaJIT

    -@@ -590,14 +684,6 @@ the DLL). You may link LuaJIT statically on Windows only if you don't +@@ -590,14 +682,6 @@ the DLL). You may link LuaJIT statically on Windows only if you don't intend to load Lua/C modules at runtime.

  • @@ -4022,7 +4030,7 @@ index c491c601..9fad31f4 100644

    Additional hints for initializing LuaJIT using the C API functions:

    Hints for Distribution Maintainers

    -@@ -630,7 +716,7 @@ in unspeakable ways. +@@ -630,7 +714,7 @@ in unspeakable ways. There should be absolutely no need to patch luaconf.h or any of the Makefiles. And please do not hand-pick files for your packages — simply use whatever make install creates. There's a reason @@ -4051,7 +4059,7 @@ index c491c601..9fad31f4 100644

    The build system uses GNU make and auto-detects most settings based on -@@ -682,7 +768,7 @@ to me (the upstream) and not you (the package maintainer), anyway. +@@ -682,7 +766,7 @@ to me (the upstream) and not you (the package maintainer), anyway.