summaryrefslogtreecommitdiff
path: root/user/orc/orc-0.4.28-ppc64-elfv2.patch
blob: 7f4f8b0d396ee84e7c4bea14c8c2814e8892a8d3 (plain) (blame)
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
--- orc-0.4.28/orc/orcprogram-altivec.c.old	2014-04-11 03:36:22.000000000 -0500
+++ orc-0.4.28/orc/orcprogram-altivec.c	2018-01-07 23:32:55.065198004 -0600
@@ -27,12 +27,14 @@
   ORC_ASM_CODE (compiler, "%s:\n", compiler->program->name);
 
   if (compiler->is_64bit) {
+#if !defined(_CALL_ELF) || _CALL_ELF == 1
     ORC_ASM_CODE (compiler, " .quad .%s,.TOC.@tocbase,0\n",
                   compiler->program->name);
     ORC_ASM_CODE (compiler, ".%s:\n", compiler->program->name);
     powerpc_emit (compiler, 0); powerpc_emit (compiler, 0);
     powerpc_emit (compiler, 0); powerpc_emit (compiler, 0);
     powerpc_emit (compiler, 0); powerpc_emit (compiler, 0);
+#endif
     powerpc_emit_stdu (compiler, POWERPC_R1, POWERPC_R1, -16);
   } else {
     powerpc_emit_stwu (compiler, POWERPC_R1, POWERPC_R1, -16);
--- orc-0.4.28/orc/orcpowerpc.c.old	2014-04-11 03:36:22.000000000 -0500
+++ orc-0.4.28/orc/orcpowerpc.c	2018-01-07 23:31:53.285259170 -0600
@@ -423,7 +423,7 @@
   int size = code->code_size;
 
   ptr = code->code;
-#ifdef __powerpc64__
+#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)
   *(unsigned char **) ptr = (unsigned char *) code->exec + 24;
 #endif
   for (i=0;i<size;i+=cache_line_size) {