diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2016-01-06 17:14:51 +1000 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-01-06 17:48:23 +1000 |
commit | cc146d6c170f100eb2f445047969893faa7a6a55 (patch) | |
tree | b9e731de0c5a51e8e5a35b06db5122d72b778a01 | |
parent | 5b04983edd11bbf0dc6ed878f8a447352ee4e25f (diff) | |
download | meta-xilinx-cc146d6c170f100eb2f445047969893faa7a6a55.tar.gz |
gcc-source_5.3: Fix MicroBlaze musl libc support
Backport the patch from GCC to handle musl libc for MicroBlaze, this
patch sets up the correct path for ld.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r-- | recipes-microblaze/gcc/files/microblaze-musl-support.patch | 44 | ||||
-rw-r--r-- | recipes-microblaze/gcc/gcc-source_5.3.bbappend | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes-microblaze/gcc/files/microblaze-musl-support.patch b/recipes-microblaze/gcc/files/microblaze-musl-support.patch new file mode 100644 index 00000000..08370c15 --- /dev/null +++ b/recipes-microblaze/gcc/files/microblaze-musl-support.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
2 | Date: Thu, 15 Oct 2015 19:12:15 +0000 | ||
3 | Subject: [PATCH] microblaze musl support | ||
4 | |||
5 | * config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define. | ||
6 | (DYNAMIC_LINKER): Renamed to ... | ||
7 | (GLIBC_DYNAMIC_LINKER): This. | ||
8 | (SUBTARGET_EXTRA_SPECS): Use GNU_USER_DYNAMIC_LINKER. | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | --- | ||
12 | gcc/config/microblaze/linux.h | 14 ++++++++++++-- | ||
13 | 1 file changed, 12 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h | ||
16 | index 655a70f..a8a3f3e 100644 | ||
17 | --- a/gcc/config/microblaze/linux.h | ||
18 | +++ b/gcc/config/microblaze/linux.h | ||
19 | @@ -28,10 +28,20 @@ | ||
20 | #undef TLS_NEEDS_GOT | ||
21 | #define TLS_NEEDS_GOT 1 | ||
22 | |||
23 | -#define DYNAMIC_LINKER "/lib/ld.so.1" | ||
24 | +#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
25 | + | ||
26 | +#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ | ||
27 | +#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:;:el}" | ||
28 | +#else | ||
29 | +#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:el}" | ||
30 | +#endif | ||
31 | + | ||
32 | +#undef MUSL_DYNAMIC_LINKER | ||
33 | +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" | ||
34 | + | ||
35 | #undef SUBTARGET_EXTRA_SPECS | ||
36 | #define SUBTARGET_EXTRA_SPECS \ | ||
37 | - { "dynamic_linker", DYNAMIC_LINKER } | ||
38 | + { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } | ||
39 | |||
40 | #undef LINK_SPEC | ||
41 | #define LINK_SPEC "%{shared:-shared} \ | ||
42 | -- | ||
43 | 2.6.4 | ||
44 | |||
diff --git a/recipes-microblaze/gcc/gcc-source_5.3.bbappend b/recipes-microblaze/gcc/gcc-source_5.3.bbappend index 50075f0d..63681d18 100644 --- a/recipes-microblaze/gcc/gcc-source_5.3.bbappend +++ b/recipes-microblaze/gcc/gcc-source_5.3.bbappend | |||
@@ -3,5 +3,6 @@ | |||
3 | FILESEXTRAPATHS_append := "${THISDIR}/files:" | 3 | FILESEXTRAPATHS_append := "${THISDIR}/files:" |
4 | SRC_URI_append = " \ | 4 | SRC_URI_append = " \ |
5 | file://microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch \ | 5 | file://microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch \ |
6 | file://microblaze-musl-support.patch \ | ||
6 | " | 7 | " |
7 | 8 | ||