1
0

tile-fix-libgcc.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. diff -Nur gcc-5.2.0.orig/gcc/config/tilegx/linux.h gcc-5.2.0/gcc/config/tilegx/linux.h
  2. --- gcc-5.2.0.orig/gcc/config/tilegx/linux.h 2015-01-05 13:33:28.000000000 +0100
  3. +++ gcc-5.2.0/gcc/config/tilegx/linux.h 2015-12-02 15:13:59.563521746 +0100
  4. @@ -55,8 +55,6 @@
  5. /* For __clear_cache in libgcc2.c. */
  6. #ifdef IN_LIBGCC2
  7. -#include <arch/icache.h>
  8. -
  9. /* Use the minimum page size of 4K. Alternatively we can call
  10. getpagesize() but it introduces a libc dependence. */
  11. #undef CLEAR_INSN_CACHE
  12. diff -Nur gcc-5.2.0.orig/libgcc/config/tilepro/atomic.h gcc-5.2.0/libgcc/config/tilepro/atomic.h
  13. --- gcc-5.2.0.orig/libgcc/config/tilepro/atomic.h 2015-01-05 13:33:28.000000000 +0100
  14. +++ gcc-5.2.0/libgcc/config/tilepro/atomic.h 2015-12-02 15:41:08.868942210 +0100
  15. @@ -46,6 +46,11 @@
  16. The "exchange" and "compare and exchange" macros may also take
  17. pointer values. We use the pseudo-type "VAL" in the documentation
  18. to indicate the use of an appropriate type. */
  19. +
  20. +#ifndef SPR_CMPEXCH_VALUE
  21. +#define SPR_CMPEXCH_VALUE 0x2780
  22. +#endif
  23. +
  24. #else
  25. /* Atomic instruction macros
  26. @@ -92,13 +97,6 @@
  27. compare-and-exchange routine, so may be potentially less efficient. */
  28. #endif
  29. -#ifdef __tilegx__
  30. -#include <arch/spr_def.h>
  31. -#else
  32. -#include <asm/unistd.h>
  33. -#endif
  34. -
  35. -
  36. /* 32-bit integer compare-and-exchange. */
  37. static __inline __attribute__ ((always_inline))
  38. int arch_atomic_val_compare_and_exchange_4 (volatile int *mem,