0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 32129f9682d0d27fc67af10f077ad2768935cbe6 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Fri, 29 Mar 2013 09:30:32 +0400
  4. Subject: [PATCH] gcc: armv4: pass fix-v4bx to linker to support EABI.
  5. The LINK_SPEC for linux gets overwritten by linux-eabi.h which
  6. means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
  7. the option is not passed to linker when chosing march=armv4
  8. This patch redefines this in linux-eabi.h and reinserts it
  9. for eabi defaulting toolchains.
  10. We might want to send it upstream.
  11. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  12. Upstream-Status: Pending
  13. ---
  14. gcc/config/arm/linux-eabi.h | 6 +++++-
  15. 1 file changed, 5 insertions(+), 1 deletion(-)
  16. diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
  17. index 17c18b27145..8eacb099317 100644
  18. --- a/gcc/config/arm/linux-eabi.h
  19. +++ b/gcc/config/arm/linux-eabi.h
  20. @@ -91,10 +91,14 @@
  21. #define MUSL_DYNAMIC_LINKER \
  22. SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
  23. +/* For armv4 we pass --fix-v4bx to linker to support EABI */
  24. +#undef TARGET_FIX_V4BX_SPEC
  25. +#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
  26. +
  27. /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
  28. use the GNU/Linux version, not the generic BPABI version. */
  29. #undef LINK_SPEC
  30. -#define LINK_SPEC EABI_LINK_SPEC \
  31. +#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
  32. LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
  33. LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)