summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-02-07 09:06:23 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-02-07 09:06:23 +0000
commitccd29a1d09fee844a38880295d5436748ced3cd4 (patch)
tree5636e6701fe4f746ac3bb9a12d67931f298f31fe /Build
parent471f684a33632dc3f91ce1c96b3dfc4efea086da (diff)
libs/luajit: OSX build fix from upstream
git-svn-id: svn://tug.org/texlive/trunk@32906 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/ChangeLog5
-rw-r--r--Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/patch-03-OSX-build32
-rw-r--r--Build/source/libs/luajit/LuaJIT-2.0.2/src/Makefile4
-rw-r--r--Build/source/libs/luajit/LuaJIT-2.0.2/src/vm_x86.dasc4
4 files changed, 42 insertions, 3 deletions
diff --git a/Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/ChangeLog b/Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/ChangeLog
index 0ecc266aad1..7d3891277b3 100644
--- a/Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/ChangeLog
+++ b/Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-03-OSX-build (new): Backport from upstream git.
+ Fix OSX build issue by Mike Pall.
+
2014-02-06 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-02-unwind (new): Bug fix.
diff --git a/Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/patch-03-OSX-build b/Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/patch-03-OSX-build
new file mode 100644
index 00000000000..f7b437ee78d
--- /dev/null
+++ b/Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/patch-03-OSX-build
@@ -0,0 +1,32 @@
+diff -ur -x lbitlib.c LuaJIT-2.0.2.orig/src/Makefile LuaJIT-2.0.2/src/Makefile
+--- LuaJIT-2.0.2.orig/src/Makefile 2014-02-05 10:09:02.000000000 +0100
++++ LuaJIT-2.0.2/src/Makefile 2014-02-07 09:53:10.000000000 +0100
+@@ -287,7 +287,9 @@
+ endif
+ TARGET_STRIP+= -x
+ TARGET_AR+= 2>/dev/null
+- TARGET_XCFLAGS+= -fno-stack-protector
++ ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null -fno-stack-protector 2>/dev/null || echo 1))
++ TARGET_XCFLAGS+= -fno-stack-protector
++ endif
+ TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC
+ TARGET_DYNXLDOPTS=
+ TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER)
+diff -ur -x lbitlib.c LuaJIT-2.0.2.orig/src/vm_x86.dasc LuaJIT-2.0.2/src/vm_x86.dasc
+--- LuaJIT-2.0.2.orig/src/vm_x86.dasc 2013-06-03 21:00:00.000000000 +0200
++++ LuaJIT-2.0.2/src/vm_x86.dasc 2014-02-07 09:53:19.000000000 +0100
+@@ -6344,12 +6344,12 @@
+ #if LJ_64
+ "\t.byte 0xe\n\t.byte 16\n" /* def_cfa_offset */
+ "\t.byte 0x86\n\t.byte 0x2\n" /* offset rbp */
+- "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */
++ "\t.byte 0xd\n\t.byte 0x6\n" /* def_cfa_register rbp */
+ "\t.byte 0x83\n\t.byte 0x3\n" /* offset rbx */
+ #else
+ "\t.byte 0xe\n\t.byte 8\n" /* def_cfa_offset */
+ "\t.byte 0x84\n\t.byte 0x2\n" /* offset ebp (4 for MACH-O)*/
+- "\t.byte 0xd\n\t.uleb128 0x4\n" /* def_cfa_register ebp */
++ "\t.byte 0xd\n\t.byte 0x4\n" /* def_cfa_register ebp */
+ "\t.byte 0x83\n\t.byte 0x3\n" /* offset ebx */
+ #endif
+ "\t.align " BSZPTR "\n"
diff --git a/Build/source/libs/luajit/LuaJIT-2.0.2/src/Makefile b/Build/source/libs/luajit/LuaJIT-2.0.2/src/Makefile
index 9076ceed7a9..f136e214551 100644
--- a/Build/source/libs/luajit/LuaJIT-2.0.2/src/Makefile
+++ b/Build/source/libs/luajit/LuaJIT-2.0.2/src/Makefile
@@ -287,7 +287,9 @@ ifeq (Darwin,$(TARGET_SYS))
endif
TARGET_STRIP+= -x
TARGET_AR+= 2>/dev/null
- TARGET_XCFLAGS+= -fno-stack-protector
+ ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null -fno-stack-protector 2>/dev/null || echo 1))
+ TARGET_XCFLAGS+= -fno-stack-protector
+ endif
TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC
TARGET_DYNXLDOPTS=
TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER)
diff --git a/Build/source/libs/luajit/LuaJIT-2.0.2/src/vm_x86.dasc b/Build/source/libs/luajit/LuaJIT-2.0.2/src/vm_x86.dasc
index f25dfd302b8..cc459254646 100644
--- a/Build/source/libs/luajit/LuaJIT-2.0.2/src/vm_x86.dasc
+++ b/Build/source/libs/luajit/LuaJIT-2.0.2/src/vm_x86.dasc
@@ -6344,12 +6344,12 @@ static void emit_asm_debug(BuildCtx *ctx)
#if LJ_64
"\t.byte 0xe\n\t.byte 16\n" /* def_cfa_offset */
"\t.byte 0x86\n\t.byte 0x2\n" /* offset rbp */
- "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */
+ "\t.byte 0xd\n\t.byte 0x6\n" /* def_cfa_register rbp */
"\t.byte 0x83\n\t.byte 0x3\n" /* offset rbx */
#else
"\t.byte 0xe\n\t.byte 8\n" /* def_cfa_offset */
"\t.byte 0x84\n\t.byte 0x2\n" /* offset ebp (4 for MACH-O)*/
- "\t.byte 0xd\n\t.uleb128 0x4\n" /* def_cfa_register ebp */
+ "\t.byte 0xd\n\t.byte 0x4\n" /* def_cfa_register ebp */
"\t.byte 0x83\n\t.byte 0x3\n" /* offset ebx */
#endif
"\t.align " BSZPTR "\n"