0001-Revert-sparc-use-HIDDEN_JUMPTARGET-for-errno.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From 984be720d4ee1fc717d4de5e67a776419003c1c6 Mon Sep 17 00:00:00 2001
  2. From: Waldemar Brodkorb <wbx@openadk.org>
  3. Date: Wed, 20 Aug 2014 03:44:53 +0200
  4. Subject: [PATCH 1/9] Revert "sparc: use HIDDEN_JUMPTARGET for errno"
  5. This reverts commit f51fb26dbcceee9e48d10facc830bd4a549f6cc2.
  6. This fixes linking error for sparc build.
  7. While building a sparc system you get following linking error:
  8. libc/sysdeps/linux/sparc/pipe.S:54: undefined reference to `__GI___errno_location'
  9. Removing the HIDDEN_JUMPTARGET fixes the issue, while using gcc 4.8.3/binutils 2.24.
  10. The definition of __errno_location was changed recently here:
  11. http://git.uclibc.org/uClibc/commit/?id=8f550715c2b211036fc273add3cb5219397ed312
  12. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
  13. ---
  14. libc/sysdeps/linux/sparc/fork.S | 2 +-
  15. libc/sysdeps/linux/sparc/pipe.S | 2 +-
  16. libc/sysdeps/linux/sparc/vfork.S | 2 +-
  17. 3 files changed, 3 insertions(+), 3 deletions(-)
  18. diff --git a/libc/sysdeps/linux/sparc/fork.S b/libc/sysdeps/linux/sparc/fork.S
  19. index 8e4bc22..1715911 100644
  20. --- a/libc/sysdeps/linux/sparc/fork.S
  21. +++ b/libc/sysdeps/linux/sparc/fork.S
  22. @@ -35,7 +35,7 @@ fork:
  23. bcc,a 9000f
  24. nop
  25. save %sp,-96,%sp
  26. - call HIDDEN_JUMPTARGET(__errno_location)
  27. + call __errno_location
  28. nop
  29. st %i0,[%o0]
  30. jmpl %i7+8,%g0
  31. diff --git a/libc/sysdeps/linux/sparc/pipe.S b/libc/sysdeps/linux/sparc/pipe.S
  32. index b085faf..fa77f4d 100644
  33. --- a/libc/sysdeps/linux/sparc/pipe.S
  34. +++ b/libc/sysdeps/linux/sparc/pipe.S
  35. @@ -49,7 +49,7 @@ pipe:
  36. restore %g0,%g0,%o0
  37. .Lerror:
  38. - call HIDDEN_JUMPTARGET(__errno_location)
  39. + call __errno_location
  40. or %g0,EINVAL,%i0
  41. st %i0,[%o0]
  42. ret
  43. diff --git a/libc/sysdeps/linux/sparc/vfork.S b/libc/sysdeps/linux/sparc/vfork.S
  44. index 4b701f7..e5a3c30 100644
  45. --- a/libc/sysdeps/linux/sparc/vfork.S
  46. +++ b/libc/sysdeps/linux/sparc/vfork.S
  47. @@ -37,7 +37,7 @@ __vfork:
  48. bcc,a 9000f
  49. nop
  50. save %sp,-96,%sp
  51. - call HIDDEN_JUMPTARGET(__errno_location)
  52. + call __errno_location
  53. nop
  54. st %i0,[%o0]
  55. jmpl %i7+8,%g0
  56. --
  57. 1.8.5.2 (Apple Git-48)