diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-06 12:52:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-08 13:11:28 +0100 |
commit | 4666045677c9f338e2e936f67fb7db2e04a58d4f (patch) | |
tree | 5cee62bd62132f28f375ffb2a68f6abbd1e790ac /meta/recipes-devtools/gcc/gcc-4.8 | |
parent | 5992d2971f18acf239ccac228e2bde0ca85bb55f (diff) | |
download | poky-4666045677c9f338e2e936f67fb7db2e04a58d4f.tar.gz |
gcc: Handle uclibc linker relocation for multilib support
We need to handle the UCLIBC_* linker variables in the same way
as we do the GLIBC_* ones to allow uclibc multilib to work properly.
(From OE-Core rev: 025ec5958b7e1fd71caa0079ec3c573126b30886)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.8')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 128 |
1 files changed, 72 insertions, 56 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch index 0e8fffcd8b..5755da8254 100644 --- a/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch +++ b/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | |||
@@ -29,11 +29,11 @@ Upstream-Status: Inappropriate [OE configuration] | |||
29 | gcc/config/sparc/linux64.h | 4 ++-- | 29 | gcc/config/sparc/linux64.h | 4 ++-- |
30 | 11 files changed, 22 insertions(+), 22 deletions(-) | 30 | 11 files changed, 22 insertions(+), 22 deletions(-) |
31 | 31 | ||
32 | diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h | 32 | Index: gcc-4.8.2/gcc/config/alpha/linux-elf.h |
33 | index 84e0596..3a59d71 100644 | 33 | =================================================================== |
34 | --- a/gcc/config/alpha/linux-elf.h | 34 | --- gcc-4.8.2.orig/gcc/config/alpha/linux-elf.h 2014-05-06 10:34:51.081657377 +0000 |
35 | +++ b/gcc/config/alpha/linux-elf.h | 35 | +++ gcc-4.8.2/gcc/config/alpha/linux-elf.h 2014-05-06 10:34:51.073657377 +0000 |
36 | @@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see | 36 | @@ -23,8 +23,8 @@ |
37 | #define EXTRA_SPECS \ | 37 | #define EXTRA_SPECS \ |
38 | { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, | 38 | { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, |
39 | 39 | ||
@@ -44,10 +44,10 @@ index 84e0596..3a59d71 100644 | |||
44 | #if DEFAULT_LIBC == LIBC_UCLIBC | 44 | #if DEFAULT_LIBC == LIBC_UCLIBC |
45 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | 45 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" |
46 | #elif DEFAULT_LIBC == LIBC_GLIBC | 46 | #elif DEFAULT_LIBC == LIBC_GLIBC |
47 | diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h | 47 | Index: gcc-4.8.2/gcc/config/arm/linux-eabi.h |
48 | index 4a425c8..80f454d 100644 | 48 | =================================================================== |
49 | --- a/gcc/config/arm/linux-eabi.h | 49 | --- gcc-4.8.2.orig/gcc/config/arm/linux-eabi.h 2014-05-06 10:34:51.081657377 +0000 |
50 | +++ b/gcc/config/arm/linux-eabi.h | 50 | +++ gcc-4.8.2/gcc/config/arm/linux-eabi.h 2014-05-06 10:34:51.077657377 +0000 |
51 | @@ -68,8 +68,8 @@ | 51 | @@ -68,8 +68,8 @@ |
52 | GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ | 52 | GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ |
53 | 53 | ||
@@ -59,10 +59,10 @@ index 4a425c8..80f454d 100644 | |||
59 | #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT | 59 | #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT |
60 | 60 | ||
61 | #define GLIBC_DYNAMIC_LINKER \ | 61 | #define GLIBC_DYNAMIC_LINKER \ |
62 | diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h | 62 | Index: gcc-4.8.2/gcc/config/arm/linux-elf.h |
63 | index 753dc3a..d593967 100644 | 63 | =================================================================== |
64 | --- a/gcc/config/arm/linux-elf.h | 64 | --- gcc-4.8.2.orig/gcc/config/arm/linux-elf.h 2014-05-06 10:34:51.081657377 +0000 |
65 | +++ b/gcc/config/arm/linux-elf.h | 65 | +++ gcc-4.8.2/gcc/config/arm/linux-elf.h 2014-05-06 10:34:51.077657377 +0000 |
66 | @@ -57,7 +57,7 @@ | 66 | @@ -57,7 +57,7 @@ |
67 | 67 | ||
68 | #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" | 68 | #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" |
@@ -72,21 +72,21 @@ index 753dc3a..d593967 100644 | |||
72 | 72 | ||
73 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | 73 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ |
74 | %{static:-Bstatic} \ | 74 | %{static:-Bstatic} \ |
75 | diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h | 75 | Index: gcc-4.8.2/gcc/config/i386/linux.h |
76 | index 3c95ee0..33b8acd 100644 | 76 | =================================================================== |
77 | --- a/gcc/config/i386/linux.h | 77 | --- gcc-4.8.2.orig/gcc/config/i386/linux.h 2014-05-06 10:34:51.081657377 +0000 |
78 | +++ b/gcc/config/i386/linux.h | 78 | +++ gcc-4.8.2/gcc/config/i386/linux.h 2014-05-06 10:34:51.077657377 +0000 |
79 | @@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. If not see | 79 | @@ -20,4 +20,4 @@ |
80 | <http://www.gnu.org/licenses/>. */ | 80 | <http://www.gnu.org/licenses/>. */ |
81 | 81 | ||
82 | #define GNU_USER_LINK_EMULATION "elf_i386" | 82 | #define GNU_USER_LINK_EMULATION "elf_i386" |
83 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | 83 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" |
84 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | 84 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" |
85 | diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h | 85 | Index: gcc-4.8.2/gcc/config/i386/linux64.h |
86 | index b793e08..da788b8 100644 | 86 | =================================================================== |
87 | --- a/gcc/config/i386/linux64.h | 87 | --- gcc-4.8.2.orig/gcc/config/i386/linux64.h 2014-05-06 10:34:51.081657377 +0000 |
88 | +++ b/gcc/config/i386/linux64.h | 88 | +++ gcc-4.8.2/gcc/config/i386/linux64.h 2014-05-06 10:34:51.077657377 +0000 |
89 | @@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | 89 | @@ -27,6 +27,6 @@ |
90 | #define GNU_USER_LINK_EMULATION64 "elf_x86_64" | 90 | #define GNU_USER_LINK_EMULATION64 "elf_x86_64" |
91 | #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" | 91 | #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" |
92 | 92 | ||
@@ -96,21 +96,21 @@ index b793e08..da788b8 100644 | |||
96 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | 96 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" |
97 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" | 97 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" |
98 | +#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" | 98 | +#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" |
99 | diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h | 99 | Index: gcc-4.8.2/gcc/config/mips/linux.h |
100 | index 9b4c68d..7ee5ba8 100644 | 100 | =================================================================== |
101 | --- a/gcc/config/mips/linux.h | 101 | --- gcc-4.8.2.orig/gcc/config/mips/linux.h 2014-05-06 10:34:51.081657377 +0000 |
102 | +++ b/gcc/config/mips/linux.h | 102 | +++ gcc-4.8.2/gcc/config/mips/linux.h 2014-05-06 10:34:51.077657377 +0000 |
103 | @@ -17,4 +17,4 @@ You should have received a copy of the GNU General Public License | 103 | @@ -17,4 +17,4 @@ |
104 | along with GCC; see the file COPYING3. If not see | 104 | along with GCC; see the file COPYING3. If not see |
105 | <http://www.gnu.org/licenses/>. */ | 105 | <http://www.gnu.org/licenses/>. */ |
106 | 106 | ||
107 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | 107 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" |
108 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1" | 108 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1" |
109 | diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h | 109 | Index: gcc-4.8.2/gcc/config/mips/linux64.h |
110 | index dbba47a..c7ed573 100644 | 110 | =================================================================== |
111 | --- a/gcc/config/mips/linux64.h | 111 | --- gcc-4.8.2.orig/gcc/config/mips/linux64.h 2014-05-06 10:34:51.081657377 +0000 |
112 | +++ b/gcc/config/mips/linux64.h | 112 | +++ gcc-4.8.2/gcc/config/mips/linux64.h 2014-05-06 10:34:51.077657377 +0000 |
113 | @@ -22,10 +22,10 @@ along with GCC; see the file COPYING3. If not see | 113 | @@ -22,10 +22,10 @@ |
114 | #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" | 114 | #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" |
115 | #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" | 115 | #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" |
116 | 116 | ||
@@ -125,11 +125,11 @@ index dbba47a..c7ed573 100644 | |||
125 | #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" | 125 | #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" |
126 | #define GNU_USER_DYNAMIC_LINKERN32 \ | 126 | #define GNU_USER_DYNAMIC_LINKERN32 \ |
127 | CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ | 127 | CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ |
128 | diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h | 128 | Index: gcc-4.8.2/gcc/config/rs6000/linux64.h |
129 | index dc6f67f..bc60769 100644 | 129 | =================================================================== |
130 | --- a/gcc/config/rs6000/linux64.h | 130 | --- gcc-4.8.2.orig/gcc/config/rs6000/linux64.h 2014-05-06 10:34:51.081657377 +0000 |
131 | +++ b/gcc/config/rs6000/linux64.h | 131 | +++ gcc-4.8.2/gcc/config/rs6000/linux64.h 2014-05-06 10:34:51.077657377 +0000 |
132 | @@ -360,10 +360,10 @@ extern int dot_symbols; | 132 | @@ -350,10 +350,10 @@ |
133 | #undef LINK_OS_DEFAULT_SPEC | 133 | #undef LINK_OS_DEFAULT_SPEC |
134 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | 134 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" |
135 | 135 | ||
@@ -144,11 +144,11 @@ index dc6f67f..bc60769 100644 | |||
144 | #if DEFAULT_LIBC == LIBC_UCLIBC | 144 | #if DEFAULT_LIBC == LIBC_UCLIBC |
145 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | 145 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" |
146 | #elif DEFAULT_LIBC == LIBC_GLIBC | 146 | #elif DEFAULT_LIBC == LIBC_GLIBC |
147 | diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h | 147 | Index: gcc-4.8.2/gcc/config/sh/linux.h |
148 | index 9e8f32d..86bf81e 100644 | 148 | =================================================================== |
149 | --- a/gcc/config/sh/linux.h | 149 | --- gcc-4.8.2.orig/gcc/config/sh/linux.h 2014-05-06 10:34:51.081657377 +0000 |
150 | +++ b/gcc/config/sh/linux.h | 150 | +++ gcc-4.8.2/gcc/config/sh/linux.h 2014-05-06 10:34:51.077657377 +0000 |
151 | @@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see | 151 | @@ -43,7 +43,7 @@ |
152 | 152 | ||
153 | #define TARGET_ASM_FILE_END file_end_indicate_exec_stack | 153 | #define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
154 | 154 | ||
@@ -157,11 +157,11 @@ index 9e8f32d..86bf81e 100644 | |||
157 | 157 | ||
158 | #undef SUBTARGET_LINK_EMUL_SUFFIX | 158 | #undef SUBTARGET_LINK_EMUL_SUFFIX |
159 | #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" | 159 | #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" |
160 | diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h | 160 | Index: gcc-4.8.2/gcc/config/sparc/linux.h |
161 | index 49283d3..6f0b03a 100644 | 161 | =================================================================== |
162 | --- a/gcc/config/sparc/linux.h | 162 | --- gcc-4.8.2.orig/gcc/config/sparc/linux.h 2014-05-06 10:34:51.081657377 +0000 |
163 | +++ b/gcc/config/sparc/linux.h | 163 | +++ gcc-4.8.2/gcc/config/sparc/linux.h 2014-05-06 10:34:51.077657377 +0000 |
164 | @@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); | 164 | @@ -83,7 +83,7 @@ |
165 | When the -shared link option is used a final link is not being | 165 | When the -shared link option is used a final link is not being |
166 | done. */ | 166 | done. */ |
167 | 167 | ||
@@ -170,11 +170,11 @@ index 49283d3..6f0b03a 100644 | |||
170 | 170 | ||
171 | #undef LINK_SPEC | 171 | #undef LINK_SPEC |
172 | #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ | 172 | #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ |
173 | diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h | 173 | Index: gcc-4.8.2/gcc/config/sparc/linux64.h |
174 | index 7d48e96..b01993f 100644 | 174 | =================================================================== |
175 | --- a/gcc/config/sparc/linux64.h | 175 | --- gcc-4.8.2.orig/gcc/config/sparc/linux64.h 2014-05-06 10:34:51.081657377 +0000 |
176 | +++ b/gcc/config/sparc/linux64.h | 176 | +++ gcc-4.8.2/gcc/config/sparc/linux64.h 2014-05-06 10:34:51.077657377 +0000 |
177 | @@ -92,8 +92,8 @@ along with GCC; see the file COPYING3. If not see | 177 | @@ -92,8 +92,8 @@ |
178 | When the -shared link option is used a final link is not being | 178 | When the -shared link option is used a final link is not being |
179 | done. */ | 179 | done. */ |
180 | 180 | ||
@@ -185,6 +185,22 @@ index 7d48e96..b01993f 100644 | |||
185 | 185 | ||
186 | #ifdef SPARC_BI_ARCH | 186 | #ifdef SPARC_BI_ARCH |
187 | 187 | ||
188 | -- | 188 | Index: gcc-4.8.2/gcc/config/linux.h |
189 | 1.7.10.4 | 189 | =================================================================== |
190 | 190 | --- gcc-4.8.2.orig/gcc/config/linux.h 2013-01-10 20:38:27.000000000 +0000 | |
191 | +++ gcc-4.8.2/gcc/config/linux.h 2014-05-06 10:36:26.549656893 +0000 | ||
192 | @@ -73,10 +73,10 @@ | ||
193 | GLIBC_DYNAMIC_LINKER must be defined for each target using them, or | ||
194 | GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets | ||
195 | supporting both 32-bit and 64-bit compilation. */ | ||
196 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
197 | -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | ||
198 | -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | ||
199 | -#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" | ||
200 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
201 | +#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
202 | +#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" | ||
203 | +#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" | ||
204 | #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" | ||
205 | #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" | ||
206 | #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" | ||