replace the mips64 fixes patch with an upstream commit
[openwrt/openwrt.git] / toolchain / uClibc / patches-0.9.33.2 / 980-mips64_fixes.patch
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
6 gcc (eg 4.7.3) hardcodes the MIPS64 interpreters like this:
7 (see gcc/config/linux.h and gcc/config/mips/linux64.h)
8
9 o32: UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
10 n32: UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
11 n64: UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
12
13 The existing check for MIPS64 in uClibc is wrong because it does
14 not respect the selected ABI
15
16 We fix this by explicitely checking the selected ABI instead of the
17 selected MIPS variant.
18
19 Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
20 Cc: Anthony G. Basile <blueness@gentoo.org>
21 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
22 ---
23
24 diff --git a/Rules.mak b/Rules.mak
25 index 792b794..889108e 100644
26 --- a/Rules.mak
27 +++ b/Rules.mak
28 @@ -138,13 +138,19 @@ export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION ABI_VERSION LC_ALL
29 LIBC := libc
30 SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
31 UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION)
32 -ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
33 +
34 +UCLIBC_LDSO_NAME := ld-uClibc
35 +ARCH_NATIVE_BIT := 32
36 +ifneq ($(findstring $(TARGET_ARCH),hppa64 ia64 powerpc64 s390x sparc64 x86_64),)
37 UCLIBC_LDSO_NAME := ld64-uClibc
38 ARCH_NATIVE_BIT := 64
39 else
40 -UCLIBC_LDSO_NAME := ld-uClibc
41 -ARCH_NATIVE_BIT := 32
42 +ifeq ($(CONFIG_MIPS_N64_ABI),y)
43 +UCLIBC_LDSO_NAME := ld64-uClibc
44 +ARCH_NATIVE_BIT := 64
45 endif
46 +endif
47 +
48 UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION)
49 NONSHARED_LIBNAME := uclibc_nonshared.a
50 libc := $(top_builddir)lib/$(SHARED_LIBNAME)
51 --
52 cgit v0.9.1