diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.7/GLIBC_DYNAMIC_LINKER.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7/GLIBC_DYNAMIC_LINKER.patch | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/GLIBC_DYNAMIC_LINKER.patch b/meta/recipes-devtools/gcc/gcc-4.7/GLIBC_DYNAMIC_LINKER.patch new file mode 100644 index 0000000000..38c361e085 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.7/GLIBC_DYNAMIC_LINKER.patch | |||
@@ -0,0 +1,165 @@ | |||
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: git/gcc/config/alpha/linux-elf.h | ||
13 | =================================================================== | ||
14 | --- git.orig/gcc/config/alpha/linux-elf.h 2012-07-08 11:16:26.199320624 -0700 | ||
15 | +++ git/gcc/config/alpha/linux-elf.h 2012-07-08 11:19:51.059330624 -0700 | ||
16 | @@ -24,8 +24,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: git/gcc/config/arm/linux-eabi.h | ||
28 | =================================================================== | ||
29 | --- git.orig/gcc/config/arm/linux-eabi.h 2012-07-08 11:16:26.000000000 -0700 | ||
30 | +++ git/gcc/config/arm/linux-eabi.h 2012-07-08 11:20:40.947333288 -0700 | ||
31 | @@ -62,7 +62,7 @@ | ||
32 | /* Use ld-linux.so.3 so that it will be possible to run "classic" | ||
33 | GNU/Linux binaries on an EABI system. */ | ||
34 | #undef GLIBC_DYNAMIC_LINKER | ||
35 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" | ||
36 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.3" | ||
37 | |||
38 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | ||
39 | use the GNU/Linux version, not the generic BPABI version. */ | ||
40 | Index: git/gcc/config/arm/linux-elf.h | ||
41 | =================================================================== | ||
42 | --- git.orig/gcc/config/arm/linux-elf.h 2012-07-08 11:16:31.903320900 -0700 | ||
43 | +++ git/gcc/config/arm/linux-elf.h 2012-07-08 11:21:37.619335646 -0700 | ||
44 | @@ -59,7 +59,7 @@ | ||
45 | |||
46 | #define LIBGCC_SPEC "-lgcc" | ||
47 | |||
48 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
49 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
50 | |||
51 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
52 | %{static:-Bstatic} \ | ||
53 | Index: git/gcc/config/i386/linux.h | ||
54 | =================================================================== | ||
55 | --- git.orig/gcc/config/i386/linux.h 2012-07-08 11:16:26.267320627 -0700 | ||
56 | +++ git/gcc/config/i386/linux.h 2012-07-08 11:23:26.727340361 -0700 | ||
57 | @@ -21,4 +21,4 @@ | ||
58 | <http://www.gnu.org/licenses/>. */ | ||
59 | |||
60 | #define GNU_USER_LINK_EMULATION "elf_i386" | ||
61 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
62 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
63 | Index: git/gcc/config/i386/linux64.h | ||
64 | =================================================================== | ||
65 | --- git.orig/gcc/config/i386/linux64.h 2012-07-08 11:16:26.267320627 -0700 | ||
66 | +++ git/gcc/config/i386/linux64.h 2012-07-08 11:23:13.255340316 -0700 | ||
67 | @@ -28,6 +28,6 @@ | ||
68 | #define GNU_USER_LINK_EMULATION64 "elf_x86_64" | ||
69 | #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" | ||
70 | |||
71 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
72 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | ||
73 | -#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" | ||
74 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
75 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" | ||
76 | +#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" | ||
77 | Index: git/gcc/config/mips/linux.h | ||
78 | =================================================================== | ||
79 | --- git.orig/gcc/config/mips/linux.h 2012-07-08 11:16:26.307320629 -0700 | ||
80 | +++ git/gcc/config/mips/linux.h 2012-07-08 11:23:56.063342214 -0700 | ||
81 | @@ -18,4 +18,4 @@ | ||
82 | along with GCC; see the file COPYING3. If not see | ||
83 | <http://www.gnu.org/licenses/>. */ | ||
84 | |||
85 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
86 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1" | ||
87 | Index: git/gcc/config/mips/linux64.h | ||
88 | =================================================================== | ||
89 | --- git.orig/gcc/config/mips/linux64.h 2012-07-08 11:16:26.307320629 -0700 | ||
90 | +++ git/gcc/config/mips/linux64.h 2012-07-08 11:24:52.207345073 -0700 | ||
91 | @@ -23,10 +23,10 @@ | ||
92 | #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" | ||
93 | #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" | ||
94 | |||
95 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
96 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1" | ||
97 | -#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" | ||
98 | -#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" | ||
99 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
100 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld.so.1" | ||
101 | +#define GLIBC_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld.so.1" | ||
102 | +#define UCLIBC_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
103 | #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" | ||
104 | #define GNU_USER_DYNAMIC_LINKERN32 \ | ||
105 | CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ | ||
106 | Index: git/gcc/config/rs6000/linux64.h | ||
107 | =================================================================== | ||
108 | --- git.orig/gcc/config/rs6000/linux64.h 2012-07-08 11:16:26.335320630 -0700 | ||
109 | +++ git/gcc/config/rs6000/linux64.h 2012-07-08 11:26:05.867348369 -0700 | ||
110 | @@ -358,10 +358,10 @@ | ||
111 | #undef LINK_OS_DEFAULT_SPEC | ||
112 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | ||
113 | |||
114 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
115 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" | ||
116 | -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | ||
117 | -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | ||
118 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
119 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64.so.1" | ||
120 | +#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
121 | +#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" | ||
122 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
123 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
124 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
125 | Index: git/gcc/config/sh/linux.h | ||
126 | =================================================================== | ||
127 | --- git.orig/gcc/config/sh/linux.h 2012-07-08 11:16:26.363320632 -0700 | ||
128 | +++ git/gcc/config/sh/linux.h 2012-07-08 11:26:29.375350165 -0700 | ||
129 | @@ -45,7 +45,7 @@ | ||
130 | |||
131 | #define TARGET_ASM_FILE_END file_end_indicate_exec_stack | ||
132 | |||
133 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
134 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
135 | |||
136 | #undef SUBTARGET_LINK_EMUL_SUFFIX | ||
137 | #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" | ||
138 | Index: git/gcc/config/sparc/linux.h | ||
139 | =================================================================== | ||
140 | --- git.orig/gcc/config/sparc/linux.h 2012-07-08 11:16:26.371320632 -0700 | ||
141 | +++ git/gcc/config/sparc/linux.h 2012-07-08 11:27:00.439351163 -0700 | ||
142 | @@ -84,7 +84,7 @@ | ||
143 | When the -shared link option is used a final link is not being | ||
144 | done. */ | ||
145 | |||
146 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
147 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
148 | |||
149 | #undef LINK_SPEC | ||
150 | #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ | ||
151 | Index: git/gcc/config/sparc/linux64.h | ||
152 | =================================================================== | ||
153 | --- git.orig/gcc/config/sparc/linux64.h 2012-07-08 11:16:26.371320632 -0700 | ||
154 | +++ git/gcc/config/sparc/linux64.h 2012-07-08 11:27:23.571352396 -0700 | ||
155 | @@ -93,8 +93,8 @@ | ||
156 | When the -shared link option is used a final link is not being | ||
157 | done. */ | ||
158 | |||
159 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
160 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" | ||
161 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
162 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
163 | |||
164 | #ifdef SPARC_BI_ARCH | ||
165 | |||