frv-remove-write-macro.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. diff -Nur gcc-6.1.0.orig/gcc/config/frv/frv.h gcc-6.1.0/gcc/config/frv/frv.h
  2. --- gcc-6.1.0.orig/gcc/config/frv/frv.h 2016-01-04 15:30:50.000000000 +0100
  3. +++ gcc-6.1.0/gcc/config/frv/frv.h 2016-08-16 13:31:32.652520944 +0200
  4. @@ -1350,11 +1350,8 @@
  5. #define TRAMPOLINE_TEMPLATE_NAME "__trampoline_template"
  6. #endif
  7. -#define Twrite _write
  8. -
  9. #if ! __FRV_FDPIC__
  10. #define TRANSFER_FROM_TRAMPOLINE \
  11. -extern int Twrite (int, const void *, unsigned); \
  12. \
  13. void \
  14. __trampoline_setup (short * addr, int size, int fnaddr, int sc) \
  15. @@ -1366,8 +1363,6 @@
  16. \
  17. if (size < 20) \
  18. { \
  19. - Twrite (2, "__trampoline_setup bad size\n", \
  20. - sizeof ("__trampoline_setup bad size\n") - 1); \
  21. exit (-1); \
  22. } \
  23. \
  24. @@ -1397,7 +1392,6 @@
  25. "\tjmpl @(gr0,gr6)\n");
  26. #else
  27. #define TRANSFER_FROM_TRAMPOLINE \
  28. -extern int Twrite (int, const void *, unsigned); \
  29. \
  30. void \
  31. __trampoline_setup (addr, size, fnaddr, sc) \
  32. @@ -1414,8 +1408,6 @@
  33. \
  34. if (size != 32) \
  35. { \
  36. - Twrite (2, "__trampoline_setup bad size\n", \
  37. - sizeof ("__trampoline_setup bad size\n") - 1); \
  38. exit (-1); \
  39. } \
  40. \
  41. diff -Nur gcc-6.1.0.orig/gcc/config/frv/linux.h gcc-6.1.0/gcc/config/frv/linux.h
  42. --- gcc-6.1.0.orig/gcc/config/frv/linux.h 2016-01-04 15:30:50.000000000 +0100
  43. +++ gcc-6.1.0/gcc/config/frv/linux.h 2016-08-16 13:31:06.763517719 +0200
  44. @@ -68,7 +68,4 @@
  45. #undef INVOKE__main
  46. -#undef Twrite
  47. -#define Twrite __write
  48. -
  49. #endif /* __FRV_LINUX_H__ */