600-mips64_abi_selection.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 603af30d6992e94ac30a66b953264076f4f2fd71 Mon Sep 17 00:00:00 2001
  2. From: Markos Chandras <markos.chandras@imgtec.com>
  3. Date: Thu, 11 Jul 2013 16:59:16 +0000
  4. Subject: Rules.mak: MIPS64: Select correct interpreter
  5. gcc (eg 4.7.3) hardcodes the MIPS64 interpreters like this:
  6. (see gcc/config/linux.h and gcc/config/mips/linux64.h)
  7. o32: UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  8. n32: UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
  9. n64: UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
  10. The existing check for MIPS64 in uClibc is wrong because it does
  11. not respect the selected ABI
  12. We fix this by explicitely checking the selected ABI instead of the
  13. selected MIPS variant.
  14. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
  15. Cc: Anthony G. Basile <blueness@gentoo.org>
  16. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  17. ---
  18. --- a/Rules.mak
  19. +++ b/Rules.mak
  20. @@ -118,13 +118,19 @@ export MAJOR_VERSION MINOR_VERSION SUBLE
  21. LIBC := libc
  22. SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
  23. UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION)
  24. -ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
  25. +
  26. +UCLIBC_LDSO_NAME := ld-uClibc
  27. +ARCH_NATIVE_BIT := 32
  28. +ifneq ($(findstring $(TARGET_ARCH),hppa64 ia64 powerpc64 s390x sparc64 x86_64),)
  29. UCLIBC_LDSO_NAME := ld64-uClibc
  30. ARCH_NATIVE_BIT := 64
  31. else
  32. -UCLIBC_LDSO_NAME := ld-uClibc
  33. -ARCH_NATIVE_BIT := 32
  34. +ifeq ($(CONFIG_MIPS_N64_ABI),y)
  35. +UCLIBC_LDSO_NAME := ld64-uClibc
  36. +ARCH_NATIVE_BIT := 64
  37. endif
  38. +endif
  39. +
  40. UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION)
  41. NONSHARED_LIBNAME := uclibc_nonshared.a
  42. libc := $(top_builddir)lib/$(SHARED_LIBNAME)