1
0

0001-fix-sh2-toolchain-building.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 123fe2e98cce5c82d81d2a350529a1ea712a4058 Mon Sep 17 00:00:00 2001
  2. From: Waldemar Brodkorb <wbx@openadk.org>
  3. Date: Sat, 26 Mar 2016 10:26:56 +0100
  4. Subject: [PATCH] fix sh2 toolchain building
  5. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  6. ---
  7. elf2flt.c | 10 ++++++----
  8. 1 file changed, 6 insertions(+), 4 deletions(-)
  9. diff --git a/elf2flt.c b/elf2flt.c
  10. index 7d0e639..3546341 100644
  11. --- a/elf2flt.c
  12. +++ b/elf2flt.c
  13. @@ -101,8 +101,10 @@ const char *elf2flt_progname;
  14. #define ARCH "sparc"
  15. #elif defined(TARGET_v850)
  16. #define ARCH "v850"
  17. -#elif defined(TARGET_sh)
  18. -#define ARCH "sh"
  19. +#elif defined(TARGET_sh2)
  20. +#define ARCH "sh2"
  21. +#elif defined(TARGET_sh2eb)
  22. +#define ARCH "sh2"
  23. #elif defined(TARGET_h8300)
  24. #define ARCH "h8300"
  25. #elif defined(TARGET_microblaze)
  26. @@ -1260,7 +1262,7 @@ NIOS2_RELOC_ERR:
  27. #endif /* TARGET_sparc */
  28. -#ifdef TARGET_sh
  29. +#if defined(TARGET_sh2) || defined(TARGET_sh2eb)
  30. case R_SH_DIR32:
  31. relocation_needed = 1;
  32. sym_vma = bfd_section_vma(abs_bfd, sym_section);
  33. @@ -1271,7 +1273,7 @@ NIOS2_RELOC_ERR:
  34. sym_addr += sym_vma + q->addend;
  35. sym_addr -= q->address;
  36. break;
  37. -#endif /* TARGET_sh */
  38. +#endif /* TARGET_sh2 / TARGET_sh2eb */
  39. #ifdef TARGET_e1
  40. #define htoe1l(x) htonl(x)
  41. --
  42. 1.7.10.4