From c74770c68d13e944dfb514dc4a745cee5acd3e69 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 2 Dec 2015 16:12:56 +0100 Subject: fix gcc 5.2 nios2/tilegx toolchain building --- toolchain/gcc/patches/5.2.0/fix-nios2.patch | 11 ++++++++ toolchain/gcc/patches/5.2.0/fix-tile.patch | 41 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 toolchain/gcc/patches/5.2.0/fix-nios2.patch create mode 100644 toolchain/gcc/patches/5.2.0/fix-tile.patch (limited to 'toolchain') diff --git a/toolchain/gcc/patches/5.2.0/fix-nios2.patch b/toolchain/gcc/patches/5.2.0/fix-nios2.patch new file mode 100644 index 000000000..8fe2589ce --- /dev/null +++ b/toolchain/gcc/patches/5.2.0/fix-nios2.patch @@ -0,0 +1,11 @@ +diff -Nur gcc-4.9.3.orig/libgcc/config/nios2/linux-atomic.c gcc-4.9.3/libgcc/config/nios2/linux-atomic.c +--- gcc-4.9.3.orig/libgcc/config/nios2/linux-atomic.c 2014-01-02 23:25:22.000000000 +0100 ++++ gcc-4.9.3/libgcc/config/nios2/linux-atomic.c 2015-12-01 22:50:00.029946306 +0100 +@@ -20,7 +20,6 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +-#include + #define EFAULT 14 + #define EBUSY 16 + #define ENOSYS 38 diff --git a/toolchain/gcc/patches/5.2.0/fix-tile.patch b/toolchain/gcc/patches/5.2.0/fix-tile.patch new file mode 100644 index 000000000..07aa97200 --- /dev/null +++ b/toolchain/gcc/patches/5.2.0/fix-tile.patch @@ -0,0 +1,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 +- + /* 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 +-#else +-#include +-#endif +- +- + /* 32-bit integer compare-and-exchange. */ + static __inline __attribute__ ((always_inline)) + int arch_atomic_val_compare_and_exchange_4 (volatile int *mem, -- cgit v1.2.3