uclibc-ng: bump version from 1.0.6 to 1.0.8
[openwrt/staging/mkresin.git] / toolchain / uClibc / patches-0.9.33.2 / 600-mips64_abi_selection.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 --- a/Rules.mak
25 +++ b/Rules.mak
26 @@ -118,13 +118,19 @@ export MAJOR_VERSION MINOR_VERSION SUBLE
27 LIBC := libc
28 SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
29 UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION)
30 -ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
31 +
32 +UCLIBC_LDSO_NAME := ld-uClibc
33 +ARCH_NATIVE_BIT := 32
34 +ifneq ($(findstring $(TARGET_ARCH),hppa64 ia64 powerpc64 s390x sparc64 x86_64),)
35 UCLIBC_LDSO_NAME := ld64-uClibc
36 ARCH_NATIVE_BIT := 64
37 else
38 -UCLIBC_LDSO_NAME := ld-uClibc
39 -ARCH_NATIVE_BIT := 32
40 +ifeq ($(CONFIG_MIPS_N64_ABI),y)
41 +UCLIBC_LDSO_NAME := ld64-uClibc
42 +ARCH_NATIVE_BIT := 64
43 endif
44 +endif
45 +
46 UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION)
47 NONSHARED_LIBNAME := uclibc_nonshared.a
48 libc := $(top_builddir)lib/$(SHARED_LIBNAME)