summaryrefslogtreecommitdiff
path: root/Build/source/libs/luajit
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-03 10:38:50 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-03 10:38:50 +0000
commitff09b3baf412d5e76069d928b3be7faf1f909a72 (patch)
treee497ea8ed4caa349ccd8ed1b399650d54f037026 /Build/source/libs/luajit
parent8a4e73b3b2f4ffef7bf105234e9b023f30cf2816 (diff)
libs/lua52: New test checking error handling
libs/luajit: New test checking error handling git-svn-id: svn://tug.org/texlive/trunk@33086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/luajit')
-rw-r--r--Build/source/libs/luajit/ChangeLog7
-rw-r--r--Build/source/libs/luajit/Makefile.am14
-rw-r--r--Build/source/libs/luajit/Makefile.in85
-rwxr-xr-xBuild/source/libs/luajit/configure56
-rw-r--r--Build/source/libs/luajit/configure.ac1
-rw-r--r--Build/source/libs/luajit/jiterr.exp4
-rwxr-xr-xBuild/source/libs/luajit/luajiterr.test13
7 files changed, 153 insertions, 27 deletions
diff --git a/Build/source/libs/luajit/ChangeLog b/Build/source/libs/luajit/ChangeLog
index 179a931ebe4..27f70cdd773 100644
--- a/Build/source/libs/luajit/ChangeLog
+++ b/Build/source/libs/luajit/ChangeLog
@@ -1,3 +1,10 @@
+2014-03-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * luajiterr.test (new): Shell script to test error handling.
+ * jiterr.exp (new): Expected test output.
+ * Makefile.am: Add the new files. Add lbitlib.c.
+ * configure.ac: The test program requires dlopen().
+
2014-02-24 Peter Breitenlohner <peb@mppmu.mpg.de>
* m4/lj-system.m4: Define LUAJIT_OS for native/buildvm.
diff --git a/Build/source/libs/luajit/Makefile.am b/Build/source/libs/luajit/Makefile.am
index d44b9d3185e..3b4af238c0d 100644
--- a/Build/source/libs/luajit/Makefile.am
+++ b/Build/source/libs/luajit/Makefile.am
@@ -25,6 +25,7 @@ noinst_LIBRARIES = libluajit.a
nodist_libluajit_a_SOURCES = \
$(ljlib_sources) \
+ @LUAJIT_TREE@/src/lbitlib.c \
@LUAJIT_TREE@/src/lib_aux.c \
@LUAJIT_TREE@/src/lib_init.c \
@LUAJIT_TREE@/src/lj_alloc.c \
@@ -134,17 +135,24 @@ CLEANFILES = $(HDRGEN) $(ljlib_sources) lj_vm_asm.s
CONFIG_CLEAN_FILES = dynasm_flags native_flags
if build
-check_PROGRAMS = jittest
-dist_check_SCRIPTS = luajit.test
-TESTS = luajit.test
+check_PROGRAMS = jittest luajittry
+dist_check_SCRIPTS = luajit.test luajiterr.test
+TESTS = luajit.test luajiterr.test
endif build
jittest_SOURCES = jittest.c
jittest_CPPFLAGS = -Iinclude
+nodist_luajittry_SOURCES = @LUAJIT_TREE@/src/luajit.c
+
+luajittry_CPPFLAGS = -Iinclude
+
LDADD = libluajit.a
+EXTRA_DIST += jiterr.exp
+CLEANFILES += jiterr.out jiterr.tmp
+
# Rebuild
rebuild_prereq =
rebuild_target = all
diff --git a/Build/source/libs/luajit/Makefile.in b/Build/source/libs/luajit/Makefile.in
index af3541e88d1..0f1704c3a25 100644
--- a/Build/source/libs/luajit/Makefile.in
+++ b/Build/source/libs/luajit/Makefile.in
@@ -79,7 +79,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@PEOBJ_FALSE@am__append_1 = lj_vm_asm.s
-@build_TRUE@check_PROGRAMS = jittest$(EXEEXT)
+@build_TRUE@check_PROGRAMS = jittest$(EXEEXT) luajittry$(EXEEXT)
DIST_COMMON = $(srcdir)/../../am/rebuild.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(srcdir)/config.h.in \
@@ -127,6 +127,7 @@ am__objects_1 = lib_base.$(OBJEXT) lib_math.$(OBJEXT) \
am__dirstamp = $(am__leading_dot)dirstamp
@PEOBJ_FALSE@am__objects_2 = lj_vm_asm.$(OBJEXT)
nodist_libluajit_a_OBJECTS = $(am__objects_1) \
+ @LUAJIT_TREE@/src/lbitlib.$(OBJEXT) \
@LUAJIT_TREE@/src/lib_aux.$(OBJEXT) \
@LUAJIT_TREE@/src/lib_init.$(OBJEXT) \
@LUAJIT_TREE@/src/lj_alloc.$(OBJEXT) \
@@ -182,7 +183,12 @@ am_jittest_OBJECTS = jittest-jittest.$(OBJEXT)
jittest_OBJECTS = $(am_jittest_OBJECTS)
jittest_LDADD = $(LDADD)
jittest_DEPENDENCIES = libluajit.a
-am__dist_check_SCRIPTS_DIST = luajit.test
+nodist_luajittry_OBJECTS = \
+ @LUAJIT_TREE@/src/luajittry-luajit.$(OBJEXT)
+luajittry_OBJECTS = $(nodist_luajittry_OBJECTS)
+luajittry_LDADD = $(LDADD)
+luajittry_DEPENDENCIES = libluajit.a
+am__dist_check_SCRIPTS_DIST = luajit.test luajiterr.test
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -220,7 +226,8 @@ AM_V_CCAS = $(am__v_CCAS_@AM_V@)
am__v_CCAS_ = $(am__v_CCAS_@AM_DEFAULT_V@)
am__v_CCAS_0 = @echo " CCAS " $@;
am__v_CCAS_1 =
-SOURCES = $(nodist_libluajit_a_SOURCES) $(jittest_SOURCES)
+SOURCES = $(nodist_libluajit_a_SOURCES) $(jittest_SOURCES) \
+ $(nodist_luajittry_SOURCES)
DIST_SOURCES = $(jittest_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
@@ -615,29 +622,30 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = $(LUAJIT_TREE) $(LUAJIT_TREE)-PATCHES
+EXTRA_DIST = $(LUAJIT_TREE) $(LUAJIT_TREE)-PATCHES jiterr.exp
AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES)
AM_CFLAGS = -Wall
SUBDIRS = native . include
noinst_LIBRARIES = libluajit.a
nodist_libluajit_a_SOURCES = $(ljlib_sources) \
- @LUAJIT_TREE@/src/lib_aux.c @LUAJIT_TREE@/src/lib_init.c \
- @LUAJIT_TREE@/src/lj_alloc.c @LUAJIT_TREE@/src/lj_api.c \
- @LUAJIT_TREE@/src/lj_asm.c @LUAJIT_TREE@/src/lj_bc.c \
- @LUAJIT_TREE@/src/lj_bcread.c @LUAJIT_TREE@/src/lj_bcwrite.c \
- @LUAJIT_TREE@/src/lj_carith.c @LUAJIT_TREE@/src/lj_ccall.c \
- @LUAJIT_TREE@/src/lj_ccallback.c @LUAJIT_TREE@/src/lj_cconv.c \
- @LUAJIT_TREE@/src/lj_cdata.c @LUAJIT_TREE@/src/lj_char.c \
- @LUAJIT_TREE@/src/lj_clib.c @LUAJIT_TREE@/src/lj_cparse.c \
- @LUAJIT_TREE@/src/lj_crecord.c @LUAJIT_TREE@/src/lj_ctype.c \
- @LUAJIT_TREE@/src/lj_debug.c @LUAJIT_TREE@/src/lj_dispatch.c \
- @LUAJIT_TREE@/src/lj_err.c @LUAJIT_TREE@/src/lj_ffrecord.c \
- @LUAJIT_TREE@/src/lj_func.c @LUAJIT_TREE@/src/lj_gc.c \
- @LUAJIT_TREE@/src/lj_gdbjit.c @LUAJIT_TREE@/src/lj_ir.c \
- @LUAJIT_TREE@/src/lj_lex.c @LUAJIT_TREE@/src/lj_lib.c \
- @LUAJIT_TREE@/src/lj_load.c @LUAJIT_TREE@/src/lj_mcode.c \
- @LUAJIT_TREE@/src/lj_meta.c @LUAJIT_TREE@/src/lj_obj.c \
- @LUAJIT_TREE@/src/lj_opt_dce.c @LUAJIT_TREE@/src/lj_opt_fold.c \
+ @LUAJIT_TREE@/src/lbitlib.c @LUAJIT_TREE@/src/lib_aux.c \
+ @LUAJIT_TREE@/src/lib_init.c @LUAJIT_TREE@/src/lj_alloc.c \
+ @LUAJIT_TREE@/src/lj_api.c @LUAJIT_TREE@/src/lj_asm.c \
+ @LUAJIT_TREE@/src/lj_bc.c @LUAJIT_TREE@/src/lj_bcread.c \
+ @LUAJIT_TREE@/src/lj_bcwrite.c @LUAJIT_TREE@/src/lj_carith.c \
+ @LUAJIT_TREE@/src/lj_ccall.c @LUAJIT_TREE@/src/lj_ccallback.c \
+ @LUAJIT_TREE@/src/lj_cconv.c @LUAJIT_TREE@/src/lj_cdata.c \
+ @LUAJIT_TREE@/src/lj_char.c @LUAJIT_TREE@/src/lj_clib.c \
+ @LUAJIT_TREE@/src/lj_cparse.c @LUAJIT_TREE@/src/lj_crecord.c \
+ @LUAJIT_TREE@/src/lj_ctype.c @LUAJIT_TREE@/src/lj_debug.c \
+ @LUAJIT_TREE@/src/lj_dispatch.c @LUAJIT_TREE@/src/lj_err.c \
+ @LUAJIT_TREE@/src/lj_ffrecord.c @LUAJIT_TREE@/src/lj_func.c \
+ @LUAJIT_TREE@/src/lj_gc.c @LUAJIT_TREE@/src/lj_gdbjit.c \
+ @LUAJIT_TREE@/src/lj_ir.c @LUAJIT_TREE@/src/lj_lex.c \
+ @LUAJIT_TREE@/src/lj_lib.c @LUAJIT_TREE@/src/lj_load.c \
+ @LUAJIT_TREE@/src/lj_mcode.c @LUAJIT_TREE@/src/lj_meta.c \
+ @LUAJIT_TREE@/src/lj_obj.c @LUAJIT_TREE@/src/lj_opt_dce.c \
+ @LUAJIT_TREE@/src/lj_opt_fold.c \
@LUAJIT_TREE@/src/lj_opt_loop.c @LUAJIT_TREE@/src/lj_opt_mem.c \
@LUAJIT_TREE@/src/lj_opt_narrow.c \
@LUAJIT_TREE@/src/lj_opt_sink.c \
@@ -663,12 +671,15 @@ ljlib_sources = \
lib_ffi.c
HDRGEN = lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h
-CLEANFILES = $(HDRGEN) $(ljlib_sources) lj_vm_asm.s rebuild.stamp
+CLEANFILES = $(HDRGEN) $(ljlib_sources) lj_vm_asm.s jiterr.out \
+ jiterr.tmp rebuild.stamp
CONFIG_CLEAN_FILES = dynasm_flags native_flags
-@build_TRUE@dist_check_SCRIPTS = luajit.test
-@build_TRUE@TESTS = luajit.test
+@build_TRUE@dist_check_SCRIPTS = luajit.test luajiterr.test
+@build_TRUE@TESTS = luajit.test luajiterr.test
jittest_SOURCES = jittest.c
jittest_CPPFLAGS = -Iinclude
+nodist_luajittry_SOURCES = @LUAJIT_TREE@/src/luajit.c
+luajittry_CPPFLAGS = -Iinclude
LDADD = libluajit.a
# Rebuild
@@ -738,6 +749,9 @@ clean-noinstLIBRARIES:
@LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) @LUAJIT_TREE@/src/$(DEPDIR)
@: > @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@LUAJIT_TREE@/src/lbitlib.$(OBJEXT): \
+ @LUAJIT_TREE@/src/$(am__dirstamp) \
+ @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@LUAJIT_TREE@/src/lib_aux.$(OBJEXT): \
@LUAJIT_TREE@/src/$(am__dirstamp) \
@LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@@ -889,6 +903,13 @@ clean-checkPROGRAMS:
jittest$(EXEEXT): $(jittest_OBJECTS) $(jittest_DEPENDENCIES) $(EXTRA_jittest_DEPENDENCIES)
@rm -f jittest$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(jittest_OBJECTS) $(jittest_LDADD) $(LIBS)
+@LUAJIT_TREE@/src/luajittry-luajit.$(OBJEXT): \
+ @LUAJIT_TREE@/src/$(am__dirstamp) \
+ @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+
+luajittry$(EXEEXT): $(luajittry_OBJECTS) $(luajittry_DEPENDENCIES) $(EXTRA_luajittry_DEPENDENCIES)
+ @rm -f luajittry$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(luajittry_OBJECTS) $(luajittry_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -909,6 +930,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_package.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_string.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_table.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lbitlib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lib_aux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lib_init.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lj_alloc.Po@am__quote@
@@ -959,6 +981,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lj_udata.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lj_vmevent.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lj_vmmath.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -990,6 +1013,20 @@ jittest-jittest.obj: jittest.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jittest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o jittest-jittest.obj `if test -f 'jittest.c'; then $(CYGPATH_W) 'jittest.c'; else $(CYGPATH_W) '$(srcdir)/jittest.c'; fi`
+@LUAJIT_TREE@/src/luajittry-luajit.o: @LUAJIT_TREE@/src/luajit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luajittry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/luajittry-luajit.o -MD -MP -MF @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Tpo -c -o @LUAJIT_TREE@/src/luajittry-luajit.o `test -f '@LUAJIT_TREE@/src/luajit.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/luajit.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Tpo @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@LUAJIT_TREE@/src/luajit.c' object='@LUAJIT_TREE@/src/luajittry-luajit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luajittry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/luajittry-luajit.o `test -f '@LUAJIT_TREE@/src/luajit.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/luajit.c
+
+@LUAJIT_TREE@/src/luajittry-luajit.obj: @LUAJIT_TREE@/src/luajit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luajittry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/luajittry-luajit.obj -MD -MP -MF @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Tpo -c -o @LUAJIT_TREE@/src/luajittry-luajit.obj `if test -f '@LUAJIT_TREE@/src/luajit.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/luajit.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/luajit.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Tpo @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@LUAJIT_TREE@/src/luajit.c' object='@LUAJIT_TREE@/src/luajittry-luajit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luajittry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/luajittry-luajit.obj `if test -f '@LUAJIT_TREE@/src/luajit.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/luajit.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/luajit.c'; fi`
+
.s.o:
$(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $<
diff --git a/Build/source/libs/luajit/configure b/Build/source/libs/luajit/configure
index 1aa50311226..3ffba5ea138 100755
--- a/Build/source/libs/luajit/configure
+++ b/Build/source/libs/luajit/configure
@@ -4786,6 +4786,62 @@ if test "$ac_res" != no; then :
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if ${ac_cv_search_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_dlopen+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_dlopen+:} false; then :
+
+else
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
LUAJIT_DEFINES=-DLUAJIT_ENABLE_LUA52COMPAT
diff --git a/Build/source/libs/luajit/configure.ac b/Build/source/libs/luajit/configure.ac
index 2bb7fe3a7c1..f8ecce6d473 100644
--- a/Build/source/libs/luajit/configure.ac
+++ b/Build/source/libs/luajit/configure.ac
@@ -23,6 +23,7 @@ AC_PROG_RANLIB
AC_PROG_LN_S
AC_SEARCH_LIBS([sqrt], [m])
+AC_SEARCH_LIBS([dlopen], [dl])
KPSE_LUAJIT_DEFINES
KPSE_LARGEFILE([LUAJIT_DEFINES])
diff --git a/Build/source/libs/luajit/jiterr.exp b/Build/source/libs/luajit/jiterr.exp
new file mode 100644
index 00000000000..117df1534c9
--- /dev/null
+++ b/Build/source/libs/luajit/jiterr.exp
@@ -0,0 +1,4 @@
+./luajittry: (command line):1: test
+stack traceback:
+ [C]: in function 'error'
+ (command line):1: in main chunk
diff --git a/Build/source/libs/luajit/luajiterr.test b/Build/source/libs/luajit/luajiterr.test
new file mode 100755
index 00000000000..25783449aea
--- /dev/null
+++ b/Build/source/libs/luajit/luajiterr.test
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+# Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+./luajittry -e "error('test')" 2>jiterr.tmp && exit 1
+
+sed -e '/\[C]: at 0x/d' jiterr.tmp >jiterr.out
+
+diff $srcdir/jiterr.exp jiterr.out || exit 1
+
+
+