If you read the documentation you'll see that cygwin64 is not yet supported, only 32 bit. http://luajit.org/install.html
However it doesn't look hard to add support to it. Just try. e.g. the documentation suggests:
Configuring LuaJIT
The standard configuration should work fine for most installations. Usually there is no need to tweak the settings. The following files hold all user-configurable settings:
src/luaconf.h
sets some configuration variables.
Makefile
has settings for installing LuaJIT (POSIX only).
src/Makefile
has settings for compiling LuaJIT under POSIX, MinGW or Cygwin.
src/msvcbuild.bat
has settings for compiling LuaJIT with MSVC or WinSDK.
Please read the instructions given in these files, before changing any settings.
So fixing src/Makefile seems to be the easiest. Unfortunately I'm a bit sick currently and cannot do it right now.
I've looked a bit and this patch fixes the CALL_MMAP problem:
--- src/lj_alloc.c~ 2014-03-23 20:47:09.000000000 -0500
+++ src/lj_alloc.c 2014-03-23 20:47:54.145877000 -0500
@@ -188,7 +188,7 @@
return ptr;
}
-#elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun__)
+#elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun__) || defined(__CYGWIN__)
/* OSX and FreeBSD mmap() use a naive first-fit linear search.
** That's perfect for us. Except that -pagezero_size must be set for OSX,
Add a __CYGWIN__ check.
Now just the lj_err_unwind_win64 unwinder is not linked. This is for Mike Pall now. Not sure if EXT or INT is appropriate and how it is linked.