sheb.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. Patch from Rich Felker
  2. From here:
  3. https://github.com/richfelker/musl-cross-make/blob/master/patches/binutils-2.25.1/0003-shemuls.diff
  4. Required to build sh2 big endian toolchain.
  5. diff -Nur binutils-2.25.1.orig/bfd/config.bfd binutils-2.25.1/bfd/config.bfd
  6. --- binutils-2.25.1.orig/bfd/config.bfd 2014-10-14 09:32:02.000000000 +0200
  7. +++ binutils-2.25.1/bfd/config.bfd 2015-12-06 15:17:26.703094863 +0100
  8. @@ -1370,6 +1370,7 @@
  9. sh-*-linux*)
  10. targ_defvec=sh_elf32_linux_be_vec
  11. targ_selvecs="sh_elf32_linux_vec sh64_elf32_linux_vec sh64_elf32_linux_be_vec sh64_elf64_linux_vec sh64_elf64_linux_be_vec"
  12. + targ_selvecs="${targ_selvecs} sh_elf32_vec sh_elf32_le_vec sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
  13. want64=true
  14. ;;
  15. #endif /* BFD64 */
  16. @@ -1377,10 +1378,12 @@
  17. sh*eb-*-linux*)
  18. targ_defvec=sh_elf32_linux_be_vec
  19. targ_selvecs=sh_elf32_linux_vec
  20. + targ_selvecs="${targ_selvecs} sh_elf32_vec sh_elf32_le_vec sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
  21. ;;
  22. sh*-*-linux*)
  23. targ_defvec=sh_elf32_linux_vec
  24. targ_selvecs=sh_elf32_linux_be_vec
  25. + targ_selvecs="${targ_selvecs} sh_elf32_vec sh_elf32_le_vec sh_elf32_fdpic_le_vec sh_elf32_fdpic_be_vec"
  26. ;;
  27. sh-*-uclinux* | sh[12]-*-uclinux*)
  28. diff -Nur binutils-2.25.1.orig/ld/configure.tgt binutils-2.25.1/ld/configure.tgt
  29. --- binutils-2.25.1.orig/ld/configure.tgt 2014-10-14 09:32:04.000000000 +0200
  30. +++ binutils-2.25.1/ld/configure.tgt 2015-12-06 15:17:26.723094193 +0100
  31. @@ -623,15 +623,17 @@
  32. score-*-elf) targ_emul=score7_elf
  33. targ_extra_emuls=score3_elf ;;
  34. sh-*-linux*) targ_emul=shlelf_linux
  35. - targ_extra_emuls=shelf_linux
  36. + targ_extra_emuls="shelf_linux shlelf_fd shelf_fd shlelf shelf"
  37. targ_extra_libpath=shelf_linux ;;
  38. sh64eb-*-linux*) targ_emul=shelf32_linux
  39. targ_extra_emuls="shlelf32_linux" ;;
  40. sh64-*-linux*) targ_emul=shlelf32_linux
  41. targ_extra_emuls="shelf32_linux"
  42. targ_extra_libpath=shelf32_linux ;;
  43. -sh*eb-*-linux*) targ_emul=shelf_linux ;;
  44. -sh*-*-linux*) targ_emul=shlelf_linux ;;
  45. +sh*eb-*-linux*) targ_emul=shelf_linux
  46. + targ_extra_emuls="shelf_fd shelf" ;;
  47. +sh*-*-linux*) targ_emul=shlelf_linux
  48. + targ_extra_emuls="shlelf_fd shlelf" ;;
  49. sh5le-*-netbsd*) targ_emul=shlelf32_nbsd
  50. targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
  51. sh5-*-netbsd*) targ_emul=shelf32_nbsd