aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc/patches-0.9.33.2/600-mips64_abi_selection.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-07-10 19:28:45 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-07-10 19:28:45 +0000
commita22846267123c31f3717f42d0bce7da2043be0b0 (patch)
tree1c35e5d5a0c2df50f7ec21f071d63a5b7a66be02 /toolchain/uClibc/patches-0.9.33.2/600-mips64_abi_selection.patch
parent752fdaeb911e28d139baf4f04f019cf56e6cb7e9 (diff)
downloadmaster-187ad058-a22846267123c31f3717f42d0bce7da2043be0b0.tar.gz
master-187ad058-a22846267123c31f3717f42d0bce7da2043be0b0.tar.bz2
master-187ad058-a22846267123c31f3717f42d0bce7da2043be0b0.zip
uClibc: add a whole bunch of mips64 related fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41570 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/uClibc/patches-0.9.33.2/600-mips64_abi_selection.patch')
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/600-mips64_abi_selection.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/toolchain/uClibc/patches-0.9.33.2/600-mips64_abi_selection.patch b/toolchain/uClibc/patches-0.9.33.2/600-mips64_abi_selection.patch
new file mode 100644
index 0000000000..beca17ca47
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/600-mips64_abi_selection.patch
@@ -0,0 +1,48 @@
+From 603af30d6992e94ac30a66b953264076f4f2fd71 Mon Sep 17 00:00:00 2001
+From: Markos Chandras <markos.chandras@imgtec.com>
+Date: Thu, 11 Jul 2013 16:59:16 +0000
+Subject: Rules.mak: MIPS64: Select correct interpreter
+
+gcc (eg 4.7.3) hardcodes the MIPS64 interpreters like this:
+(see gcc/config/linux.h and gcc/config/mips/linux64.h)
+
+o32: UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+n32: UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
+n64: UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+
+The existing check for MIPS64 in uClibc is wrong because it does
+not respect the selected ABI
+
+We fix this by explicitely checking the selected ABI instead of the
+selected MIPS variant.
+
+Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
+Cc: Anthony G. Basile <blueness@gentoo.org>
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+
+--- a/Rules.mak
++++ b/Rules.mak
+@@ -118,13 +118,19 @@ export MAJOR_VERSION MINOR_VERSION SUBLE
+ LIBC := libc
+ SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
+ UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION)
+-ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
++
++UCLIBC_LDSO_NAME := ld-uClibc
++ARCH_NATIVE_BIT := 32
++ifneq ($(findstring $(TARGET_ARCH),hppa64 ia64 powerpc64 s390x sparc64 x86_64),)
+ UCLIBC_LDSO_NAME := ld64-uClibc
+ ARCH_NATIVE_BIT := 64
+ else
+-UCLIBC_LDSO_NAME := ld-uClibc
+-ARCH_NATIVE_BIT := 32
++ifeq ($(CONFIG_MIPS_N64_ABI),y)
++UCLIBC_LDSO_NAME := ld64-uClibc
++ARCH_NATIVE_BIT := 64
+ endif
++endif
++
+ UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION)
+ NONSHARED_LIBNAME := uclibc_nonshared.a
+ libc := $(top_builddir)lib/$(SHARED_LIBNAME)