summaryrefslogtreecommitdiff
path: root/toolchain/gcc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-01-26 07:57:30 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-01-26 07:57:30 +0100
commit05dfdb01b1da66b1314ae7cbd796d1d7f3906cef (patch)
tree350108331b64bd1bd28da072d01ac47a52f08a70 /toolchain/gcc
parente35dae1efd56219eb222e2cbd98090e8d672df98 (diff)
add support for tilepro/tilegx toolchain, tilepro is broken
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch39
1 files changed, 28 insertions, 11 deletions
diff --git a/toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch b/toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch
index 07aa97200..0745ebbc7 100644
--- a/toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch
+++ b/toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch
@@ -1,6 +1,6 @@
-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
+diff -Nur gcc-5.3.0.orig/gcc/config/tilegx/linux.h gcc-5.3.0/gcc/config/tilegx/linux.h
+--- gcc-5.3.0.orig/gcc/config/tilegx/linux.h 2015-01-05 13:33:28.000000000 +0100
++++ gcc-5.3.0/gcc/config/tilegx/linux.h 2016-01-25 12:53:51.975221940 +0100
@@ -55,8 +55,6 @@
/* For __clear_cache in libgcc2.c. */
#ifdef IN_LIBGCC2
@@ -10,9 +10,21 @@ diff -Nur gcc-5.2.0.orig/gcc/config/tilegx/linux.h gcc-5.2.0/gcc/config/tilegx/l
/* 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
+diff -Nur gcc-5.3.0.orig/gcc/config/tilepro/linux.h gcc-5.3.0/gcc/config/tilepro/linux.h
+--- gcc-5.3.0.orig/gcc/config/tilepro/linux.h 2015-01-05 13:33:28.000000000 +0100
++++ gcc-5.3.0/gcc/config/tilepro/linux.h 2016-01-25 12:56:33.687363200 +0100
+@@ -47,8 +47,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.3.0.orig/libgcc/config/tilepro/atomic.h gcc-5.3.0/libgcc/config/tilepro/atomic.h
+--- gcc-5.3.0.orig/libgcc/config/tilepro/atomic.h 2015-01-05 13:33:28.000000000 +0100
++++ gcc-5.3.0/libgcc/config/tilepro/atomic.h 2016-01-25 13:16:09.116389975 +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
@@ -25,17 +37,22 @@ diff -Nur gcc-5.2.0.orig/libgcc/config/tilepro/atomic.h gcc-5.2.0/libgcc/config/
#else
/* Atomic instruction macros
-@@ -92,13 +97,6 @@
+@@ -90,14 +95,12 @@
+ syscall, as is the 64-bit compare-and-exchange. The other 64-bit
+ routines are implemented by looping over the 64-bit
compare-and-exchange routine, so may be potentially less efficient. */
- #endif
+-#endif
-#ifdef __tilegx__
-#include <arch/spr_def.h>
-#else
-#include <asm/unistd.h>
-#endif
--
--
++#define __NR_FAST_cmpxchg -1
++#define __NR_FAST_atomic_update -2
++#define __NR_FAST_cmpxchg64 -3
+
++#endif
+
/* 32-bit integer compare-and-exchange. */
static __inline __attribute__ ((always_inline))
- int arch_atomic_val_compare_and_exchange_4 (volatile int *mem,