summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-06 12:52:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-08 13:11:28 +0100
commit4666045677c9f338e2e936f67fb7db2e04a58d4f (patch)
tree5cee62bd62132f28f375ffb2a68f6abbd1e790ac /meta/recipes-devtools/gcc
parent5992d2971f18acf239ccac228e2bde0ca85bb55f (diff)
downloadpoky-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')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch128
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch103
-rw-r--r--meta/recipes-devtools/gcc/gcc-multilib-config.inc11
3 files changed, 143 insertions, 99 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
32diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h 32Index: gcc-4.8.2/gcc/config/alpha/linux-elf.h
33index 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
47diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h 47Index: gcc-4.8.2/gcc/config/arm/linux-eabi.h
48index 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 \
62diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h 62Index: gcc-4.8.2/gcc/config/arm/linux-elf.h
63index 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} \
75diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h 75Index: gcc-4.8.2/gcc/config/i386/linux.h
76index 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"
85diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h 85Index: gcc-4.8.2/gcc/config/i386/linux64.h
86index 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"
99diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h 99Index: gcc-4.8.2/gcc/config/mips/linux.h
100index 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"
109diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h 109Index: gcc-4.8.2/gcc/config/mips/linux64.h
110index 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, \
128diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h 128Index: gcc-4.8.2/gcc/config/rs6000/linux64.h
129index 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
147diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h 147Index: gcc-4.8.2/gcc/config/sh/linux.h
148index 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"
160diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h 160Index: gcc-4.8.2/gcc/config/sparc/linux.h
161index 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} \
173diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h 173Index: gcc-4.8.2/gcc/config/sparc/linux64.h
174index 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-- 188Index: gcc-4.8.2/gcc/config/linux.h
1891.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"
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index 670c9d60fd..969d290ad6 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.9/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
32Index: gcc-4.9-20140316/gcc/config/alpha/linux-elf.h 32Index: gcc-4.9.0/gcc/config/alpha/linux-elf.h
33=================================================================== 33===================================================================
34--- gcc-4.9-20140316.orig/gcc/config/alpha/linux-elf.h 34--- gcc-4.9.0.orig/gcc/config/alpha/linux-elf.h 2014-05-07 16:43:50.609106535 +0000
35+++ gcc-4.9-20140316/gcc/config/alpha/linux-elf.h 35+++ gcc-4.9.0/gcc/config/alpha/linux-elf.h 2014-05-07 16:43:50.605106535 +0000
36@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. 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: gcc-4.9-20140316/gcc/config/alpha/linux-elf.h
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
47Index: gcc-4.9-20140316/gcc/config/arm/linux-eabi.h 47Index: gcc-4.9.0/gcc/config/arm/linux-eabi.h
48=================================================================== 48===================================================================
49--- gcc-4.9-20140316.orig/gcc/config/arm/linux-eabi.h 49--- gcc-4.9.0.orig/gcc/config/arm/linux-eabi.h 2014-05-07 16:43:50.609106535 +0000
50+++ gcc-4.9-20140316/gcc/config/arm/linux-eabi.h 50+++ gcc-4.9.0/gcc/config/arm/linux-eabi.h 2014-05-07 16:43:50.605106535 +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: gcc-4.9-20140316/gcc/config/arm/linux-eabi.h
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 \
62Index: gcc-4.9-20140316/gcc/config/arm/linux-elf.h 62Index: gcc-4.9.0/gcc/config/arm/linux-elf.h
63=================================================================== 63===================================================================
64--- gcc-4.9-20140316.orig/gcc/config/arm/linux-elf.h 64--- gcc-4.9.0.orig/gcc/config/arm/linux-elf.h 2014-05-07 16:43:50.609106535 +0000
65+++ gcc-4.9-20140316/gcc/config/arm/linux-elf.h 65+++ gcc-4.9.0/gcc/config/arm/linux-elf.h 2014-05-07 16:43:50.605106535 +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: gcc-4.9-20140316/gcc/config/arm/linux-elf.h
72 72
73 #define LINUX_TARGET_LINK_SPEC "%{h*} \ 73 #define LINUX_TARGET_LINK_SPEC "%{h*} \
74 %{static:-Bstatic} \ 74 %{static:-Bstatic} \
75Index: gcc-4.9-20140316/gcc/config/i386/linux.h 75Index: gcc-4.9.0/gcc/config/i386/linux.h
76=================================================================== 76===================================================================
77--- gcc-4.9-20140316.orig/gcc/config/i386/linux.h 77--- gcc-4.9.0.orig/gcc/config/i386/linux.h 2014-05-07 16:43:50.609106535 +0000
78+++ gcc-4.9-20140316/gcc/config/i386/linux.h 78+++ gcc-4.9.0/gcc/config/i386/linux.h 2014-05-07 16:43:50.605106535 +0000
79@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. 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"
85Index: gcc-4.9-20140316/gcc/config/i386/linux64.h 85Index: gcc-4.9.0/gcc/config/i386/linux64.h
86=================================================================== 86===================================================================
87--- gcc-4.9-20140316.orig/gcc/config/i386/linux64.h 87--- gcc-4.9.0.orig/gcc/config/i386/linux64.h 2014-05-07 16:43:50.609106535 +0000
88+++ gcc-4.9-20140316/gcc/config/i386/linux64.h 88+++ gcc-4.9.0/gcc/config/i386/linux64.h 2014-05-07 16:43:50.605106535 +0000
89@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTI 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,11 +96,11 @@ Index: gcc-4.9-20140316/gcc/config/i386/linux64.h
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"
99Index: gcc-4.9-20140316/gcc/config/mips/linux.h 99Index: gcc-4.9.0/gcc/config/mips/linux.h
100=================================================================== 100===================================================================
101--- gcc-4.9-20140316.orig/gcc/config/mips/linux.h 101--- gcc-4.9.0.orig/gcc/config/mips/linux.h 2014-05-07 16:43:50.609106535 +0000
102+++ gcc-4.9-20140316/gcc/config/mips/linux.h 102+++ gcc-4.9.0/gcc/config/mips/linux.h 2014-05-07 16:43:50.605106535 +0000
103@@ -18,8 +18,8 @@ along with GCC; see the file COPYING3. 103@@ -18,8 +18,8 @@
104 <http://www.gnu.org/licenses/>. */ 104 <http://www.gnu.org/licenses/>. */
105 105
106 #define GLIBC_DYNAMIC_LINKER \ 106 #define GLIBC_DYNAMIC_LINKER \
@@ -111,11 +111,11 @@ Index: gcc-4.9-20140316/gcc/config/mips/linux.h
111 #define UCLIBC_DYNAMIC_LINKER \ 111 #define UCLIBC_DYNAMIC_LINKER \
112- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" 112- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
113+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" 113+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
114Index: gcc-4.9-20140316/gcc/config/mips/linux64.h 114Index: gcc-4.9.0/gcc/config/mips/linux64.h
115=================================================================== 115===================================================================
116--- gcc-4.9-20140316.orig/gcc/config/mips/linux64.h 116--- gcc-4.9.0.orig/gcc/config/mips/linux64.h 2014-05-07 16:43:50.609106535 +0000
117+++ gcc-4.9-20140316/gcc/config/mips/linux64.h 117+++ gcc-4.9.0/gcc/config/mips/linux64.h 2014-05-07 16:43:50.605106535 +0000
118@@ -23,20 +23,20 @@ along with GCC; see the file COPYING3. 118@@ -23,20 +23,20 @@
119 #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" 119 #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
120 120
121 #define GLIBC_DYNAMIC_LINKER32 \ 121 #define GLIBC_DYNAMIC_LINKER32 \
@@ -142,11 +142,11 @@ Index: gcc-4.9-20140316/gcc/config/mips/linux64.h
142 142
143 #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" 143 #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
144 #define GNU_USER_DYNAMIC_LINKERN32 \ 144 #define GNU_USER_DYNAMIC_LINKERN32 \
145Index: gcc-4.9-20140316/gcc/config/rs6000/linux64.h 145Index: gcc-4.9.0/gcc/config/rs6000/linux64.h
146=================================================================== 146===================================================================
147--- gcc-4.9-20140316.orig/gcc/config/rs6000/linux64.h 147--- gcc-4.9.0.orig/gcc/config/rs6000/linux64.h 2014-05-07 16:43:50.609106535 +0000
148+++ gcc-4.9-20140316/gcc/config/rs6000/linux64.h 148+++ gcc-4.9.0/gcc/config/rs6000/linux64.h 2014-05-07 16:43:50.605106535 +0000
149@@ -367,14 +367,14 @@ extern int dot_symbols; 149@@ -367,14 +367,14 @@
150 #undef LINK_OS_DEFAULT_SPEC 150 #undef LINK_OS_DEFAULT_SPEC
151 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" 151 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
152 152
@@ -166,11 +166,11 @@ Index: gcc-4.9-20140316/gcc/config/rs6000/linux64.h
166 #if DEFAULT_LIBC == LIBC_UCLIBC 166 #if DEFAULT_LIBC == LIBC_UCLIBC
167 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" 167 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
168 #elif DEFAULT_LIBC == LIBC_GLIBC 168 #elif DEFAULT_LIBC == LIBC_GLIBC
169Index: gcc-4.9-20140316/gcc/config/sh/linux.h 169Index: gcc-4.9.0/gcc/config/sh/linux.h
170=================================================================== 170===================================================================
171--- gcc-4.9-20140316.orig/gcc/config/sh/linux.h 171--- gcc-4.9.0.orig/gcc/config/sh/linux.h 2014-05-07 16:43:50.609106535 +0000
172+++ gcc-4.9-20140316/gcc/config/sh/linux.h 172+++ gcc-4.9.0/gcc/config/sh/linux.h 2014-05-07 16:43:50.605106535 +0000
173@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. 173@@ -43,7 +43,7 @@
174 174
175 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack 175 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
176 176
@@ -179,11 +179,11 @@ Index: gcc-4.9-20140316/gcc/config/sh/linux.h
179 179
180 #undef SUBTARGET_LINK_EMUL_SUFFIX 180 #undef SUBTARGET_LINK_EMUL_SUFFIX
181 #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" 181 #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
182Index: gcc-4.9-20140316/gcc/config/sparc/linux.h 182Index: gcc-4.9.0/gcc/config/sparc/linux.h
183=================================================================== 183===================================================================
184--- gcc-4.9-20140316.orig/gcc/config/sparc/linux.h 184--- gcc-4.9.0.orig/gcc/config/sparc/linux.h 2014-05-07 16:43:50.609106535 +0000
185+++ gcc-4.9-20140316/gcc/config/sparc/linux.h 185+++ gcc-4.9.0/gcc/config/sparc/linux.h 2014-05-07 16:43:50.605106535 +0000
186@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu 186@@ -83,7 +83,7 @@
187 When the -shared link option is used a final link is not being 187 When the -shared link option is used a final link is not being
188 done. */ 188 done. */
189 189
@@ -192,11 +192,11 @@ Index: gcc-4.9-20140316/gcc/config/sparc/linux.h
192 192
193 #undef LINK_SPEC 193 #undef LINK_SPEC
194 #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ 194 #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
195Index: gcc-4.9-20140316/gcc/config/sparc/linux64.h 195Index: gcc-4.9.0/gcc/config/sparc/linux64.h
196=================================================================== 196===================================================================
197--- gcc-4.9-20140316.orig/gcc/config/sparc/linux64.h 197--- gcc-4.9.0.orig/gcc/config/sparc/linux64.h 2014-05-07 16:43:50.609106535 +0000
198+++ gcc-4.9-20140316/gcc/config/sparc/linux64.h 198+++ gcc-4.9.0/gcc/config/sparc/linux64.h 2014-05-07 16:43:50.605106535 +0000
199@@ -92,8 +92,8 @@ along with GCC; see the file COPYING3. 199@@ -92,8 +92,8 @@
200 When the -shared link option is used a final link is not being 200 When the -shared link option is used a final link is not being
201 done. */ 201 done. */
202 202
@@ -207,3 +207,22 @@ Index: gcc-4.9-20140316/gcc/config/sparc/linux64.h
207 207
208 #ifdef SPARC_BI_ARCH 208 #ifdef SPARC_BI_ARCH
209 209
210Index: gcc-4.9.0/gcc/config/linux.h
211===================================================================
212--- gcc-4.9.0.orig/gcc/config/linux.h 2014-05-07 16:43:50.609106535 +0000
213+++ gcc-4.9.0/gcc/config/linux.h 2014-05-07 16:43:50.605106535 +0000
214@@ -73,10 +73,10 @@
215 GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
216 GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
217 supporting both 32-bit and 64-bit compilation. */
218-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
219-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
220-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
221-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
222+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
223+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
224+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
225+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
226 #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
227 #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
228 #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index 1eafeb4768..81d664a1b3 100644
--- a/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -26,7 +26,8 @@ python gcc_multilib_setup() {
26 26
27 bb.utils.remove(build_conf_dir, True) 27 bb.utils.remove(build_conf_dir, True)
28 ml_globs = ('%s/*/t-linux64' % src_conf_dir, 28 ml_globs = ('%s/*/t-linux64' % src_conf_dir,
29 '%s/*/linux64.h' % src_conf_dir) 29 '%s/*/linux64.h' % src_conf_dir,
30 '%s/linux.h' % src_conf_dir)
30 31
31 # copy the target multilib config files to ${B} 32 # copy the target multilib config files to ${B}
32 for ml_glob in ml_globs: 33 for ml_glob in ml_globs:
@@ -93,6 +94,14 @@ python gcc_multilib_setup() {
93 r'\1' + wrap_libdir(libdirx32) + r'\3'), 94 r'\1' + wrap_libdir(libdirx32) + r'\3'),
94 (r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$', 95 (r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
95 r'\1' + wrap_libdir(libdirn32) + r'\3'), 96 r'\1' + wrap_libdir(libdirn32) + r'\3'),
97 (r'^(#define\s*UCLIBC_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$',
98 r'\1' + wrap_libdir(libdir32) + r'\3'),
99 (r'^(#define\s*UCLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\".*\")$',
100 r'\1' + wrap_libdir(libdir64) + r'\3'),
101 (r'^(#define\s*UCLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
102 r'\1' + wrap_libdir(libdirn32) + r'\3'),
103 (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\s*)(\S+)(\s*\".*\")$',
104 r'\1' + wrap_libdir(libdir32) + r'\3'),
96 ] 105 ]
97 106
98 for (i, line) in enumerate(filelines): 107 for (i, line) in enumerate(filelines):