summaryrefslogtreecommitdiff
path: root/toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch
blob: 07aa97200a76ddd2d9899922d255f0ce204fb7e9 (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
33
34
35
36
37
38
39
40
41
diff -Nur gcc-5.2.0.orig/gcc/config/tilegx/linux.h gcc-5.2.0/gcc/config/tilegx/linux.h
--- gcc-5.2.0.orig/gcc/config/tilegx/linux.h	2015-01-05 13:33:28.000000000 +0100
+++ gcc-5.2.0/gcc/config/tilegx/linux.h	2015-12-02 15:13:59.563521746 +0100
@@ -55,8 +55,6 @@
 /* For __clear_cache in libgcc2.c.  */
 #ifdef IN_LIBGCC2
 
-#include <arch/icache.h>
-
 /* Use the minimum page size of 4K.  Alternatively we can call
    getpagesize() but it introduces a libc dependence.  */
 #undef CLEAR_INSN_CACHE
diff -Nur gcc-5.2.0.orig/libgcc/config/tilepro/atomic.h gcc-5.2.0/libgcc/config/tilepro/atomic.h
--- gcc-5.2.0.orig/libgcc/config/tilepro/atomic.h	2015-01-05 13:33:28.000000000 +0100
+++ gcc-5.2.0/libgcc/config/tilepro/atomic.h	2015-12-02 15:41:08.868942210 +0100
@@ -46,6 +46,11 @@
    The "exchange" and "compare and exchange" macros may also take
    pointer values.  We use the pseudo-type "VAL" in the documentation
    to indicate the use of an appropriate type.  */
+
+#ifndef SPR_CMPEXCH_VALUE
+#define SPR_CMPEXCH_VALUE 0x2780
+#endif
+
 #else
 /* Atomic instruction macros
 
@@ -92,13 +97,6 @@
    compare-and-exchange routine, so may be potentially less efficient.  */
 #endif
 
-#ifdef __tilegx__
-#include <arch/spr_def.h>
-#else
-#include <asm/unistd.h>
-#endif
-
-
 /* 32-bit integer compare-and-exchange.  */
 static __inline __attribute__ ((always_inline))
      int arch_atomic_val_compare_and_exchange_4 (volatile int *mem,