diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.8/GLIBC_DYNAMIC_LINKER.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.8/GLIBC_DYNAMIC_LINKER.patch | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/GLIBC_DYNAMIC_LINKER.patch b/meta/recipes-devtools/gcc/gcc-4.8/GLIBC_DYNAMIC_LINKER.patch new file mode 100644 index 0000000000..180b2393e6 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.8/GLIBC_DYNAMIC_LINKER.patch | |||
@@ -0,0 +1,167 @@ | |||
1 | This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
2 | relative to SYSTEMLIBS_DIR which can be set in generated headers | ||
3 | This breaks the assumption of hardcoded multilib in gcc | ||
4 | Change is only for the supported architectures in OE including | ||
5 | SH, spart, alpha for possible future support (if any) | ||
6 | |||
7 | Removes the do_headerfix task in metadata | ||
8 | |||
9 | Signed-off-by: Khem Raj | ||
10 | Upstream-Status: Inappropriate [OE configuration] | ||
11 | |||
12 | Index: gcc-4.8.0/gcc/config/alpha/linux-elf.h | ||
13 | =================================================================== | ||
14 | --- gcc-4.8.0.orig/gcc/config/alpha/linux-elf.h 2013-01-10 12:38:27.000000000 -0800 | ||
15 | +++ gcc-4.8.0/gcc/config/alpha/linux-elf.h 2013-03-26 13:55:08.825897207 -0700 | ||
16 | @@ -23,8 +23,8 @@ | ||
17 | #define EXTRA_SPECS \ | ||
18 | { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, | ||
19 | |||
20 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
21 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
22 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
23 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
24 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
25 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
26 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
27 | Index: gcc-4.8.0/gcc/config/arm/linux-eabi.h | ||
28 | =================================================================== | ||
29 | --- gcc-4.8.0.orig/gcc/config/arm/linux-eabi.h 2013-01-10 12:38:27.000000000 -0800 | ||
30 | +++ gcc-4.8.0/gcc/config/arm/linux-eabi.h 2013-03-26 13:56:14.901898372 -0700 | ||
31 | @@ -68,8 +68,8 @@ | ||
32 | GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ | ||
33 | |||
34 | #undef GLIBC_DYNAMIC_LINKER | ||
35 | -#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" | ||
36 | -#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" | ||
37 | +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" | ||
38 | +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" | ||
39 | #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT | ||
40 | |||
41 | #define GLIBC_DYNAMIC_LINKER \ | ||
42 | Index: gcc-4.8.0/gcc/config/arm/linux-elf.h | ||
43 | =================================================================== | ||
44 | --- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-03-26 13:54:13.000000000 -0700 | ||
45 | +++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-26 13:55:08.825897207 -0700 | ||
46 | @@ -57,7 +57,7 @@ | ||
47 | |||
48 | #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" | ||
49 | |||
50 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
51 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
52 | |||
53 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
54 | %{static:-Bstatic} \ | ||
55 | Index: gcc-4.8.0/gcc/config/i386/linux.h | ||
56 | =================================================================== | ||
57 | --- gcc-4.8.0.orig/gcc/config/i386/linux.h 2013-01-10 12:38:27.000000000 -0800 | ||
58 | +++ gcc-4.8.0/gcc/config/i386/linux.h 2013-03-26 13:55:08.825897207 -0700 | ||
59 | @@ -20,4 +20,4 @@ | ||
60 | <http://www.gnu.org/licenses/>. */ | ||
61 | |||
62 | #define GNU_USER_LINK_EMULATION "elf_i386" | ||
63 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
64 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
65 | Index: gcc-4.8.0/gcc/config/i386/linux64.h | ||
66 | =================================================================== | ||
67 | --- gcc-4.8.0.orig/gcc/config/i386/linux64.h 2013-01-10 12:38:27.000000000 -0800 | ||
68 | +++ gcc-4.8.0/gcc/config/i386/linux64.h 2013-03-26 13:55:08.825897207 -0700 | ||
69 | @@ -27,6 +27,6 @@ | ||
70 | #define GNU_USER_LINK_EMULATION64 "elf_x86_64" | ||
71 | #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" | ||
72 | |||
73 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
74 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | ||
75 | -#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" | ||
76 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
77 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" | ||
78 | +#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" | ||
79 | Index: gcc-4.8.0/gcc/config/mips/linux.h | ||
80 | =================================================================== | ||
81 | --- gcc-4.8.0.orig/gcc/config/mips/linux.h 2013-01-10 12:38:27.000000000 -0800 | ||
82 | +++ gcc-4.8.0/gcc/config/mips/linux.h 2013-03-26 13:55:08.825897207 -0700 | ||
83 | @@ -17,4 +17,4 @@ | ||
84 | along with GCC; see the file COPYING3. If not see | ||
85 | <http://www.gnu.org/licenses/>. */ | ||
86 | |||
87 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
88 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1" | ||
89 | Index: gcc-4.8.0/gcc/config/mips/linux64.h | ||
90 | =================================================================== | ||
91 | --- gcc-4.8.0.orig/gcc/config/mips/linux64.h 2013-01-10 12:38:27.000000000 -0800 | ||
92 | +++ gcc-4.8.0/gcc/config/mips/linux64.h 2013-03-26 13:55:08.825897207 -0700 | ||
93 | @@ -22,10 +22,10 @@ | ||
94 | #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" | ||
95 | #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" | ||
96 | |||
97 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
98 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1" | ||
99 | -#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" | ||
100 | -#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" | ||
101 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
102 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld.so.1" | ||
103 | +#define GLIBC_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld.so.1" | ||
104 | +#define UCLIBC_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
105 | #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" | ||
106 | #define GNU_USER_DYNAMIC_LINKERN32 \ | ||
107 | CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ | ||
108 | Index: gcc-4.8.0/gcc/config/rs6000/linux64.h | ||
109 | =================================================================== | ||
110 | --- gcc-4.8.0.orig/gcc/config/rs6000/linux64.h 2013-01-10 12:38:27.000000000 -0800 | ||
111 | +++ gcc-4.8.0/gcc/config/rs6000/linux64.h 2013-03-26 13:55:08.825897207 -0700 | ||
112 | @@ -360,10 +360,10 @@ | ||
113 | #undef LINK_OS_DEFAULT_SPEC | ||
114 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | ||
115 | |||
116 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
117 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" | ||
118 | -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | ||
119 | -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | ||
120 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
121 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64.so.1" | ||
122 | +#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
123 | +#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" | ||
124 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
125 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
126 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
127 | Index: gcc-4.8.0/gcc/config/sh/linux.h | ||
128 | =================================================================== | ||
129 | --- gcc-4.8.0.orig/gcc/config/sh/linux.h 2013-03-13 20:01:53.000000000 -0700 | ||
130 | +++ gcc-4.8.0/gcc/config/sh/linux.h 2013-03-26 13:55:08.829897236 -0700 | ||
131 | @@ -43,7 +43,7 @@ | ||
132 | |||
133 | #define TARGET_ASM_FILE_END file_end_indicate_exec_stack | ||
134 | |||
135 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
136 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
137 | |||
138 | #undef SUBTARGET_LINK_EMUL_SUFFIX | ||
139 | #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" | ||
140 | Index: gcc-4.8.0/gcc/config/sparc/linux.h | ||
141 | =================================================================== | ||
142 | --- gcc-4.8.0.orig/gcc/config/sparc/linux.h 2013-01-10 12:38:27.000000000 -0800 | ||
143 | +++ gcc-4.8.0/gcc/config/sparc/linux.h 2013-03-26 13:55:08.829897236 -0700 | ||
144 | @@ -83,7 +83,7 @@ | ||
145 | When the -shared link option is used a final link is not being | ||
146 | done. */ | ||
147 | |||
148 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
149 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
150 | |||
151 | #undef LINK_SPEC | ||
152 | #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ | ||
153 | Index: gcc-4.8.0/gcc/config/sparc/linux64.h | ||
154 | =================================================================== | ||
155 | --- gcc-4.8.0.orig/gcc/config/sparc/linux64.h 2013-01-10 12:38:27.000000000 -0800 | ||
156 | +++ gcc-4.8.0/gcc/config/sparc/linux64.h 2013-03-26 13:55:08.829897236 -0700 | ||
157 | @@ -92,8 +92,8 @@ | ||
158 | When the -shared link option is used a final link is not being | ||
159 | done. */ | ||
160 | |||
161 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
162 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" | ||
163 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
164 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
165 | |||
166 | #ifdef SPARC_BI_ARCH | ||
167 | |||