summaryrefslogtreecommitdiff
path: root/Build/source/libs/luajit/LuaJIT-2.0.2-PATCHES/patch-03-OSX-build
blob: f7b437ee78d58698a1be6bdd4c028d350ddaffe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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"