From b9cb7767858bde65b88385dfeed8b1f215f24af2 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 30 Apr 2016 19:37:33 +0200 Subject: tilegx: add more simple patch --- toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch | 58 ----------------------- toolchain/gcc/patches/5.3.0/tilegx-fix.patch | 24 ++++++++++ 2 files changed, 24 insertions(+), 58 deletions(-) delete mode 100644 toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch create mode 100644 toolchain/gcc/patches/5.3.0/tilegx-fix.patch (limited to 'toolchain/gcc/patches') diff --git a/toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch b/toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch deleted file mode 100644 index 0745ebbc7..000000000 --- a/toolchain/gcc/patches/5.3.0/tile-fix-libgcc.patch +++ /dev/null @@ -1,58 +0,0 @@ -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 - --#include -- - /* 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/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 -- - /* 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 - to indicate the use of an appropriate type. */ -+ -+#ifndef SPR_CMPEXCH_VALUE -+#define SPR_CMPEXCH_VALUE 0x2780 -+#endif -+ - #else - /* Atomic instruction macros - -@@ -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 - --#ifdef __tilegx__ --#include --#else --#include --#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)) diff --git a/toolchain/gcc/patches/5.3.0/tilegx-fix.patch b/toolchain/gcc/patches/5.3.0/tilegx-fix.patch new file mode 100644 index 000000000..563ea784d --- /dev/null +++ b/toolchain/gcc/patches/5.3.0/tilegx-fix.patch @@ -0,0 +1,24 @@ +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-04-29 07:14:10.534973350 +0200 +@@ -55,8 +55,6 @@ + /* For __clear_cache in libgcc2.c. */ + #ifdef IN_LIBGCC2 + +-#include +- + /* 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-04-29 07:15:11.149301459 +0200 +@@ -93,7 +93,7 @@ + #endif + + #ifdef __tilegx__ +-#include ++#define SPR_CMPEXCH_VALUE 0x2780 + #else + #include + #endif -- cgit v1.2.3